gdb: add interp::on_inferior_appeared method

Same idea as previous patches, but for inferior_appeared.

Change-Id: Ibe4feba34274549a886b1dfb5b3f8d59ae79e1b5
This commit is contained in:
Simon Marchi
2023-04-21 09:45:30 -04:00
parent 023c6d45d7
commit 0c613e170e
5 changed files with 34 additions and 21 deletions

View File

@@ -122,9 +122,12 @@ public:
/* Notify the interpreter that thread T has exited. */
virtual void on_thread_exited (thread_info *, int silent) {}
/* Notify the intepreter that inferior INF was added. */
/* Notify the interpreter that inferior INF was added. */
virtual void on_inferior_added (inferior *inf) {}
/* Notify the interpreter that inferior INF was started or attached. */
virtual void on_inferior_appeared (inferior *inf) {}
private:
/* The memory for this is static, it comes from literal strings (e.g. "cli"). */
const char *m_name;
@@ -242,9 +245,12 @@ extern void interps_notify_new_thread (thread_info *t);
/* Notify all interpreters that thread T has exited. */
extern void interps_notify_thread_exited (thread_info *t, int silent);
/* Notify all intepreters that inferior INF was added. */
/* Notify all interpreters that inferior INF was added. */
extern void interps_notify_inferior_added (inferior *inf);
/* Notify all interpreters that inferior INF was started or attached. */
extern void interps_notify_inferior_appeared (inferior *inf);
/* well-known interpreters */
#define INTERP_CONSOLE "console"
#define INTERP_MI2 "mi2"