static void mi_insert_notify_hooks (void);
static void mi_remove_notify_hooks (void);
-static void mi_tsv_deleted (const struct trace_state_variable *tsv);
static void mi_tsv_modified (const struct trace_state_variable *tsv);
static void mi_breakpoint_created (struct breakpoint *b);
static void mi_breakpoint_deleted (struct breakpoint *b);
gdb_flush (this->event_channel);
}
-/* Emit notification on deleting a trace state variable. */
-
-static void
-mi_tsv_deleted (const struct trace_state_variable *tsv)
+void
+mi_interp::on_tsv_deleted (const trace_state_variable *tsv)
{
- SWITCH_THRU_ALL_UIS ()
- {
- struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
-
- if (mi == NULL)
- continue;
-
- target_terminal::scoped_restore_terminal_state term_state;
- target_terminal::ours_for_output ();
+ target_terminal::scoped_restore_terminal_state term_state;
+ target_terminal::ours_for_output ();
- if (tsv != NULL)
- gdb_printf (mi->event_channel, "tsv-deleted,"
- "name=\"%s\"", tsv->name.c_str ());
- else
- gdb_printf (mi->event_channel, "tsv-deleted");
+ if (tsv != nullptr)
+ gdb_printf (this->event_channel, "tsv-deleted,name=\"%s\"",
+ tsv->name.c_str ());
+ else
+ gdb_printf (this->event_channel, "tsv-deleted");
- gdb_flush (mi->event_channel);
- }
+ gdb_flush (this->event_channel);
}
/* Emit notification on modifying a trace state variable. */
interp_factory_register (INTERP_MI4, mi_interp_factory);
interp_factory_register (INTERP_MI, mi_interp_factory);
- gdb::observers::tsv_deleted.attach (mi_tsv_deleted, "mi-interp");
gdb::observers::tsv_modified.attach (mi_tsv_modified, "mi-interp");
gdb::observers::breakpoint_created.attach (mi_breakpoint_created,
"mi-interp");