Re: [PATCH] gdb: Make startup message more user friendly

Tom Tromey
2025-10-10T20:10:07Z

>>>>> "Guinevere" == Guinevere Larsen <guinevere@redhat.com> writes:

Guinevere> This commit attempts to make the startup message more friendly to new
Guinevere> users by using ascii art separators. If there is enough space availabe,
Guinevere> an ascii art box is printed containing the hints, otherwise a simple
Guinevere> separator is printed. The code deems "enough space available" when
Guinevere> there is enough space to print the documentation URL inside the box,
Guinevere> since the other hints will be broken into multiple lines if necessary.
Guinevere> Here are examples of the 2 possible startups, with enough space:

If emojis_ok() then it seems like this could use Unicode line drawing
instead.

Guinevere> Unfortunately, I was not able to think of a way in which the code could
Guinevere> break a line if necessary and also include styled code for URLs and
Guinevere> commands, so, since I believe it is more important to have the box as
Guinevere> available as possible, I opted to not include any styling options.

I'm not sure I really understand the problem but I think this would be a
step backward.

There are facilities to manipulate these sequences. E.g. see what
no_terminal_escape_file or escape_buffering_file do.

One option might be to reimplement this as a ui_file that will only
split at un-styled spaces; and if the screen isn't big enough just omit
the box. Then print_gdb_hints wouldn't need two branches printing the
same stuff.

thanks,
Tom