Debugging a shared library through gdbserver

Daniel Jacobowitz drow@false.org
Wed Mar 15 04:16:00 GMT 2006


On Wed, Mar 15, 2006 at 11:44:01AM +0800, Nai-Hsien wrote:
> # load my executable file
> (gdb) add-symbol-file console
> add symbol table from file "console" at
> # load my shared library
> (gdb) add-symbol-file lib/libmylib.so.1.0.1
> add symbol table from file "lib/libmylib.so.1.0.1" at
> (gdb) b clih_login
> Breakpoint 1 at 0x10016238: file sysui.c, line 289.
> (gdb) c

Why are you doing any of this?  Please tell us where you saw
suggestions to use add-symbol-file in this way, so that we can correct
them.

Please take a look at "set solib-absolute-prefix".  Use that, and
the "file" command, before connecting to gdbserver and everything
should work automatically.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list