Add observable to watch current source symtab
authorTom Tromey <tom@tromey.com>
Thu, 14 Nov 2019 23:11:15 +0000 (16:11 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 20 Dec 2019 16:15:57 +0000 (09:15 -0700)
commita75cd9a2c129dfc086cbe570ef9cff9b84570bbd
tree41c25e54e16683cf7ace77fd26f6325c7f28190a
parent2dfd3df48dc7edb551718b3944eca6b35a7058a5
Add observable to watch current source symtab

This patch adds an observable, so that a later patch can change the
TUI to notice when the user has selected a new source symtab, say via
"list".

gdb/ChangeLog
2019-12-20  Tom Tromey  <tom@tromey.com>

* source.c (struct current_source_location) <set, symtab, line>:
New methods.
<m_symtab, m_line>: Rename.  Now private.
(get_current_source_symtab_and_line)
(set_default_source_symtab_and_line)
(set_current_source_symtab_and_line)
(clear_current_source_symtab_and_line, select_source_symtab)
(info_source_command, print_source_lines_base)
(info_line_command, search_command_helper): Update.
* observable.h (current_source_symtab_and_line_changed): Declare
observable.
* observable.c (current_source_symtab_and_line_changed): Define
observable.

Change-Id: I3c0f6b40f2df84b590bdf5b5ec5ccd8423bb7f22
gdb/ChangeLog
gdb/observable.c
gdb/observable.h
gdb/source.c
This page took 0.024652 seconds and 4 git commands to generate.