Fix makeinfo warnings in gdb.texinfo and python.texi docs

Message ID CAMCMYR5PiSJMh+P9_5n7doKyKXkwHHdUMg=SDeDq6h7gV9=hGQ@mail.gmail.com
State New
Headers show
Series
  • Fix makeinfo warnings in gdb.texinfo and python.texi docs
Related show

Commit Message

Rogerio Alves via Gdb-patches April 11, 2020, 6:36 p.m.
Building gdb-9.1 on a system that has an older version of makeinfo
(4.8) shows the following warnings:

-----------------
make[4]: Entering directory '/home/tester/gdb-9.1/build/gdb/doc'
makeinfo --split-size=5000000 --split-size=5000000   -I
../../../gdb/doc/../../readline/readline/doc -I ../../../gdb/doc/../mi
-I ../../../gdb/doc \
    -o gdb.info ../../../gdb/doc/gdb.texinfo
../../../gdb/doc/gdb.texinfo:21867: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21867: warning: unlikely character ] in @var.
../../../gdb/doc/gdb.texinfo:21868: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21868: warning: unlikely character ] in @var.
../../../gdb/doc/gdb.texinfo:21869: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21869: warning: unlikely character ] in @var.
../../../gdb/doc/gdb.texinfo:21872: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21872: warning: unlikely character ] in @var.
../../../gdb/doc/gdb.texinfo:21874: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21874: warning: unlikely character ] in @var.
../../../gdb/doc/gdb.texinfo:21876: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21876: warning: unlikely character ] in @var.
../../../gdb/doc/gdb.texinfo:21879: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21879: warning: unlikely character ] in @var.
../../../gdb/doc/gdb.texinfo:21931: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21931: warning: unlikely character ] in @var.
../../../gdb/doc/gdb.texinfo:21933: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21933: warning: unlikely character ] in @var.
../../../gdb/doc/gdb.texinfo:21936: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21936: warning: unlikely character ] in @var.
../../../gdb/doc/gdb.texinfo:21939: warning: unlikely character [ in @var.
../../../gdb/doc/gdb.texinfo:21939: warning: unlikely character ] in @var.
../../../gdb/doc//python.texi:3297: warning: `.' or `,' must follow
@xref, not `A'.
make[4]: Leaving directory '/home/tester/gdb-9.1/build/gdb/doc'
-----------------

These are thrown by expressions like `@var{[host]}`, intended to
produce `[HOST]`.

In that context this should instead be changed to `[@{var}]`, which
has the same effect but without the warnings.

As for the warning in `python.texi`, there's period missing at the end
of one `@xref{}` clause. Added.

patch -p1:

-----------------

Comments

Rogerio Alves via Gdb-patches April 12, 2020, 12:40 a.m. | #1
> In that context this `@var{[host]}` should instead be changed to `[@{var}]`, which has the same effect but without the warnings.


I meant it's `[@var{host}]`, of course. Just as my submitted patch
does it. Sorry for the confusion.
Tom de Vries April 14, 2020, 9:44 a.m. | #2
On 12-04-2020 02:40, krokus via Gdb-patches wrote:
>> In that context this `@var{[host]}` should instead be changed to `[@{var}]`, which has the same effect but without the warnings.

> 

> I meant it's `[@var{host}]`, of course. Just as my submitted patch

> does it. Sorry for the confusion.

> 


Hi,

the patch LGTM.

[ FWIW, it's not the first time anyone ran into this:
https://sourceware.org/legacy-ml/gdb-patches/2003-01/msg00559.html ]

Could you please provide a ChangeLog entry for this patch?

Thanks,
- Tom

Patch

--- gdb/doc/gdb.texinfo    2020-02-08 06:50:14.000000000 -0600
+++ gdb/doc/gdb.texinfo    2020-04-10 21:47:03.677444590 -0500
@@ -21863,19 +21863,19 @@ 
 Unix domain sockets.

 @item target remote @code{@var{host}:@var{port}}
-@itemx target remote @code{@var{[host]}:@var{port}}
+@itemx target remote @code{[@var{host}]:@var{port}}
 @itemx target remote @code{tcp:@var{host}:@var{port}}
-@itemx target remote @code{tcp:@var{[host]}:@var{port}}
+@itemx target remote @code{tcp:[@var{host}]:@var{port}}
 @itemx target remote @code{tcp4:@var{host}:@var{port}}
 @itemx target remote @code{tcp6:@var{host}:@var{port}}
-@itemx target remote @code{tcp6:@var{[host]}:@var{port}}
+@itemx target remote @code{tcp6:[@var{host}]:@var{port}}
 @itemx target extended-remote @code{@var{host}:@var{port}}
-@itemx target extended-remote @code{@var{[host]}:@var{port}}
+@itemx target extended-remote @code{[@var{host}]:@var{port}}
 @itemx target extended-remote @code{tcp:@var{host}:@var{port}}
-@itemx target extended-remote @code{tcp:@var{[host]}:@var{port}}
+@itemx target extended-remote @code{tcp:[@var{host}]:@var{port}}
 @itemx target extended-remote @code{tcp4:@var{host}:@var{port}}
 @itemx target extended-remote @code{tcp6:@var{host}:@var{port}}
-@itemx target extended-remote @code{tcp6:@var{[host]}:@var{port}}
+@itemx target extended-remote @code{tcp6:[@var{host}]:@var{port}}
 @cindex @acronym{TCP} port, @code{target remote}
 Debug using a @acronym{TCP} connection to @var{port} on @var{host}.
 The @var{host} may be either a host name, a numeric @acronym{IPv4}
@@ -21927,15 +21927,15 @@ 
 Note that the colon is still required here.

 @item target remote @code{udp:@var{host}:@var{port}}
-@itemx target remote @code{udp:@var{[host]}:@var{port}}
+@itemx target remote @code{udp:[@var{host}]:@var{port}}
 @itemx target remote @code{udp4:@var{host}:@var{port}}
-@itemx target remote @code{udp6:@var{[host]}:@var{port}}
+@itemx target remote @code{udp6:[@var{host}]:@var{port}}
 @itemx target extended-remote @code{udp:@var{host}:@var{port}}
 @itemx target extended-remote @code{udp:@var{host}:@var{port}}
-@itemx target extended-remote @code{udp:@var{[host]}:@var{port}}
+@itemx target extended-remote @code{udp:[@var{host}]:@var{port}}
 @itemx target extended-remote @code{udp4:@var{host}:@var{port}}
 @itemx target extended-remote @code{udp6:@var{host}:@var{port}}
-@itemx target extended-remote @code{udp6:@var{[host]}:@var{port}}
+@itemx target extended-remote @code{udp6:[@var{host}]:@var{port}}
 @cindex @acronym{UDP} port, @code{target remote}
 Debug using @acronym{UDP} packets to @var{port} on @var{host}.  For example, to
 connect to @acronym{UDP} port 2828 on a terminal server named @code{manyfarms}:
-----------------

patch -p1:

-----------------
--- gdb/doc/python.texi    2020-04-10 22:00:25.349418598 -0500
+++ gdb/doc/python.texi    2020-04-10 22:03:04.661413433 -0500
@@ -3294,7 +3294,7 @@ 
 @end defun

 To get the list of threads for an inferior, use the @code{Inferior.threads()}
-method.  @xref{Inferiors In Python}
+method.  @xref{Inferiors In Python}.

 A @code{gdb.InferiorThread} object has the following attributes:
 -----------------