This is the mail archive of the gdb-patches@sourceware.org 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: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1


> Date: Thu, 4 Apr 2013 19:14:39 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> 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.


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