This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: .n suffixes for function names in stabs debug info (GCC 3.1-based compiler)


> I believe that GCC is wrong, but you are pointing at the wrong error. 
> See below a bit.

Thank you for this well documented answer.

> According to that, your example:
> > .stabs  "inside.0:f(1,1)=(1,1),inside.0,main",36,0,4,inside.0
> 
> should be:
> > .stabs  "inside.0:f(1,1)=(1,1),inside,main",36,0,4,inside.0

Should this be corrected in GCC? There seems to be an easy fix:
Replace DECL_ASSEMBER_NAME by DECL_NAME in

      /* For a nested function, when that function is compiled,
         mention the containing function name
         as well as (since dbx wants it) our own assembler-name.  */
      if (context != 0)
        fprintf (asmfile, ",%s,%s",
                 IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)),
                 IDENTIFIER_POINTER (DECL_NAME (context)));

I can submit a patch if this is worth it.

> For your information, Jim Blandy and others are working on greatly
> improving GDB's support for nested scopes right now; this may fall out
> of that, especially for the DWARF-2 case.

Thanks, I will keep an eye on their progress. Note that I like DWARF2
but I am also interested in stabs for some of our platforms like AiX.

-- 
Joel


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