[PATCH]: Generate namespace info for dwarf2

Jason Merrill jason@redhat.com
Mon Dec 1 20:46:00 GMT 2003


On Mon, 1 Dec 2003 14:42:49 -0500, Daniel Berlin <dberlin@dberlin.org> wrote:

> On Dec 1, 2003, at 1:59 PM, Jason Merrill wrote:
>
>> Would you mind adding -gdwarf-3, as discussed?
>
> When this was further discussed, RTH pointed out that we output dwarf-3
> right now anyway (address ranges or some such), so there was little point
> in adding a -gdwarf-3, in addition to the fact that nobody supports "only
> dwarf2" that anyone is aware of.

I think that the namespace stuff stands a good chance of confusing
debuggers.  But since people say that gdb 5.3 and up will probably be fine,
this is a low priority.

>> Looks like you still need to handle splitting classes like you do
>> functions and variables.

> We don't split classes now (IE we don't differentiate between the
> declaration and definition of a class, we only ever output definitions),
> even when nested, so i'm not sure what you mean.

We generate AT_declaration/AT_specification pairs for

  struct A {
    struct B;
  };

  struct A::B {
    int i;
  };

I think doing this for classes in namespaces would help to avoid problems
with older debuggers.

>> Have you (or Benjamin) run the gdb regression tests with this patch?

> I haven't, though i did some trivial gdb testing to make sure it worked. :P

Please do.  Any change to the debug backends must also pass the gdb
regression tests.

Jason



More information about the Gcc-patches mailing list