public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11098] New: g++ doesn't emit complete debugging information for local variables in destructors
@ 2003-06-05  7:27 mvanier@cs.caltech.edu
  2003-06-22 13:13 ` [Bug c++/11098] " pinskia at physics dot uc dot edu
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: mvanier@cs.caltech.edu @ 2003-06-05  7:27 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11098

           Summary: g++ doesn't emit complete debugging information for
                    local variables in destructors
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mvanier@cs.caltech.edu
                CC: gcc-bugs@gcc.gnu.org

Consider this code (in the file "foo.cc"):

// Begin code:
class Test {
private:
    int *data;
public:
    Test();
    ~Test();
};

Test::Test() {
    data = new int[1000];
}

Test::~Test() {
    int *t = data;
    delete [] t;
}


int main() {
    Test s;
    return 0;
}
// End code.

When I compile this with "g++ -Wall -g foo.cc -o foo" and then bring up gdb 5.3
and set a breakpoint in the destructor, this happens:

[tap] gdb foo
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) break Test::~Test()
Breakpoint 1 at 0x80484c6: file foo.cc, line 13.
(gdb) run
Starting program: /home/mvanier/tmp/cs11/foo 

Breakpoint 1, ~Test (this=0xbfffee30) at foo.cc:14
14          int *t = data;
(gdb) p t
No symbol "t" in current context.
(gdb) info locals
No locals.
(gdb) 

Clearly this is wrong, as "t" is a local variable in the destructor.

I sent in a bug report to the gdb developers, and they say that the reason this
is happening is that g++ is not outputting the correct debugging information.
They tell me I should refer you to bugs debug/10156 in the gcc GNATS database
and c++/1234 in the gdb GNATS database (the latter being the one I submitted).
Thanks in advance for your help.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11098] g++ doesn't emit complete debugging information for local variables in destructors
  2003-06-05  7:27 [Bug c++/11098] New: g++ doesn't emit complete debugging information for local variables in destructors mvanier@cs.caltech.edu
@ 2003-06-22 13:13 ` pinskia at physics dot uc dot edu
  2003-07-05 15:45 ` [Bug c++/11098] [3.3./3.4 regression] [dwarf2] " pinskia at physics dot uc dot edu
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-22 13:13 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11098


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4                         |---


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11098] [3.3./3.4 regression] [dwarf2] g++ doesn't emit complete debugging information for local variables in destructors
  2003-06-05  7:27 [Bug c++/11098] New: g++ doesn't emit complete debugging information for local variables in destructors mvanier@cs.caltech.edu
  2003-06-22 13:13 ` [Bug c++/11098] " pinskia at physics dot uc dot edu
@ 2003-07-05 15:45 ` pinskia at physics dot uc dot edu
  2003-07-14 22:22 ` [Bug debug/11098] " mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-05 15:45 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11098


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-05 15:45:24
               date|                            |
            Summary|g++ doesn't emit complete   |[3.3./3.4 regression]
                   |debugging information for   |[dwarf2] g++ doesn't emit
                   |local variables in          |complete debugging
                   |destructors                 |information for local
                   |                            |variables in destructors
   Target Milestone|---                         |3.3.1


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-05 15:45 -------
With -gstabs, I get the definition, so this is user viewable regression.  Also on 2.95.3 with -
gdwarf-2 I get the variable printed so this is true regression.

I do not get the variable printed in the mainline (20030705).


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug debug/11098] [3.3./3.4 regression] [dwarf2] g++ doesn't emit complete debugging information for local variables in destructors
  2003-06-05  7:27 [Bug c++/11098] New: g++ doesn't emit complete debugging information for local variables in destructors mvanier@cs.caltech.edu
  2003-06-22 13:13 ` [Bug c++/11098] " pinskia at physics dot uc dot edu
  2003-07-05 15:45 ` [Bug c++/11098] [3.3./3.4 regression] [dwarf2] " pinskia at physics dot uc dot edu
@ 2003-07-14 22:22 ` mmitchel at gcc dot gnu dot org
  2003-07-15  1:04 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-07-14 22:22 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11098


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mmitchel at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug debug/11098] [3.3./3.4 regression] [dwarf2] g++ doesn't emit complete debugging information for local variables in destructors
  2003-06-05  7:27 [Bug c++/11098] New: g++ doesn't emit complete debugging information for local variables in destructors mvanier@cs.caltech.edu
                   ` (2 preceding siblings ...)
  2003-07-14 22:22 ` [Bug debug/11098] " mmitchel at gcc dot gnu dot org
@ 2003-07-15  1:04 ` cvs-commit at gcc dot gnu dot org
  2003-07-15  1:05 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-07-15  1:04 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11098



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-07-15 01:04 -------
Subject: Bug 11098

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2003-07-15 01:04:21

