I needed a way to run a remote gdb session on an ARM system from an Linux PC.
Useful link:
https://sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver
Building gdb from source, configure with:
./configure --target=arm-linux-gnueabi
make
This leads to a gdb binary that runs on the host Linux PC but has an ARM target
architecture.
Similarly a gdbserver can be built for the target machine with:
./configure --host=arm-linux-gnueabi
make
On the target system we run gdbserver:
gdbserver :8888
Note this can be a stripped binary.
On the host PC we run gdb:
file
target remote :port
cont
No comments:
Post a Comment