This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gdb with gcj
- From: Andrew Haley <aph at redhat dot com>
- To: Vladimir Leven <vladimirl at wrx-ca dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 6 May 2004 16:57:54 +0100
- Subject: Re: gdb with gcj
- References: <409A59A4.9030706@wrx-ca.com>
Vladimir Leven writes:
> >Vladimir Leven writes:
> > > (gdb) run
> > > Starting program: /home/levinv/dev/GcjDebugTest/a.out
> > > [New Thread 16384 (LWP 2154)]
> > > [New Thread 32769 (LWP 2155)]
> > > [New Thread 16386 (LWP 2156)]
> > > [Switching to Thread 16384 (LWP 2154)]
> > >
> > > Breakpoint 1, test.main(java.lang.String[]) (args=@1003bfe8) at test.java:3
> > > 3 test runme = new test();
> > > Current language: auto; currently java
> > > (gdb) step
> < > 0x30024f60 in __cache_line_size () from /lib/ld.so.1
> > > [As you can see, I cannot even step through the program without it
> > > leaving Java mode. On Friday I was able to do that (not sure why), but
> > > no luck today. ]
> >
> > You're stepping into the shared library loader to fixup a PLT entry
> > There's nothing weird or unexpected about this.
> >
> > When you leave the shared library loader, you should get back to the
> > main context.
>
> After the last "step" command in the listing below, the debugger
> waits for a long time and eventually just executes the rest of the
> program without stoppping anywhere else along the way. Is there
> something I should be doing to get it to go to the next line of
> Java code?
Usually, you can just use "finish" in the fixup handler. But I
wouldn't attempt any of this without up-to-date versions of gcj and
gdb.
Andrew.