From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29309 invoked by alias); 4 Apr 2013 18:11:26 -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 29299 invoked by uid 89); 4 Apr 2013 18:11:26 -0000 X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,SPF_SOFTFAIL autolearn=no version=3.3.1 Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 04 Apr 2013 18:11:22 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MKQ00300T3K5H00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Thu, 04 Apr 2013 21:10:52 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MKQ0039XT630Y50@a-mtaout21.012.net.il>; Thu, 04 Apr 2013 21:10:52 +0300 (IDT) Date: Fri, 05 Apr 2013 13:03:00 -0000 From: Eli Zaretskii Subject: Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1 In-reply-to: <20130404171439.GA20464@host2.jankratochvil.net> To: Jan Kratochvil Cc: tromey@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83obduf9ny.fsf@gnu.org> References: <83621x5x7d.fsf@gnu.org> <20130212162141.GA4287@host2.jankratochvil.net> <87pq05mdqc.fsf@fleche.redhat.com> <83lias3ybi.fsf@gnu.org> <20130219162741.GA4493@host2.jankratochvil.net> <838v6kp4gu.fsf@gnu.org> <20130220084353.GA801@host2.jankratochvil.net> <83fw0qokfw.fsf@gnu.org> <20130404160915.GA11966@host2.jankratochvil.net> <83sj36fcxb.fsf@gnu.org> <20130404171439.GA20464@host2.jankratochvil.net> X-SW-Source: 2013-04/txt/msg00112.txt.bz2 > Date: Thu, 4 Apr 2013 19:14:39 +0200 > From: Jan Kratochvil > Cc: tromey@redhat.com, gdb-patches@sourceware.org > > For gdbinit.5 it is true but in this patch I also added the gdb.1 and > gdbserver.1 conversion (so that no *.[0-9] files are in the repository > anymore). Ah, OK. So here goes: > +@c man begin SYNOPSIS gdb > +gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}] > +[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}] > +[@option{-b}@w{ }@var{bps}] > + [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}] > +[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}] > +[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}] > + [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}] > +@c man end Why are the options formatted in such a strange way -- some lines indented, others not? The original man page has them all aligned nicely after formatting: SYNOPSIS gdb [-help] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps] [-tty=dev] [-s symfile] [-e prog] [-se prog] [-c core] [-x file] [-ex cmd] [-d dir] [prog[core|procID]] > +You can use @value{GDBN} to debug programs written in C, C++, and Modula-2. ^^^ C@t{++} > +Fortran support will be added when a GNU Fortran compiler is ready. This list of languages is outdated, right? > +GDB is invoked with the shell command @code{gdb}. Once started, it reads ^^^ @value{GDBN} > +You can, instead, specify a process ID as a second argument, if you want > +to debug a running process: > + > +@smallexample > +gdb program 1234 > +@end smallexample Should we mention "gdb -p PID" as well? > +would attach @value{GDBN} to process @code{1234} (unless you also have a file > +named @file{1234}; @value{GDBN} does check for a core file first). @noindent before the "would attach" line. > +(which is ordinarily issued whenever a program running under @value{GDBN} control @noindent before this line. > +should give you access to the complete manual. Likewise here. > +@smallexample > +target> gdbserver COMM PROGRAM [ARGS ...] > +@end smallexample The words in CAPS should instead be in @var (and lower-case). > +@smallexample > +target> gdbserver /dev/com1 emacs foo.txt > +@end smallexample /dev/com1 should be in @file or @code. > +This tells @command{gdbserver} to debug emacs with an argument of foo.txt, and to > +communicate with @value{GDBN} via /dev/com1. @command{gdbserver} now waits patiently for the Likewise here. > +This says pretty much the same thing as the last example, except that we are > +going to communicate with the host @value{GDBN} via TCP. The `host:2345' argument means > +that we are expecting to see a TCP connection from `host' to local TCP port > +2345. (Currently, the `host' part is ignored.) You can choose any number you > +want for the port number as long as it does not conflict with any existing TCP > +ports on the target system. This same port number must be used in the host > +@value{GDBN}s `target remote' command, which will be described shortly. Note that if > +you chose a port number that conflicts with another service, @command{gdbserver} will > +print an error message and exit. `host', `target' etc. should be @code instead (and no quotes). > +On some targets, @command{gdbserver} can also attach to running programs. > +This is accomplished via the --attach argument. The syntax is: ^^^^^^^^ @option{--attach} > +@smallexample > +target> gdbserver COMM --attach PID > +@end smallexample @var instead of CAPS > +PID is the process ID of a currently running process. It isn't ^^^ @var{pid} > +--baud option if the serial line is running at anything except 9600 baud.) ^^^^^^ @option{--baud} > +Ie: `gdb TARGET-PROG', or `gdb --baud BAUD TARGET-PROG'. After that, the only ^^ > +new command you need to know about is `target remote'. It's argument is either > +a device name (usually a serial device, like `/dev/ttyb'), or a HOST:PORT > +descriptor. For example: "That is" ("Ie" doesn't look right at the beginning of a sentence). Also, @code instead of quotes around commands and /dev/ttyb. > +communicates with the server via serial line /dev/ttyb, and: And here (and elsewhere). > +@smallexample > +info gdb > +@end smallexample > + > +should give you access to the complete manual. @noindent OK with those changes. Thanks.