Re: TUI enhancement suggestion.

Hannes Domani
2020-06-15T15:48:23Z

Am Montag, 15. Juni 2020, 16:21:11 MESZ hat Pedro Alves via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:

> On 6/11/20 2:55 PM, Phi Debian via Gdb-patches wrote:
> > Ok I got the big picture, the little patch I made was more a demonstrator
> > than a final patch, I don't know the review process.
> >
> > As soon as I can I redo one, with our remarks.
> >
> > Regarding the underline going up to printf I made it on purpose as I find
> > it less intrusive, underlinie space is simple, while underlining text
> > (source) can render less readable again (like colors), so it is something I
> > can spot quickly but not too intrusive. I use very tall xterm, spotting the
> > underline in the space part is very easy easier thanjust the little >
> > before the line number.. That was the reasoning... Yet I admit, when there
> > is no styling it should works too so I will look again :)
>
> Note that people are working on adding support for range stepping to gdb:
>
> https://sourceware.org/pipermail/gdb-patches/2020-May/168673.html
>
> I can see that evolving such that the TUI would highlight the part of the
> line that corresponds to the current statement, instead of the whole line.
>
> Like:
>
>       printf ("foo); ++i;
>       ^^^^^^^^^^^^^
>
> And after a statement-step:
>
>       printf ("foo); ++i;
>                     ^^^^
>
> So I think that it is better if both the reverse-video and the underline
> highlight methods highlight the exact same characters.
>
> Then, we could have a separate setting to pick between highlighting
> the whole line including the whitespace on the left, as we do
> currently:
>
>       printf ("foo); ++i;
> ^^^^^^^^^^^^^^^^^^^^^^^^^
>
> and highlighting the current line's text only, no highlight on the left
> empty space.  This is similar to what e.g., Visual Studio highlights
> (https://www.atlascode.com/wp-content/uploads/2017/04/stepintospecific-original.gif),
> for example:
>
>       printf ("foo); ++i;
>       ^^^^^^^^^^^^^^^^^^^
>
> and highlighting just the left of the current line:
>
>       printf ("foo); ++i;
> ^^^^^^
>
> like you are suggesting.
>
> But that would be orthogonal to reverse vs underline.  I.e., we would
> have a setting for "how do highlight" vs a setting for "what to highlight".
>
>
> > I can't work too much on this unfortunately so it may be a while since I
> > come black to this.

In my range stepping patchset I "highlight" the current column position in the
TUI as well, but since no end-column information is available, it's only
1 character wide.

And the highlighting is done by simply disabling reverse-video for that
1 character, it was the simplest I could think of.

Hannes