0

I'm cross-compiling for an embedded linux target and debugging using gdbserver. On the target I run gdbserver :2000 /home/root/demo and on the host I run gdb-multiarch followed by target remote 10.24.0.236:2000 to connect to the server (as per this tutorial).

Everytime I recompile my program I kill the program from the gdb client, recompile, restart the server and run target remote 10.24.0.236:2000 again.

Must I restart the server each time I recompile?

William
  • 191
  • 8

1 Answers1

0

The answer was to use "multi process mode" by running target extended-remote 10.24.0.236:2000 instead of target remote 10.24.0.236:2000.

Now running kill from the host stops the program without stopping the server. The program can now be recompiled. Running run from the host starts the new program (assuming it has the same filename as before).

I found the answer here. I've left my question up because I interpreted the original question as asking how to restart the same program (without necessarily loading a new version from disk).

William
  • 191
  • 8