From: Hannes Domani Date: Sun, 22 Dec 2019 13:58:22 +0000 (+0100) Subject: Fix search in TUI X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b7fcda2744145f2380af01c9db8e11986f7af6d;p=binutils-gdb.git Fix search in TUI The variable last_line_listed is never set when print_source_lines_base is called in TUI mode, so the search always started from the last line printed outside of TUI mode. gdb/ChangeLog: 2020-01-06 Hannes Domani * source.c (print_source_lines_base): Set last_line_listed. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8101a6f54af..ad7c33fe465 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-01-06 Hannes Domani + + * source.c (print_source_lines_base): Set last_line_listed. + 2020-01-06 Shahab Vahedi * tui/tui-disasm.c: Remove trailing spaces. diff --git a/gdb/source.c b/gdb/source.c index 7230c77f733..1bc98d376e5 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1232,6 +1232,7 @@ print_source_lines_base (struct symtab *s, int line, int stopline, loc->set (s, line); first_line_listed = line; + last_line_listed = line; /* If printing of source lines is disabled, just print file and line number. */