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: [RFA] Remove some text from --version output


On 05/11/2018 08:40 PM, Tom Tromey wrote:
> I happened to notice recently that "gdb --version" says:
> 
>     GNU gdb (GDB) 8.0.50.20170911-git
>     Copyright (C) 2017 Free Software Foundation, Inc.
>     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>     This is free software: you are free to change and redistribute it.
>     There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>     and "show warranty" for details.
>     This GDB was configured as "x86_64-pc-linux-gnu".
>     Type "show configuration" for configuration details.
>     For bug reporting instructions, please see:
>     <http://www.gnu.org/software/gdb/bugs/>.
>     Find the GDB manual and other documentation resources online at:
>     <http://www.gnu.org/software/gdb/documentation/>.
>     For help, type "help".
>     Type "apropos word" to search for commands related to "word".
> 
> This is a bit on the wordy side, but also references interactive
> commands, which I think doesn't really make sense for --version.
Agreed.

> 
> This patch removes that text from --version, while leaving it in the
> "show version" output.  It also adds a newline between the URLs and
> the "For help, ..." text, because I thought that was easier to read.
> (Perhaps the URLs ought to be indented a bit as well, but I did not do
> that.)

I think indenting the urls would be nice.

> 
> Now the --version output looks like:
> 
>     GNU gdb (GDB) 8.1.50.20180511-git
>     Copyright (C) 2018 Free Software Foundation, Inc.
>     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>     This is free software: you are free to change and redistribute it.
>     There is NO WARRANTY, to the extent permitted by law.
>     This GDB was configured as "x86_64-pc-linux-gnu".
>     For bug reporting instructions, please see:
>     <http://www.gnu.org/software/gdb/bugs/>.
>     Find the GDB manual and other documentation resources online at:
>     <http://www.gnu.org/software/gdb/documentation/>.

LGTM.

I'd even support removing everything after the "NO WARRANTY" line.

The "This GDB was configured..." info can be found in
"gdb --configuration" instead.

(And I guess it if it stays, it could be argued that it'd be
reasonable to say to look at "--configuration" instead removing
the "show configuration" suggestion.  I'm not suggesting
that, though.)

Neither "gcc --version" nor "emacs --version", nor coreutils
tools' --version output, like "ls --version" talk about bug
reporting or doc resources in their output.

Thanks,
Pedro Alves


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