From 56460a6114654c8abdc6fbc60df759623ff8ad7a Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 15 Feb 2002 19:06:33 +0000 Subject: [PATCH] 2002-02-15 Daniel Jacobowitz * gdb.texinfo: Document gdbserver ``--attach'' command. --- gdb/doc/ChangeLog | 4 ++++ gdb/doc/gdb.texinfo | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index f3a0fcfda7c..24ecae55956 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2002-02-15 Daniel Jacobowitz + + * gdb.texinfo: Document gdbserver ``--attach'' command. + 2002-02-07 Michael Snyder * gdb.texinfo (overlays): Change @var(_ovly_debug_event) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index ed1fbc4134a..e2bd248fe9e 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -9956,7 +9956,7 @@ strip the program if necessary to save space. @value{GDBN} on the host system does all the symbol handling. To use the server, you must tell it how to communicate with @value{GDBN}; -the name of your program; and the arguments for your program. The +the name of your program; and the arguments for your program. The usual syntax is: @smallexample @@ -9993,6 +9993,16 @@ conflicts with another service, @code{gdbserver} prints an error message and exits.} You must use the same port number with the host @value{GDBN} @code{target remote} command. +On some targets, @code{gdbserver} can also attach to running programs. +This is accomplished via the @code{--attach} argument. The syntax is: + +@smallexample +target> gdbserver @var{comm} --attach @var{pid} +@end smallexample + +@var{pid} is the process ID of a currently running process. It isn't necessary +to point @code{gdbserver} at a binary for the running process. + @item On the @value{GDBN} host machine, you need an unstripped copy of your program, since @value{GDBN} needs symbols and debugging information. Start up @value{GDBN} as usual, -- 2.30.2