another gdb question
Nic Ferrier
nferrier@tapsellferrier.co.uk
Sat Nov 16 06:20:00 GMT 2002
Andrew Haley <aph@redhat.com> writes:
> Nic Ferrier writes:
> > Getting paperclips to work natively is like pulling teeth.
> >
> > Paperclips uses gnujaxp: compiled natively (either from byte code or
> > source) it gives an IO error. It's the sort of error that needs
> > tracing with the debugger.
> >
> > I can load paperclips in the debugger easily, but when I try to set a
> > break point I get all sorts of problems.
> >
> > I seem to be able to complete a class name from the paperclips binary
> > (but not from the gnujaxp library).
> >
> > I cannot seem to complete a method name, or get GDB to accept it in
> > any form.
>
> You can't set a breakpoint in a DSO until it has been loaded. If your
> executable is linked against the DSO you should be able to set a
> breakpoint once main has started.
>
> So:
>
> gdb> b foo
> gdb> r
> ... break
> gdb> b 'gnu::jaxp::whatever'
>
> Also see 'info share' to see if the DSO has been loaded.
Well, ok... but that doesn't change the fact that I should be able to
set one in the debugging target.
For example:
$ gcj ... -shared -o gnujaxp
$ gcj ... --main gnu.paperclips.paperclips -o paperclips
$ export LD_LIBRARY_PATH=...:./
so now we have a shared library gnujaxp and paperclips as an
executable with it's "main" class as gnu.paperclips.paperclips.
So now I do:
$ gdb ./paperclips
gdb> b gnu.paperclips.paperclips.main
and I get the same error, namely this:
the class gnu.paperclips.paperclips does not have any method named main
Hint: try 'gnu.paperclips.paperclips.main<TAB> or 'gnu.paperclips.paperclips.main<ESC-?>
Putting in quotes doesn't work.
Using the C++ scoping operator doesn't work.
Setting the language to C++ and using the C++ scoping operator
doesn't work.
It should do, shouldn't it?
Nic
More information about the Java
mailing list