wiki:gdb_remote

Version 1 (modified by admin, 13 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.

Attachments (3)

Download all attachments as: .zip