diff options
Diffstat (limited to 'contrib/gdb/gdb/gdbserver/README')
-rw-r--r-- | contrib/gdb/gdb/gdbserver/README | 49 |
1 files changed, 30 insertions, 19 deletions
diff --git a/contrib/gdb/gdb/gdbserver/README b/contrib/gdb/gdb/gdbserver/README index 2281bf6..71887ca 100644 --- a/contrib/gdb/gdb/gdbserver/README +++ b/contrib/gdb/gdb/gdbserver/README @@ -44,6 +44,14 @@ GDBs `target remote' command, which will be described shortly. Note that if you chose a port number that conflicts with another service, gdbserver will print an error message and exit. +On some targets, gdbserver can also attach to running programs. This is +accomplished via the --attach argument. The syntax is: + + target> gdbserver COMM --attach PID + +PID is the process ID of a currently running process. It isn't necessary +to point gdbserver at a binary for the running process. + Usage (host side): You need an unstripped copy of the target program on your host system, since @@ -67,7 +75,16 @@ TCP connections, you must start up gdbserver prior to using the `target remote' command, otherwise you may get an error that looks something like `Connection refused'. -Building: +Building gdbserver: + +The supported targets as of February 2002 are: + arm-*-linux-gnu + i386-*-linux-gnu + ia64-*-linux-gnu + m68k-*-linux-gnu + mips-*-linux-gnu + powerpc-*-linux-gnu + sh-*-linux-gnu Configuring gdbserver you should specify the same machine for host and target (which are the machine that gdbserver is going to run on. This @@ -76,27 +93,21 @@ gdbserver automatically as part of building a whole tree of tools does not currently work if cross-compilation is involved (we don't get the right CC in the Makefile, to start with)). -gdbserver should work on sparc-sun-sunos4* or Lynx. The following -instructions pertain to Lynx. To build the server for Lynx, make a -new copy of the distribution onto a disk that is NFS shared with the -Lynx system. Lets say that's in a directory called xyzzy. Then, -follow these steps under the host system: - - 1) cd xyzzy/gdb/gdbserver - 2) ../../configure i386-none-lynx - -When that completes, do the following on the Lynx system: - - 3) cd xyzzy/gdb/gdbserver - 4) make CC=gcc +Building gdbserver for your target is very straightforward. If you build +GDB natively on a target which gdbserver supports, it will be built +automatically when you build GDB. You can also build just gdbserver: -It should build with only a minor complaint about NULL being redefined. That's -a LynxOS problem, and can be ignored. + % mkdir obj + % cd obj + % path-to-gdbserver-sources/configure + % make -It's also possible that you may have a cross-compiler to Lynx. In that case, -you can skip the stuff about NFS. You would replace steps 3 & 4 with: +If you prefer to cross-compile to your target, then you can also build +gdbserver that way. In a Bourne shell, for example: - make CC=lynx-target-compiler... + % export CC=your-cross-compiler + % path-to-gdbserver-sources/configure your-target-name + % make Using GDBreplay: |