Re: Improve GDB's first user experience by reducing "print_gdb_version" output

Guinevere Larsen via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 5/28/25 8:39 AM, Eli Zaretskii wrote:
>> Date: Tue, 27 May 2025 17:43:18 -0300
>> From: Guinevere Larsen via Gdb<[email protected]>
>>
>> GNU gdb (GDB) 17.0.50.20250526-git
>> Copyright (C) 2024 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:
>> <https://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".
>> (gdb)
>>
>> For the *vast* majority of our users, only 4 of those lines are useful
>> at all: the GDB version (to ask for help), where to find the
>> documentation, the "help" command, and the "apropos" command. Arguably,
>> where to report bugs could be useful, but the worst ones already print
>> it and otherwise users are incredibly unlikely to report them
>> (especially given the email requirements to create an account). Worthy
>> of note, the important lines are the last ones, so even if a new user
>> was eager enough to start reading everything, they'd likely gloss over
>> everything assuming this entire thing is just copyright.
>>
>> I propose that the text be updated to something similar to this:
>>
>> GNU gdb (GDB) 17.0.50.20250526-git
>> For a list of commands, use "help"
>> For all commands related to a certain word, use "apropos word"
>> For a thorough explanation of what GDB can do, check the manual at:
>>       <http://www.gnu.org/software/gdb/documentation/>
>> For information on GDB's copyright, warranty or configuration, use
>>       "show copying/warranty/configuration"
>> (gdb)
> This line is NOT redundant, and conveys important information:
>
>    This GDB was configured as "x86_64-pc-linux-gnu".

Strictly speaking, none of the lines in the introduction are fully 
redundant, they will all be useful in niche situations. My claim is that 
for most users, and especially new users, this reads as visual noise 
that obscures the helpful commands to start using GDB. And worse in this 
specific situation, I would expect that many cases where that knowledge 
would be important, the information would have scrolled off the screen 
and a refresher would be needed either way.

Further thinking about the end goal, it would be good to have an even 
more descriptive message if GDB thinks that this can be an entirely new 
user, which explains more things and would be disabled by adding 
something to a gdbinit, something like "set existing-user 1", and 
explaining what the gdbinit even is. With that, if a user ends up 
finding that knowing the configuration is important, they will be aware 
that they can add "show configuration".

> Also, why did you decide to change the wording of this line:
>
>    Type "apropos word" to search for commands related to "word".
>
> I think the original wording was good.
>
The wording here isn't meant to be taken literally, it was chosen 
quickly to illustrate what kind of changes I had in mind. The quick 
change was just to standardize the suggestions as "for <intended 
outcome>, use <command>", but that detail side of the discussion can be 
left for when a patch making these changes

-- 
Cheers,
Guinevere Larsen
She/Her/Hers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.