diff options
Diffstat (limited to 'gdb/tui/tui-interp.c')
-rw-r--r-- | gdb/tui/tui-interp.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c index 702c342..66423ef 100644 --- a/gdb/tui/tui-interp.c +++ b/gdb/tui/tui-interp.c @@ -33,6 +33,7 @@ #include "infrun.h" #include "observer.h" #include "gdbthread.h" +#include "user-selection.h" /* Set to 1 when the TUI mode must be activated when we first start gdb. */ @@ -209,15 +210,15 @@ tui_on_command_error (void) /* Observer for the user_selected_context_changed notification. */ static void -tui_on_user_selected_context_changed (user_selected_what selection) +tui_on_global_user_selection_changed (user_selection *us, + user_selected_what selection) { - struct thread_info *tp; - /* This event is suppressed. */ if (cli_suppress_notification.user_selected_context) return; - tp = find_thread_ptid (inferior_ptid); + struct inferior *inf = us->inferior (); + struct thread_info *thread = us->thread (); SWITCH_THRU_ALL_UIS () { @@ -227,12 +228,11 @@ tui_on_user_selected_context_changed (user_selected_what selection) continue; if (selection & USER_SELECTED_INFERIOR) - print_selected_inferior (tui->interp_ui_out ()); + print_selected_inferior (tui->interp_ui_out (), inf); - if (tp != NULL + if (thread != NULL && ((selection & (USER_SELECTED_THREAD | USER_SELECTED_FRAME)))) - print_selected_thread_frame (tui->interp_ui_out (), selection); - + print_selected_thread_frame (tui->interp_ui_out (), us, selection); } } @@ -337,6 +337,6 @@ _initialize_tui_interp (void) observer_attach_no_history (tui_on_no_history); observer_attach_sync_execution_done (tui_on_sync_execution_done); observer_attach_command_error (tui_on_command_error); - observer_attach_user_selected_context_changed - (tui_on_user_selected_context_changed); + observer_attach_global_user_selection_changed + (tui_on_global_user_selection_changed); } |