This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Mention pidof in gdbserver documentation


On Sun, Jul 13, 2003 at 11:22:37PM +0200, Eli Zaretskii wrote:
> [Sorry for a late response.]
> 
> > Date: Sun, 29 Jun 2003 17:31:41 -0400
> > From: Daniel Jacobowitz <drow@mvista.com>
> > 
> > Since it was asked... this describes how to attach to a program by name. 
> > OK?
> 
> Yes.  However, please add a ``@pindex pidof'' and also some @cindex
> entry with a text like "attach to a program by name".
> 
> Thanks.
> 

Thanks, this is what I checked in.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2003-07-24  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.texinfo (Server): Mention pidof.

Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.169
diff -u -p -r1.169 gdb.texinfo
--- gdb.texinfo	28 Jun 2003 16:19:06 -0000	1.169
+++ gdb.texinfo	24 Jul 2003 18:53:14 -0000
@@ -10746,6 +10746,19 @@ target> gdbserver @var{comm} --attach @v
 @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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]