aboutsummaryrefslogtreecommitdiff
path: root/gdb/observable.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-11-14 16:11:15 -0700
committerTom Tromey <tom@tromey.com>2019-12-20 09:15:57 -0700
commita75cd9a2c129dfc086cbe570ef9cff9b84570bbd (patch)
tree41c25e54e16683cf7ace77fd26f6325c7f28190a /gdb/observable.c
parent2dfd3df48dc7edb551718b3944eca6b35a7058a5 (diff)
downloadgdb-a75cd9a2c129dfc086cbe570ef9cff9b84570bbd.zip
gdb-a75cd9a2c129dfc086cbe570ef9cff9b84570bbd.tar.gz
gdb-a75cd9a2c129dfc086cbe570ef9cff9b84570bbd.tar.bz2
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
Diffstat (limited to 'gdb/observable.c')
-rw-r--r--gdb/observable.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/observable.c b/gdb/observable.c
index c077b02..4806e10 100644
--- a/gdb/observable.c
+++ b/gdb/observable.c
@@ -75,6 +75,7 @@ DEFINE_OBSERVABLE (inferior_call_post);
DEFINE_OBSERVABLE (register_changed);
DEFINE_OBSERVABLE (user_selected_context_changed);
DEFINE_OBSERVABLE (source_styling_changed);
+DEFINE_OBSERVABLE (current_source_symtab_and_line_changed);
} /* namespace observers */
} /* namespace gdb */