Version 2 (modified by 14 years ago) (diff) | ,
---|
GDB remote debugging
gdbserver binary
I compiled the attached gdbserver binary using the arm-linux-gnueabi toolchain using the -static link flag.
It can be used without any extra software on the arm device.
Copy it to the phone using:
adb push gdbserver /data/local
Starting gdbserver
Start debugging your remote executable using:
/data/local/gdbserver :3050 ./gdbtst
Assuming the the file gdbtest is the executable that you want to debug and the executable is in your current directory
Redirect a port
On your local PC use:
adb forward tcp:1234 tcp:3050
to forward the local port 1234 to the remote port 3050
Debug
Start the debugger using:
arm-linux-gnueabi-gdb ./gdbtst
And the in gdb use
target remote :1234
to start the remote debug session. Then do something like:
break main continue
to step through the program.
Using Eclipse
The goal of this exercise is to use the Eclipse IDE for remote debugging.
Attachments (3)
-
gdbserver (1.2 MB) - added by 14 years ago.
8eb43afdb81c5486600af655c349f26e gdbserver
-
gdbreplay (571.6 KB) - added by 14 years ago.
ea1aa320e52773431cde4e4d4ad09131 gdbreplay
-
Makefile (414 bytes) - added by 14 years ago.
gdbtst sample Makefile
Download all attachments as: .zip