Discussion:
[Gumstix-users] gdbserver
kris duff
2017-02-02 16:26:54 UTC
Permalink
Hello, anyone has been successfull compiling and using gdbserver to debug remotely a soft on the gumstix ?
I am using overo COM with yocto dizzy.
Thank you
Regards
Patrick Maheral
2017-02-02 22:01:50 UTC
Permalink
Post by kris duff
Hello, anyone has been successfull compiling and using gdbserver to
debug remotely a soft on the gumstix ?
I am using overo COM with yocto dizzy.
Thank you
Regards
Hi kris,

Although I'm using a much older set of tools, here is what I do to
remotely debug code on gumstix boards:


- Make sure you are compiling with debugging enabled, and that the
local copy of the file is not stripped. I use the following
compiler flag in my Makefile:

-ggdb3

- On the target, I run:
gdbserver --attach :10000 <PID>
where <PID> is the process ID of the running app to be debugged.

- On dev machine, create a ".gdbinit" file in the build (source)
directory containing the following two lines:

set sysroot /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi
target extended-remote 10.10.10.215:10000

Note: my gumstix has IP address 10.10.10.215 in this case.

- On dev machine, run gdb from the build directory (where the
.gdbinit file is located):
arm-angstrom-linux-gnueabi-gdb <binFile>
where <binFile> is the local copy of the app to be debugged.

Hope this helps.

Patrick

Loading...