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]

question about method naming


I compiled the appended code with `gcj -g'.  I'm using the trunk cvs
gcj.  Then I ran gdb on the program.

If I type:

    b x.main

gdb tells me that there is no such method.

I tracked the problem down to linespec.c:find_methods().

Here we end up in the loop, and method_name for the 0th method is:

    (gdb) p method_name
    $27 = 0x83e9a52 "x.main(java.lang.String[])"

So of course we fail to match this against "main".

Is this a gdb bug or a gcj bug?  Or just a disagreement?

I'm guessing that method_name should not be fully qualified.
Is that correct?

Tom

public class x
{
  public static void main (String[] args)
  {
    char c = args[0].charAt(0);
    System.out.println(c);
  }
}


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