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