bpstat_clear (&tp->control.stop_bpstat);
}
+/* Notify the current interpreter and observers that the target is about to
+ proceed. */
+
+static void
+notify_about_to_proceed ()
+{
+ top_level_interpreter ()->on_about_to_proceed ();
+ gdb::observers::about_to_proceed.notify ();
+}
+
void
clear_proceed_status (int step)
{
inferior->control.stop_soon = NO_STOP_QUIETLY;
}
- gdb::observers::about_to_proceed.notify ();
+ notify_about_to_proceed ();
}
/* Returns true if TP is still stopped at a breakpoint that needs
/* Notify the interpreter that solib SO has been unloaded. */
virtual void on_solib_unloaded (so_list *so) {}
+ /* Notify the interpreter that a command it is executing is about to cause
+ the inferior to proceed. */
+ virtual void on_about_to_proceed () {}
+
private:
/* The memory for this is static, it comes from literal strings (e.g. "cli"). */
const char *m_name;
static void mi_insert_notify_hooks (void);
static void mi_remove_notify_hooks (void);
-static void mi_about_to_proceed (void);
static void mi_traceframe_changed (int tfnum, int tpnum);
static void mi_tsv_created (const struct trace_state_variable *tsv);
static void mi_tsv_deleted (const struct trace_state_variable *tsv);
gdb_flush (this->raw_stdout);
}
-static void
-mi_about_to_proceed (void)
+void
+mi_interp::on_about_to_proceed ()
{
/* Suppress output while calling an inferior function. */
return;
}
- mi_interp *mi = as_mi_interp (top_level_interpreter ());
-
- if (mi == nullptr)
- return;
-
- mi->mi_proceeded = 1;
+ this->mi_proceeded = 1;
}
/* When the element is non-zero, no MI notifications will be emitted in
interp_factory_register (INTERP_MI4, mi_interp_factory);
interp_factory_register (INTERP_MI, mi_interp_factory);
- gdb::observers::about_to_proceed.attach (mi_about_to_proceed, "mi-interp");
gdb::observers::traceframe_changed.attach (mi_traceframe_changed,
"mi-interp");
gdb::observers::tsv_created.attach (mi_tsv_created, "mi-interp");
void on_target_resumed (ptid_t ptid) override;
void on_solib_loaded (so_list *so) override;
void on_solib_unloaded (so_list *so) override;
+ void on_about_to_proceed () override;
/* MI's output channels */
mi_console_file *out;