Finally, there's a program called gdbserver, which comes with GDB. If I write a remote stub, do I need this program? Where should it be run? Where should my program be run? Since the stub is a c file, but lacks of a main function, how do I compile it?
At least this I can answer. In short, you need to call gdbserver on your target machine in order to do remote debugging from your workstation. The first Google match for "using gdbserver" reveals this:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gdb/server.html HTH Martin