This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
confusion in the `b' command
- From: Tom Tromey <tromey at redhat dot com>
- To: Gdb List <gdb at sources dot redhat dot com>
- Date: 22 Apr 2002 13:43:10 -0600
- Subject: confusion in the `b' command
- Reply-to: tromey at redhat dot com
I'm using x86 Red Hat Linux 6.2.
Compile the appended java program (probably any program will do) like
this:
gcj --main=x -g -o x x.java
Now debug it with the latest cvs trunk gdb:
gdb -nw ./x
Now try to set a breakpoint like this:
b 'x.main<TAB>
gdb just beeps at me.
So close the quotes and press enter:
(gdb) b 'x.main'
the class x does not have any method named main
Hint: try 'x.main'<TAB> or 'x.main'<ESC-?>
(Note leading single quote.)
Now try again:
b 'x.main<TAB>
I get:
(gdb) b 'x.main(java.lang.String[])'
I think this must be a bug. I expected:
* First, that TAB would work correctly the first time.
* Second, that b 'x.main' would work anyway, since it is unambiguous.
(I only found the first bug because gdb has basically been forcing
me to hit TAB all along...)
Tom
import java.net.*;
public class x
{
public static void main (String[] args) throws Throwable
{
String x = "core:/zardoz.properties";
URL u = new URL (x);
System.out.println (u.getFile ());
}
}