Modified files:
	gcc            : ChangeLog integrate.c 

Log message:
	PR debug/11098
	* integrate.c (copy_decl_for_inlining): Do not mark copied decls
	as DECL_ABSTRACT.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.502&r2=2.503
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/integrate.c.diff?cvsroot=gcc&r1=1.230&r2=1.231


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug debug/11098] [3.3./3.4 regression] [dwarf2] g++ doesn't emit complete debugging information for local variables in destructors
  2003-06-05  7:27 [Bug c++/11098] New: g++ doesn't emit complete debugging information for local variables in destructors mvanier@cs.caltech.edu
                   ` (3 preceding siblings ...)
  2003-07-15  1:04 ` cvs-commit at gcc dot gnu dot org
@ 2003-07-15  1:05 ` cvs-commit at gcc dot gnu dot org
  2003-07-15  1:06 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-07-15  1:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11098



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-07-15 01:05 -------
Subject: Bug 11098

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	mmitchel@gcc.gnu.org	2003-07-15 01:05:45

Modified files:
	gcc            : ChangeLog integrate.c 

Log message:
	PR debug/11098
	* integrate.c (copy_decl_for_inlining): Do not mark copied decls
	as DECL_ABSTRACT.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.656&r2=1.16114.2.657
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/integrate.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.206.2.3&r2=1.206.2.4


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug debug/11098] [3.3./3.4 regression] [dwarf2] g++ doesn't emit complete debugging information for local variables in destructors
  2003-06-05  7:27 [Bug c++/11098] New: g++ doesn't emit complete debugging information for local variables in destructors mvanier@cs.caltech.edu
                   ` (4 preceding siblings ...)
  2003-07-15  1:05 ` cvs-commit at gcc dot gnu dot org
@ 2003-07-15  1:06 ` mmitchel at gcc dot gnu dot org
  2003-07-15  1:12 ` mmitchel at gcc dot gnu dot org
  2003-09-03  6:07 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-07-15  1:06 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11098


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-07-15 01:06 -------
Fixed in GCC 3.3.1 and GCC 3.4.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug debug/11098] [3.3./3.4 regression] [dwarf2] g++ doesn't emit complete debugging information for local variables in destructors
  2003-06-05  7:27 [Bug c++/11098] New: g++ doesn't emit complete debugging information for local variables in destructors mvanier@cs.caltech.edu
                   ` (5 preceding siblings ...)
  2003-07-15  1:06 ` mmitchel at gcc dot gnu dot org
@ 2003-07-15  1:12 ` mmitchel at gcc dot gnu dot org
  2003-09-03  6:07 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-07-15  1:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11098


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter dot thompson at etnus
                   |                            |dot com


------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-07-15 01:12 -------
*** Bug 10156 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug debug/11098] [3.3./3.4 regression] [dwarf2] g++ doesn't emit complete debugging information for local variables in destructors
  2003-06-05  7:27 [Bug c++/11098] New: g++ doesn't emit complete debugging information for local variables in destructors mvanier@cs.caltech.edu
                   ` (6 preceding siblings ...)
  2003-07-15  1:12 ` mmitchel at gcc dot gnu dot org
@ 2003-09-03  6:07 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-03  6:07 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11098


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |karinc at adsmr dot co dot
                   |                            |za


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-03 06:07 -------
*** Bug 8542 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-09-03  6:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-05  7:27 [Bug c++/11098] New: g++ doesn't emit complete debugging information for local variables in destructors mvanier@cs.caltech.edu
2003-06-22 13:13 ` [Bug c++/11098] " pinskia at physics dot uc dot edu
2003-07-05 15:45 ` [Bug c++/11098] [3.3./3.4 regression] [dwarf2] " pinskia at physics dot uc dot edu
2003-07-14 22:22 ` [Bug debug/11098] " mmitchel at gcc dot gnu dot org
2003-07-15  1:04 ` cvs-commit at gcc dot gnu dot org
2003-07-15  1:05 ` cvs-commit at gcc dot gnu dot org
2003-07-15  1:06 ` mmitchel at gcc dot gnu dot org
2003-07-15  1:12 ` mmitchel at gcc dot gnu dot org
2003-09-03  6:07 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).