This is the mail archive of the gdb@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: question about method naming


>>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:

Tom> If I type:
Tom> b x.main
Tom> gdb tells me that there is no such method.

Daniel> Are you working on a very current gcj?  I.E. one that defaults
Daniel> to DWARF-2 output?  I observe the same thing in 3.0.4 with
Daniel> -gdwarf-2, but not with -gstabs+.

Yes.  I'm using the trunk cvs gcj.

Daniel> In this version, the stabs debug info claims that 'class x'
Daniel> has a member function 'main'.  In DWARF-2 it claims that
Daniel> 'class x' has a member function 'x.main(java.lang.String[])'.
Daniel> If this is still the case in your compiler (check readelf -w
Daniel> output, search for a DW_TAG_subprogram whose name contains
Daniel> main) then I believe it is a gcj bug.

Ok.  What is the correct output?  `main(java.lang.String[])'?

I wonder if this was done because of the lack of namespace support in
gdb?  In this case that would be strange (`x' is a class, not a
namespace).  This is something I'll note in the bug report.

Daniel> Also amusing:
Daniel>  <2><1c4>: Abbrev Number: 6 (DW_TAG_subprogram)
Daniel>      DW_AT_external    : 1
Daniel>      DW_AT_name        : ()
Daniel>      DW_AT_MIPS_linkage_name: _ZN1xC1Ev
Daniel>      DW_AT_artificial  : 1
Daniel>      DW_AT_declaration : 1
Daniel> The constructor's name is obviously wrong...

I saw this too.

Thanks for your insight,
Tom


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