From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 351 invoked by alias); 8 Oct 2002 17:58:02 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 322 invoked from network); 8 Oct 2002 17:58:00 -0000 Received: from unknown (HELO web13113.mail.yahoo.com) (216.136.174.181) by sources.redhat.com with SMTP; 8 Oct 2002 17:58:00 -0000 Message-ID: <20021008175759.92112.qmail@web13113.mail.yahoo.com> Received: from [63.96.78.20] by web13113.mail.yahoo.com via HTTP; Tue, 08 Oct 2002 10:57:59 PDT Date: Tue, 08 Oct 2002 10:58:00 -0000 From: Mike Roman Subject: gdbserver and the gdb "load" command for remote target To: gdb@sources.redhat.com Cc: mikeroman694@yahoo.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-10/txt/msg00074.txt.bz2 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