diff options
Diffstat (limited to 'gdb/interps.h')
-rw-r--r-- | gdb/interps.h | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/gdb/interps.h b/gdb/interps.h index 8d80c00..c74495b 100644 --- a/gdb/interps.h +++ b/gdb/interps.h @@ -1,6 +1,6 @@ /* Manages interpreters for GDB, the GNU debugger. - Copyright (C) 2000-2024 Free Software Foundation, Inc. + Copyright (C) 2000-2025 Free Software Foundation, Inc. Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc. @@ -19,10 +19,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef INTERPS_H -#define INTERPS_H +#ifndef GDB_INTERPS_H +#define GDB_INTERPS_H #include "gdbsupport/intrusive_list.h" +#include "gdbsupport/event-loop.h" struct bpstat; struct ui_out; @@ -78,6 +79,13 @@ public: virtual void pre_command_loop () {} + /* Service one event. + This gives the interpreter a chance to handle its own private + events that cannot be fed into the gdb event mechanism. + In all cases, this should call gdb_do_one_event at some point. */ + virtual int do_one_event (int mstimeout = -1) + { return gdb_do_one_event (mstimeout); } + /* Returns true if this interpreter supports using the readline library; false if it uses GDB's own simplified readline emulation. */ @@ -153,8 +161,11 @@ public: /* Notify the interpreter that solib SO has been loaded. */ virtual void on_solib_loaded (const solib &so) {} - /* Notify the interpreter that solib SO has been unloaded. */ - virtual void on_solib_unloaded (const solib &so) {} + /* Notify the interpreter that solib SO has been unloaded. When + STILL_IN_USE is true, the objfile backing SO is still in use, + this indicates that SO was loaded multiple times, but only mapped + in once (the mapping was reused). */ + virtual void on_solib_unloaded (const solib &so, bool still_in_use) {} /* Notify the interpreter that a command it is executing is about to cause the inferior to proceed. */ @@ -332,8 +343,11 @@ extern void interps_notify_target_resumed (ptid_t ptid); /* Notify all interpreters that solib SO has been loaded. */ extern void interps_notify_solib_loaded (const solib &so); -/* Notify all interpreters that solib SO has been unloaded. */ -extern void interps_notify_solib_unloaded (const solib &so); +/* Notify all interpreters that solib SO has been unloaded. When + STILL_IN_USE is true, the objfile backing SO is still in use, this + indicates that SO was loaded multiple times, but only mapped in + once (the mapping was reused). */ +extern void interps_notify_solib_unloaded (const solib &so, bool still_in_use); /* Notify all interpreters that the selected traceframe changed. @@ -378,4 +392,4 @@ extern void interps_notify_memory_changed (inferior *inf, CORE_ADDR addr, #define INTERP_TUI "tui" #define INTERP_INSIGHT "insight" -#endif +#endif /* GDB_INTERPS_H */ |