From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28543 invoked by alias); 6 Apr 2013 08:45:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28529 invoked by uid 89); 6 Apr 2013 08:45:00 -0000 X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL autolearn=no version=3.3.1 Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 06 Apr 2013 08:44:57 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MKT00F00S47LG00@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Sat, 06 Apr 2013 11:44:51 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MKT00FRRSARCW80@a-mtaout23.012.net.il>; Sat, 06 Apr 2013 11:44:51 +0300 (IDT) Date: Sat, 06 Apr 2013 15:49:00 -0000 From: Eli Zaretskii Subject: Re: [doc patch] gdbserver.1: Document all the options and --multi In-reply-to: <20130406064724.GA483@host2.jankratochvil.net> To: Jan Kratochvil Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83eheodp4o.fsf@gnu.org> References: <20130405181316.GA3675@host2.jankratochvil.net> <83ppy8es8n.fsf@gnu.org> <20130405202033.GA11174@host2.jankratochvil.net> <83k3ogdvzg.fsf@gnu.org> <20130406064724.GA483@host2.jankratochvil.net> X-SW-Source: 2013-04/txt/msg00153.txt.bz2 > Date: Sat, 6 Apr 2013 08:47:24 +0200 > From: Jan Kratochvil > 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: