aboutsummaryrefslogtreecommitdiff
path: root/gdb/interps.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-04-21 09:45:30 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-05-30 15:07:26 -0400
commitd38086cce9ab3d1c0acd48dd89fe5721caa08fed (patch)
tree17d38679684ce21c9750a38ff5e4fcc0cb93f0b5 /gdb/interps.h
parent0c613e170e60f673cd47b23a7052b19b128469c5 (diff)
downloadgdb-d38086cce9ab3d1c0acd48dd89fe5721caa08fed.zip
gdb-d38086cce9ab3d1c0acd48dd89fe5721caa08fed.tar.gz
gdb-d38086cce9ab3d1c0acd48dd89fe5721caa08fed.tar.bz2
gdb: add interp::on_inferior_disappeared method
Same idea as previous patches, but for inferior_disappeared. For symmetry with on_inferior_appeared, I named this one on_inferior_disappeared, despite the observer being called inferior_exit. This is called when detaching an inferior, so I think that calling it "disappeared" is a bit less misleading (the observer should probably be renamed later). Change-Id: I372101586bc9454997953c1e540a2a6685f53ef6
Diffstat (limited to 'gdb/interps.h')
-rw-r--r--gdb/interps.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/interps.h b/gdb/interps.h
index 09edaae..b1aee5d 100644
--- a/gdb/interps.h
+++ b/gdb/interps.h
@@ -128,6 +128,9 @@ public:
/* Notify the interpreter that inferior INF was started or attached. */
virtual void on_inferior_appeared (inferior *inf) {}
+ /* Notify the interpreter that inferior INF exited or was detached. */
+ virtual void on_inferior_disappeared (inferior *inf) {}
+
private:
/* The memory for this is static, it comes from literal strings (e.g. "cli"). */
const char *m_name;
@@ -251,6 +254,9 @@ 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);
+/* Notify all interpreters that inferior INF exited or was detached. */
+extern void interps_notify_inferior_disappeared (inferior *inf);
+
/* well-known interpreters */
#define INTERP_CONSOLE "console"
#define INTERP_MI2 "mi2"