This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Generate namespace info for dwarf2


On Sun, 30 Nov 2003 11:36:51 -0500 (EST), Daniel Berlin <dberlin@dberlin.org> wrote:

> Here's an updated namespace patch that incorporates Jason's comments from
> last year. :P

Thanks.  Looking up those comments, I noticed some comments from 2001, as
well:

  http://gcc.gnu.org/ml/gcc-patches/2001-11/msg00438.html

Would you mind adding -gdwarf-3, as discussed?

> -class_scope_p (dw_die_ref context_die)
> +class_or_namespace_scope_p (dw_die_ref context_die)

So we're going to declare functions inside namespaces and define them at CU
scope, like we do for classes?  Seems reasonable, especially for
compatibility with older debuggers, but please mention that in a comment
somewhere.

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

> +      /* Anonymous namespaces shouldn't have a DW_AT_name.  */
> +      if (DECL_NAME (decl) == anonymous_namespace_name)
> +	add_src_coords_attributes (namespace_die, decl);

Hmm, I don't like moving anonymous_namespace_name to tree.c.  I'm testing a
patch to leave DECL_NAME null for the anonymous namespace.

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

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]