This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb/gdb-8.3-branch] Fix first time you type UP or DOWN in TUI's command window
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Mon, 18 Mar 2019 15:27:13 -0400
- Subject: [binutils-gdb/gdb-8.3-branch] Fix first time you type UP or DOWN in TUI's command window
*** TEST RESULTS FOR COMMIT 7fa34358ef888d242c3441b2a2342297b17775e3 ***
Author: Pedro Alves <palves@redhat.com>
Branch: gdb-8.3-branch
Commit: 7fa34358ef888d242c3441b2a2342297b17775e3
Fix first time you type UP or DOWN in TUI's command window
The first time you type UP or DOWN arrow in the command window, GDB
should scroll the source window, but instead it displays the line
number and the file name in the command window(?).
What happens there is that the first time we call
tui_ui_out::do_field_int, it doesn't initialize m_line, because
m_start_of_line is -1, as set by the constructor; and then the
following call to tui_ui_out::do_field_string falls back to
cli_ui_out::do_field_string because m_line is zero.
The problem is caused by a typo in the C++ification of tui_ui_out,
commit 112e8700a6f, where m_line and m_start_of_line's initial values
were swapped from what they used to be:
-struct ui_out *
-tui_out_new (struct ui_file *stream)
+tui_ui_out::tui_ui_out (ui_file *stream)
+: cli_ui_out (stream, 0),
+ m_line (0),
+ m_start_of_line (-1)
{
-
- /* Initialize our fields. */
- data->line = -1;
- data->start_of_line = 0;
This commit fixes it.
gdb/ChangeLog:
2019-03-18 Pedro Alves <palves@redhat.com>
Eli Zaretskii <eliz@gnu.org>
* tui/tui-out.c (tui_ui_out::tui_ui_out): Fix initialization of
m_line and m_start_of_line.
- Follow-Ups:
- Failures on RHEL-s390x-m64, branch gdb-8.3-branch
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch gdb-8.3-branch
- Failures on Debian-s390x-native-gdbserver-m64, branch gdb-8.3-branch
- Failures on Debian-s390x-m64, branch gdb-8.3-branch
- Failures on Fedora-i686, branch gdb-8.3-branch
- Failures on Fedora-x86_64-cc-with-index, branch gdb-8.3-branch
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch gdb-8.3-branch
- Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.3-branch
- Failures on Fedora-x86_64-m64, branch gdb-8.3-branch
- Failures on Fedora-x86_64-m32, branch gdb-8.3-branch
- Failures on Fedora-x86_64-native-gdbserver-m32, branch gdb-8.3-branch
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch gdb-8.3-branch