* gdbserver and the gdb "load" command for remote target
@ 2002-10-08 10:58 Mike Roman
2002-10-08 11:15 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Mike Roman @ 2002-10-08 10:58 UTC (permalink / raw)
To: gdb; +Cc: mikeroman694
Hi All,
I have question on how to use the gdb "load" command
with the gdbserver for remote target debugging:
I am trying to do remote debugging from a host machine
to a x86 target. Both of them are running the latest
version of Linux. On the target I ran gdbserver using
the command: "gdbserver testprogram#1
192.168.1.1:2345".
testprogram#1 is the program that I have transferred
to the target using FTP. 192.168.1.1 is the IP address
of the host. On the host I ran gdb. I used the
"extended remote 192.168.1.2:2345" gdb command to
connect to the target and I was able to set
breakpoints and everything went well.
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?
I have used the "load" command with in gdb to load
testprogram#2 to the test target, and gdb seemed to be
loading/transferring the file, however once the "load"
command finished executing, I don't know how to tell
the gdbserver to dynamically run testprogram#2.
I used the "run" and "file" commands, and I was not
successful to debug testprogram#2 remotely. When I
type "run" gdb command in the host, the gdbserver will
run testprogram#1, and not testprogram#2.
Gdbserver only knows about the testprogram#1, and I
don't know how to tell it to run testprogram#2 which I
loaded to the target using the "load" command.
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.
I hope that my question is clear.
Thank you for any help,
Best regards,
Mike
__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gdbserver and the gdb "load" command for remote target
2002-10-08 10:58 gdbserver and the gdb "load" command for remote target Mike Roman
@ 2002-10-08 11:15 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2002-10-08 11:15 UTC (permalink / raw)
To: Mike Roman; +Cc: gdb
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-08 18:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-08 10:58 gdbserver and the gdb "load" command for remote target Mike Roman
2002-10-08 11:15 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox