mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
* gdb.texinfo (Server): Mention pidof.
This commit is contained in:
@ -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>
|
2003-07-22 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* gdbint.texinfo (Coding): Add -Wformat-nonliteral to -Werror
|
* gdbint.texinfo (Coding): Add -Wformat-nonliteral to -Werror
|
||||||
|
@ -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
|
@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.
|
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,
|
@item On the host machine,
|
||||||
connect to your target (@pxref{Connecting,,Connecting to a remote target}).
|
connect to your target (@pxref{Connecting,,Connecting to a remote target}).
|
||||||
For TCP connections, you must start up @code{gdbserver} prior to using
|
For TCP connections, you must start up @code{gdbserver} prior to using
|
||||||
|
Reference in New Issue
Block a user