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


On Mon, May 06, 2002 at 05:03:19PM -0600, Tom Tromey wrote:
> >>>>> "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[])'?

No, `main'.  The type should not be there at all.  Breaking on
`x.main(java.lang.String[])' or something similar should still work,
because the mangled name is in scope...

> 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.

That may be why.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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