Commit Message
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:
2019-12-22 Hannes Domani <ssbssa@yahoo.de>
* source.c (print_source_lines_base): Set last_line_listed.
---
gdb/source.c | 1 +
1 file changed, 1 insertion(+)
Comments
>>>>> "Hannes" == Hannes Domani via gdb-patches <gdb-patches@sourceware.org> writes:
Hannes> The variable last_line_listed is never set when print_source_lines_base is
Hannes> called in TUI mode, so the search always started from the last line printed
Hannes> outside of TUI mode.
Hannes> gdb/ChangeLog:
Hannes> 2019-12-22 Hannes Domani <ssbssa@yahoo.de>
Hannes> * source.c (print_source_lines_base): Set last_line_listed.
Thanks, this is ok.
Tom
Am Montag, 6. Januar 2020, 17:10:42 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:
> >>>>> "Hannes" == Hannes Domani via gdb-patches <gdb-patches@sourceware.org> writes:
>
> Hannes> The variable last_line_listed is never set when print_source_lines_base is
> Hannes> called in TUI mode, so the search always started from the last line printed
> Hannes> outside of TUI mode.
>
> Hannes> gdb/ChangeLog:
>
> Hannes> 2019-12-22 Hannes Domani <ssbssa@yahoo.de>
>
> Hannes> * source.c (print_source_lines_base): Set last_line_listed.
>
> Thanks, this is ok.
Pushed, thanks.
@@ -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. */