This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdbserver and the gdb "load" command for remote target
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Mike Roman <mikeroman694 at yahoo dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 8 Oct 2002 14:16:23 -0400
- Subject: Re: gdbserver and the gdb "load" command for remote target
- References: <20021008175759.92112.qmail@web13113.mail.yahoo.com>
On Tue, Oct 08, 2002 at 10:57:59AM -0700, Mike Roman wrote:
> I have one problem. I want to be able to dynamically
> be able to load new test program to the target using
> gdb. Assuming I don't have the executable for the test
> program already stored in the target (for example, I
> want to test a new testprogram#2), can I use gdb to
> transfer it to the target and debug it? And after
> loading it, what is the command to use to instruct the
> gdbserver to run this program?
No, you can't. gdbserver does not support this. It's not practical
to, in the presence of things like dynamic linking.
> When invoking the server program, it requires the name
> of the program to debug, and it seems that you can not
> at later time try to load (or change to) a different
> program than the originally given to gdbserver? If
> this is true, then the gdb "load" command is not very
> useful.
Right. Using load is not useful for server targets.
Wolfgang posted patches to support a daemon mode for gdbserver that
would allow things like this, but he never pursued copyright assignment
for them. So they went nowhere.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer