When using gdbserver, you have already "run" the program when you start gdbserver. From your gdb session, you need to "c"ontinue after setting any desired breakpoints or other conditions.
To restart, "k"ill the debugged session, then repeat the gdbserver
and target remote commands.
Rich
On 12/14/07, marcolamonato <> wrote:
Hi all,
I'm having some issues trying to remote debug my programs inside a TS-
7250 board. I'm currently working on a WinXp pc with Cygwin connected
through tcp to the TS-7250.
Let me tell you what I did so far:
1) I updated my cygwin version and I completely installed the "dev"
set of resources (ddd, gdb, make,… are all in it), anyway my gcc is
still the one in the "/opt" path from TS (I made an alias for it)
2) I configured the gdbserver compilation to be done with the arm-
unknown-linux-gnu-gcc (the one that has the alias to gcc…) and I
compiled it with the "make" command, no issue apparently
3) After starting cygwin, I just need to type in "startx" and, in the
following bash, "ddd my_program" and I'm ready to go with gdb handled
by ddd, both as a graphical interface or with a command line
4) When I first started "gdbserver" on my TS-7250 I had the
error "./gdbserver: error while loading shared libraries:
libthread_db.so.1: cannot open shared object file: No such file or
directory"
5) To solve this I added the file of my
pc "e:\cygwin\opt\crosstool\gcc-3.3.4-glibc-2.3.2\arm-unknown-linux-
gnu\arm-unknown-linux-gnu\lib\libthread_db-1.0.so" into the "/lib" of
my TS-7250 and I created a symbolic link with "ln –
s /lib/libthread_db-1.0.so /lib/libthread_db.so.1". Now the gdbserver
works, but I'm not sure if I've done something correct or not,
moreover I linked that library, but my program uses the pthread
libraries actually and to have it running properly I had to insert
(in a previous stage) the "libpthread-0.10.so" file into "/lib" and
make the link "ln –s /lib/ libpthread-0.10.so /lib/libpthread.so.0"
6) Now I'm trying to remote debug from the WinXp host my program
which is inside the TS-7250. I can with ddd or directly with gdb (in
both cases inside cygwin…), but I can have this setup to work. I mean
I'm able to connect them, on the target I call "./gdbserver
192.168.0.100:9737 my_program" and on the host I call "gdb
my_program" and then "target remote 192.168.0.58:9737". What happens
is that on the target side I read:
"Process splittex_ok created; pid = 120
Listening on port 9737
Remote debugging from host 192.168.0.100"
While on the host side:
"Remote debugging using 192.168.0.58:9737
0x00000000 in ?? ()"
If I now try to run the program writing "run" on the host I get:
" Starting program: /home/Marco/my_program
Error creating process /home/Marco/my_file, (error 193)"
and on the target appears:
"Killing inferior" and the gdbserver gets destroyed
I really don't know how to get through this issue… any idea?
Thanks again for your help!
Marco
-- Rich Wilson 425-337-7129
__._,_.___
__,_._,___
|