|
From: | Mike Roman |
Subject: | Help with gdbserver and the gdb "load" command |
Date: | Tue, 8 Oct 2002 10:10:04 -0700 (PDT) |
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" 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 the 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.
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.
I hope that my question is clear.
Thank you for any help,
Mike
[Prev in Thread] | Current Thread | [Next in Thread] |