From: Eli Zaretskii <eliz@gnu.org>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [doc patch] gdbserver.1: Document all the options and --multi
Date: Sat, 06 Apr 2013 15:49:00 -0000 [thread overview]
Message-ID: <83eheodp4o.fsf@gnu.org> (raw)
In-Reply-To: <20130406064724.GA483@host2.jankratochvil.net>
> Date: Sat, 6 Apr 2013 08:47:24 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb-patches@sourceware.org
>
> > This is OK, but perhaps will be even better if you describe the last
> > mode first. Then you can put the description of @var{comm} there, and
> > in the other 2 modes say something like "In addition to @var{comm} as
> > above, supply ...".
>
> I do not think it would be good, (1) the --multi mode is IMO an unusual one,
> a special case and (2) I also tried to generally keep the "gdbserver --help"
> output order.
Then let me suggest something specific:
There are three different modes for invoking @command{gdbserver}:
@itemize @bullet
@item
Debug a specific program specified by its program name:
@smallexample
gdbserver @var{comm} @var{prog} [@var{args}@dots{}]
@end smallexample
The @var{comm} parameter specifies how should the server communicate
with @value{GDBN}; it is either a device name (to use a serial line),
a TCP port number (@code{:1234}), or @code{-} or @code{stdio} to use
stdin/stdout of @code{gdbserver}. Specify the name of the program to
debug in @var{prog}. Any remaining arguments will be passed to the
program verbatim. When the program exits, @value{GDBN} will close the
connection, and @code{gdbserver} will exit.
@item
Debug a specific program by specifying the process ID of a running
program:
@smallexample
gdbserver --attach @var{comm} @var{pid}
@end smallexample
The @var{comm} parameter is as described above. Supply the process ID
of a running program in @var{pid}; @value{GDBN} will do everything
else. Like with the previous mode, when the process @var{pid} exits,
@value{GDBN} will close the connection, and @code{gdbserver} will exit.
@item
Multi-process mode -- debug more than one program/process:
@smallexample
gdbserver --multi @var{comm}
@end smallexample
In this mode, @value{GDBN} can instruct @command{gdbserver} which
command(s) to run. Unlike the other 2 modes, @value{GDBN} will not
close the connection when a process being debugged exits, so you can
debug several processes in the same session.
@end itemize
In each of the modes you may specify these options:
next prev parent reply other threads:[~2013-04-06 8:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-05 19:33 Jan Kratochvil
2013-04-05 20:01 ` Eli Zaretskii
2013-04-06 9:31 ` Jan Kratochvil
2013-04-06 13:56 ` Eli Zaretskii
2013-04-06 15:04 ` Jan Kratochvil
2013-04-06 15:49 ` Eli Zaretskii [this message]
2013-04-06 15:52 ` [commit] " Jan Kratochvil
2013-04-06 19:26 ` Eli Zaretskii
2013-04-06 21:45 ` Jan Kratochvil
2013-04-07 6:21 ` [commit#2] " Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83eheodp4o.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox