Re: GDB 8.2.90 available for testing

Pedro Alves
2019-03-01T16:35:08Z

On 02/28/2019 06:33 PM, Eli Zaretskii wrote:
>> From: Joel Brobecker <brobecker@adacore.com>
>> Date: Wed, 27 Feb 2019 09:51:12 +0400 (+04)
>>
>> I have just finished creating the gdb-8.2.90 pre-release.
>> It is available for download at the following location:
>>
>> ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-8.2.90.tar.xz
>
> This pretest shows a regression in the TUI interface: stepping through
> the code of the debuggee with "next" overwrites the right edge of the
> frame of the source window on those lines which we display in reverse
> video as we step. Does anyone else see this, or is this specific to
> Windows?

I see that on GNU/Linux as well (Fedora 27).

I see other issues in the TUI. Here they are:

#1 - Run a program to main, so that the source window displays the source.

a) Press the "up" key. That manages to actually move the cursor to the line above.

b) alternatively, enter a command, like "(gdb) p 1\n", then press up.
You'll see:

(top-gdb) p 1
$1 = 1
(top-gdb) 16 in /home/pedro/gdb/src/gdb/gdb.c
(top-gdb)

with the cursor sitting in the "16" above.

#2 - Run a program to main, so that the source window displays the source.

- Press "up", and note that despite the nasty effects of #1 above, it
scrolls the source window successfully.

However, the "down" key doesn't work at all. It doesn't scroll down.

#3 - Start gdb with a program, and enable the TUI. The source window
displays "No Source Available". Now type "list" in the TUI console.
I just tried it now, and the first time, it printed the source name in
the console window and didn't update/display the source in the source window.
The second time, it displayed the source in the source window, and the third
time it crashed GDB with an uncaught exception:

(top-gdb) list in /home/pedro/gdb/src/gdb/gdb.c
(top-gdb) list
(top-gdb) list
(top-gdb) listterminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 18446744073709551615) > this->size() (which is 1500)
Aborted (core dumped)

I was using GDB itself as the inferior program in the examples above, and
I'm building with Source Highlight, but I don't know whether that makes
a difference.

#4 - Enable the TUI, and make sure there's some source listed in
the source window.

- Try "set style enabled off". Note styling in the source window
is still enabled.

- Press "Ctrl-L" to redraw screen. Note styling in the source window
is _still_ enabled.

>
> I'd like this fixed before 8.3 is released, so if no one else sees
> this, I will look into debugging the problem.

Thanks. Indeed, I think these TUI regressions should be fixed before
the release somehow. Worse off, we get to disable styling in the TUI
for the release.

Thanks,
Pedro Alves