This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Debugging a shared library through gdbserver
- From: Daniel Jacobowitz <drow at false dot org>
- To: Nai-Hsien <dennis at loop dot com dot tw>
- Cc: gdb at sourceware dot org
- Date: Tue, 14 Mar 2006 22:45:55 -0500
- Subject: Re: Debugging a shared library through gdbserver
- References: <063201c647e2$b2c39160$0102000a@loop.com.tw>
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