aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-07-24 18:55:04 +0000
committerDaniel Jacobowitz <drow@false.org>2003-07-24 18:55:04 +0000
commitb1fe945553d0667aac48fb912b9f46d26bbcdcd9 (patch)
treef1deaa1ac63afbb824e39bd52f0a771e65bdbdfa
parentbcb27c9f96671686be29769fe918151ee96e9a84 (diff)
downloadfsf-binutils-gdb-b1fe945553d0667aac48fb912b9f46d26bbcdcd9.zip
fsf-binutils-gdb-b1fe945553d0667aac48fb912b9f46d26bbcdcd9.tar.gz
fsf-binutils-gdb-b1fe945553d0667aac48fb912b9f46d26bbcdcd9.tar.bz2
* gdb.texinfo (Server): Mention pidof.
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/gdb.texinfo13
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index b877983..d631020 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2003-07-24 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Server): Mention pidof.
+
2003-07-22 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Coding): Add -Wformat-nonliteral to -Werror
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index e6da37c..5db0bce 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -10746,6 +10746,19 @@ target> gdbserver @var{comm} --attach @var{pid}
@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.
+@pindex pidof
+@cindex attach to a program by name
+You can debug processes by name instead of process ID if your target has the
+@code{pidof} utility:
+
+@smallexample
+target> gdbserver @var{comm} --attach `pidof @var{PROGRAM}`
+@end smallexample
+
+In case more than one copy of @var{PROGRAM} is running, or @var{PROGRAM}
+has multiple threads, most versions of @code{pidof} support the
+@code{-s} option to only return the first process ID.
+
@item On the host machine,
connect to your target (@pxref{Connecting,,Connecting to a remote target}).
For TCP connections, you must start up @code{gdbserver} prior to using