[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To debug a program running on another machine (the debugging target machine), you must first arrange for all the usual prerequisites for the program to run by itself. For example, for a C program, you need:
The next step is to arrange for your program to use a serial port to communicate with the machine where GDB is running (the host machine). In general terms, the scheme looks like this:
On certain remote targets, you can use an auxiliary program
gdbserver
instead of linking a stub into your program.
See section Using the gdbserver
program, for details.
The debugging stub is specific to the architecture of the remote machine; for example, use `sparc-stub.c' to debug programs on SPARC boards.
These working remote stubs are distributed with GDB:
i386-stub.c
m68k-stub.c
sh-stub.c
sparc-stub.c
sparcl-stub.c
The `README' file in the GDB distribution may list other recently added stubs.
13.4.1.1 What the stub can do for you 13.4.1.2 What you must do for the stub 13.4.1.3 Putting it all together 13.4.1.4 Communication protocol Definition of the communication protocol 13.4.1.5 Using the gdbserver
programUsing the `gdbserver' program 13.4.1.6 Using the gdbserve.nlm
programUsing the `gdbserve.nlm' program
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |