diff options
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-interp.c | 20 | ||||
-rw-r--r-- | gdb/cli/cli-setshow.c | 12 |
2 files changed, 16 insertions, 16 deletions
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c index 12b677fa7ec..bbee8098807 100644 --- a/gdb/cli/cli-interp.c +++ b/gdb/cli/cli-interp.c @@ -26,7 +26,7 @@ #include "top.h" /* for "execute_command" */ #include "event-top.h" #include "infrun.h" -#include "observer.h" +#include "observable.h" #include "gdbthread.h" #include "thread-fsm.h" @@ -461,14 +461,14 @@ _initialize_cli_interp (void) interp_factory_register (INTERP_CONSOLE, cli_interp_factory); /* If changing this, remember to update tui-interp.c as well. */ - observer_attach_normal_stop (cli_on_normal_stop); - observer_attach_end_stepping_range (cli_on_end_stepping_range); - observer_attach_signal_received (cli_on_signal_received); - observer_attach_signal_exited (cli_on_signal_exited); - observer_attach_exited (cli_on_exited); - observer_attach_no_history (cli_on_no_history); - observer_attach_sync_execution_done (cli_on_sync_execution_done); - observer_attach_command_error (cli_on_command_error); - observer_attach_user_selected_context_changed + gdb::observers::normal_stop.attach (cli_on_normal_stop); + gdb::observers::end_stepping_range.attach (cli_on_end_stepping_range); + gdb::observers::signal_received.attach (cli_on_signal_received); + gdb::observers::signal_exited.attach (cli_on_signal_exited); + gdb::observers::exited.attach (cli_on_exited); + gdb::observers::no_history.attach (cli_on_no_history); + gdb::observers::sync_execution_done.attach (cli_on_sync_execution_done); + gdb::observers::command_error.attach (cli_on_command_error); + gdb::observers::user_selected_context_changed.attach (cli_on_user_selected_context_changed); } diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index f74a8acf36c..bb444688f93 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -20,7 +20,7 @@ #include "value.h" #include <ctype.h> #include "arch-utils.h" -#include "observer.h" +#include "observable.h" #include "ui-out.h" @@ -511,20 +511,20 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c) case var_filename: case var_optional_filename: case var_enum: - observer_notify_command_param_changed (name, *(char **) c->var); + gdb::observers::command_param_changed.notify (name, *(char **) c->var); break; case var_boolean: { const char *opt = *(int *) c->var ? "on" : "off"; - observer_notify_command_param_changed (name, opt); + gdb::observers::command_param_changed.notify (name, opt); } break; case var_auto_boolean: { const char *s = auto_boolean_enums[*(enum auto_boolean *) c->var]; - observer_notify_command_param_changed (name, s); + gdb::observers::command_param_changed.notify (name, s); } break; case var_uinteger: @@ -533,7 +533,7 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c) char s[64]; xsnprintf (s, sizeof s, "%u", *(unsigned int *) c->var); - observer_notify_command_param_changed (name, s); + gdb::observers::command_param_changed.notify (name, s); } break; case var_integer: @@ -543,7 +543,7 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c) char s[64]; xsnprintf (s, sizeof s, "%d", *(int *) c->var); - observer_notify_command_param_changed (name, s); + gdb::observers::command_param_changed.notify (name, s); } break; } |