Re: TUI enhancement suggestion.

Pedro Alves
2020-06-11T10:34:44Z

On 6/9/20 4:03 PM, Phi Debian via Gdb-patches wrote:
> Here is the patch I made, I spotted a little typo in a comment, I leave it
> in there for now, and provide this as a demonstrator.
>

Cool, thanks. Patches should be sent against current master, because
new features are not going to be merged to the gdb 9 branch, only bugfixes.

> I never submitted a patch so I don't really know the best practice, I
> cutted it on top of 9.2 (latest pull) then the patch)
> I used
>
> $ git format-patch -1 HEAD
>

That's good. The best way to send a patch is to then use
git send-email 0001-whatever.patch
but attaching it as you've done is also OK.

Take a look here:

https://sourceware.org/gdb/wiki/ContributionChecklist

We will need to clear the copyright assignment issue:
https://sourceware.org/gdb/wiki/ContributionChecklist#FSF_copyright_Assignment
in order to be able to accept your contribution. Let me know and
I'll get your started.

As for the patch itself, how about, instead of:

set tui point-underline on|off

we make it an enum command like:

set tui current-line-highlight none|reverse|underline

An enum like this leaves it open for other styles in the future.
"none" could be to just display the ">" on the left side
and nothing else, like currently still done on the assembly
window.

Also, I'm suggesting

set tui current-line-highlight

and not

set tui current-source-line-highlight

because it seems like a bug to me that the assembly window
doesn't highlight the current instruction in the same fashion
as the current source window highlight the current source line.

In your screenshot, the underline only goes up until the "printf",
instead of underlining the actual source code text in the line as well.
That seems like a bug. What happens if you disable styling, with
"set style enabled off"? Does that cause the whole text line to
be underlined?

Thanks,
Pedro Alves