public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries
@ 2003-06-06 18:56 carlton@bactrian.org
  2003-06-06 19:06 ` [Bug debug/11114] " pinskia@physics.uc.edu
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: carlton@bactrian.org @ 2003-06-06 18:56 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=11114

           Summary: GCC doesn't generate DW_TAG_namespace entries
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: carlton@bactrian.org
                CC: gcc-bugs@gcc.gnu.org

GCC doesn't generate DW_TAG_namespace entries when generating DWARF 2 debug info
for C++ programs that use namespaces.  This makes the lives of us poor GDB
C++ hackers difficult. :-(

(Verified by compiling programs with GCC 3.2.3 and by downloading the current
mainline sources from CVS and noticing that "DW_TAG_namespace" doesn't occur
in dwarf2out.c.)


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
@ 2003-06-06 19:06 ` pinskia@physics.uc.edu
  2003-06-06 19:20 ` bangerth@dealii.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-06 19: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=11114


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.4                         |3.2.3


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
  2003-06-06 19:06 ` [Bug debug/11114] " pinskia@physics.uc.edu
@ 2003-06-06 19:20 ` bangerth@dealii.org
  2003-06-06 19:33 ` pinskia@physics.uc.edu
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bangerth@dealii.org @ 2003-06-06 19:20 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=11114


bangerth@dealii.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |7078
              nThis|                            |


------- Additional Comments From bangerth@dealii.org  2003-06-06 19:20 -------
This is most likely the cause of PR 7078.


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
  2003-06-06 19:06 ` [Bug debug/11114] " pinskia@physics.uc.edu
  2003-06-06 19:20 ` bangerth@dealii.org
@ 2003-06-06 19:33 ` pinskia@physics.uc.edu
  2003-06-06 19:43 ` carlton@bactrian.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-06 19:33 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=11114


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-06 19:33:12
               date|                            |


------- Additional Comments From pinskia@physics.uc.edu  2003-06-06 19:33 -------
The latest patch which add DW_TAG_namespace support into gcc is at <http://gcc.gnu.org/ml/
gcc-patches/2002-11/msg00978.html>.

Some comments on the patch are located here <http://gcc.gnu.org/ml/gcc-patches/2002-12/
msg00097.html>.


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
                   ` (2 preceding siblings ...)
  2003-06-06 19:33 ` pinskia@physics.uc.edu
@ 2003-06-06 19:43 ` carlton@bactrian.org
  2003-06-06 19:47 ` pinskia@physics.uc.edu
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: carlton@bactrian.org @ 2003-06-06 19:43 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=11114



------- Additional Comments From carlton@bactrian.org  2003-06-06 19:43 -------
I suspect that there's a problem even with the patch that Andrew referenced.
I don't know for sure, but I'm using a variant of that patch with GCC 3.2.3,
and I know that there's a problem with the variant that I'm using.  In some
contexts, if you have a templated class Temp and you instantiate it
like

  Temp<NS::C>

where C is a class living in a namespace NS, then, if the DIE for NS hasn't
been emitted yet, then that die gets created as a child of the DIE for
Temp<NS::C> instead of as a chield of the comp unit DIE.

I'm playing around with trying to fix that (though I'm not an expert on
dwarf2out.c (or any of GCC!), so I could use some help); if I do manage
to fix it, I'll attach a revised patch here.  (Maybe even a test case if
I get ambitious, though unfortunately the situation where I ran into this
problem involved a huge proprietary source file.)


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
                   ` (3 preceding siblings ...)
  2003-06-06 19:43 ` carlton@bactrian.org
@ 2003-06-06 19:47 ` pinskia@physics.uc.edu
  2003-06-06 20:12 ` dberlin@dberlin.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-06 19:47 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=11114



------- Additional Comments From pinskia@physics.uc.edu  2003-06-06 19:47 -------
If you send a revised patch make sure you mail to gcc-patches@gcc.gnu.org, also.


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
                   ` (4 preceding siblings ...)
  2003-06-06 19:47 ` pinskia@physics.uc.edu
@ 2003-06-06 20:12 ` dberlin@dberlin.org
  2003-06-06 21:32 ` carlton@bactrian.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dberlin@dberlin.org @ 2003-06-06 20: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=11114



------- Additional Comments From dberlin@dberlin.org  2003-06-06 20:12 -------
Subject: Re:  GCC doesn't generate DW_TAG_namespace entries


> I suspect that there's a problem even with the patch that Andrew 
> referenced.
> I don't know for sure, but I'm using a variant of that patch with GCC 
> 3.2.3,
> and I know that there's a problem with the variant that I'm using.

Try it on the mainline with the patch, see if it still occurs.
There are significant changes in the way C++ works since 3.2.3.

> In some
> contexts, if you have a templated class Temp and you instantiate it
> like
>
>   Temp<NS::C>
>
> where C is a class living in a namespace NS, then, if the DIE for NS 
> hasn't
> been emitted yet, then that die gets created as a child of the DIE for
> Temp<NS::C> instead of as a chield of the comp unit DIE.
>
I forget where namespaces can occur in C++, but you can make it set the 
child to be the closest context that is a valid place for a namespace 
to go.

