This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Loading shared libraries
- To: Stephen Smith <ischis2 at home dot com>, GDB <gdb at sources dot redhat dot com>
- Subject: Re: Loading shared libraries
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Tue, 10 Apr 2001 15:31:50 -0700
- Cc: Andrew Cagney <ac131313 at cygnus dot com>, Kevin Buettner <kevinb at cygnus dot com>, Michael Elizabeth Chastain <chastain at cygnus dot com>
- References: <3AD346AD.4D432A65@home.com>
On Apr 10, 10:45am, Stephen Smith wrote:
> I have a shared library liblib1.so that I want to load at address 0x4020000.
>
> If I call add_symbol_file_command( "liblib1.so 0x4020000", 0 ), the
> program starts running and gdb can't take control of it - I haven't
> figured out why yet.
I don't have much experience with this function, but it seems to me
that you ought to be using a different mechanism.
> How would you suggest loading the library? BTW, I don't want to do
> it at the console but rather in the program.
Just to be clear, we're talking about loading the symbols associated
with a shared library, right?
If so, I would expect that solib.c would handle this for you assuming
that you have the rest of the solib backend working correctly. (See
symbol_add_stub().)
Kevin