I am trying to do remote debugging from a host machine to c6678 target.(RUNNING Linux-c6x) . On the target I ran gdbserver using the command: "gdbserver program#1 192.168.1.1:2345". program#1 is the program that I have transferred to the target using FTP(or NFS server). 192.168.1.1 is the IP address of c6678 target . On the host I ran gdb. I used the "remote 192.168.1.2:2345" command to connect to the target and I was able to set breakpoints and everything went well.
My problem is as follows:
How to dynamically load the test program to the target using gdb.? for example, I want to test a new tprogram#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 sections of 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 "c" and "file" commands, and I was not successful to debug testprogram#2 remotely. The returning message is: "Program terminated with signal SIGBUS,Bus error" and then the program exited.
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,