Remote Debugging with GDB

As Linux becomes more popular with embedded system developers, it's becoming increasingly important for gdb to be able to do remote debugging of an embedded Linux target. Fortunately, as of version 5.3, gdb includes a gdbserver that works even for multithreaded programs.

This feature was added on 11 June 2002 by Daniel Jacobowitz.

I have tested this feature on x86 and ppc405 linux, and it works -- from an x86 Debian system, I successfully debugged multithreaded programs running on remote x86 and ppc405 Linux boxes. Here's the approximate recipe I use to build a newer gdb for ppc405 on top of Hard Hat 2.0. This recipe makes use of the --with-solib-absolute-prefix option I added to gdb's configure in July 2002.

There are a few gotchas:

Hats off to Daniel Jacobowitz of Montavista Software for getting this feature in, and for his active support of gdb on the gdb mailing list.

Related Web Pages

 


Last update: 4 Sept 2002
Copyright 2002 Dan Kegel
[Back to www.kegel.com]