> I'm playing around with trying to fix that (though I'm not an expert on
> dwarf2out.c (or any of GCC!), so I could use some help);

I would help in general, but I don't even *have* 3.2.3 around anymore.
> if I do manage
> to fix it, I'll attach a revised patch here.  (Maybe even a test case 
> if
> I get ambitious, though unfortunately the situation where I ran into 
> this
> problem involved a huge proprietary source file.)


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
                   ` (5 preceding siblings ...)
  2003-06-06 20:12 ` dberlin@dberlin.org
@ 2003-06-06 21:32 ` carlton@bactrian.org
  2003-06-12  0:04 ` carlton@bactrian.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: carlton@bactrian.org @ 2003-06-06 21:32 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=11114



------- Additional Comments From carlton@bactrian.org  2003-06-06 21:32 -------
I've posted a fix to the earlier DW_TAG_namespace patch at:

<http://gcc.gnu.org/ml/gcc-patches/2003-06/msg00567.html>


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
                   ` (6 preceding siblings ...)
  2003-06-06 21:32 ` carlton@bactrian.org
@ 2003-06-12  0:04 ` carlton@bactrian.org
  2003-08-06  3:50 ` pinskia at physics dot uc dot edu
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: carlton@bactrian.org @ 2003-06-12  0: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=11114



------- Additional Comments From carlton@bactrian.org  2003-06-12 00:04 -------
That earlier fix isn't right; the one posted here might be:

<http://gcc.gnu.org/ml/gcc-patches/2003-06/msg01181.html>


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
                   ` (7 preceding siblings ...)
  2003-06-12  0:04 ` carlton@bactrian.org
@ 2003-08-06  3:50 ` pinskia at physics dot uc dot edu
  2003-09-30 22:58 ` carlton at bactrian dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-06  3:50 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=11114


pinskia at physics dot uc dot edu changed:

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


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
                   ` (8 preceding siblings ...)
  2003-08-06  3:50 ` pinskia at physics dot uc dot edu
@ 2003-09-30 22:58 ` carlton at bactrian dot org
  2003-11-26  6:51 ` bkoz at gcc dot gnu dot org
  2003-12-17 16:30 ` jason at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: carlton at bactrian dot org @ 2003-09-30 22:58 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=11114



------- Additional Comments From carlton at bactrian dot org  2003-09-30 21:52 -------
Just for reference, I'm going to attach the patch we've been using
here for a while to generate these entries.  This patch works
with GCC 3.2.3; it's not as graceful as possible (especially
its way of detecting anonymous namespaces), but it seems to work.


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
                   ` (9 preceding siblings ...)
  2003-09-30 22:58 ` carlton at bactrian dot org
@ 2003-11-26  6:51 ` bkoz at gcc dot gnu dot org
  2003-12-17 16:30 ` jason at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2003-11-26  6:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2003-11-26 06:51 -------

We talked about this last on 2003-10-01. There's still no resolution for this,
and it's blocking gdb support. 

Any chance you could clearly explain to Daniel Berlin what's up, or do the
cleanup yourself?

best,
benjamin




-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at redhat dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Target Milestone|---                         |3.4


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


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

* [Bug debug/11114] GCC doesn't generate DW_TAG_namespace entries
  2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
                   ` (10 preceding siblings ...)
  2003-11-26  6:51 ` bkoz at gcc dot gnu dot org
@ 2003-12-17 16:30 ` jason at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2003-12-17 16:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jason at gcc dot gnu dot org  2003-12-17 15:29 -------
Fixed by

2003-12-08  Jason Merrill <jason@redhat.com>
            Daniel Berlin  <dberlin@dberlin.org>

        PR debug/11114
        Support namespaces in DWARF 2 output.
        * dwarf2out.c (gen_namespace_die): New function.
        (force_namespace_die, setup_namespace_context): New fns.
        (declare_in_namespace): New fn.
        (gen_decl_die): Call declare_in_namespace.  Handle namespaces.
        (dwarf2out_decl): Handle namespaces.
        (scope_die_for): Pass through a namespace scope.
        (class_scope_p): Rename to class_or_namespace_scope_p.
        (gen_subprogram_die, gen_variable_die): Adjust.
        (gen_struct_or_union_die): Always emit a declaration
        if context_die is a namespace.

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


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


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

end of thread, other threads:[~2003-12-17 15:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-06 18:56 [Bug debug/11114] New: GCC doesn't generate DW_TAG_namespace entries carlton@bactrian.org
2003-06-06 19:06 ` [Bug debug/11114] " pinskia@physics.uc.edu
2003-06-06 19:20 ` bangerth@dealii.org
2003-06-06 19:33 ` pinskia@physics.uc.edu
2003-06-06 19:43 ` carlton@bactrian.org
2003-06-06 19:47 ` pinskia@physics.uc.edu
2003-06-06 20:12 ` dberlin@dberlin.org
2003-06-06 21:32 ` carlton@bactrian.org
2003-06-12  0:04 ` carlton@bactrian.org
2003-08-06  3:50 ` pinskia at physics dot uc dot edu
2003-09-30 22:58 ` carlton at bactrian dot org
2003-11-26  6:51 ` bkoz at gcc dot gnu dot org
2003-12-17 16:30 ` jason 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).