From f9f46b8fa91e1da166b1e346029f3072a40223c9 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 5 Dec 2014 01:51:49 -0800 Subject: sim: Ensure GDB interrupts the simulation at an instruction boundary. Use the comInstEventQueue to ensure GDB interrupts the simulation at an instruction boundary and not in the middle of a macroop, memory access, etc. --- src/base/remote_gdb.hh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/base/remote_gdb.hh') diff --git a/src/base/remote_gdb.hh b/src/base/remote_gdb.hh index ef414f09b..110059141 100644 --- a/src/base/remote_gdb.hh +++ b/src/base/remote_gdb.hh @@ -115,8 +115,23 @@ class BaseRemoteGDB void process(int revent); }; + class TrapEvent : public ::Event + { + protected: + int _type; + BaseRemoteGDB *gdb; + + public: + TrapEvent(BaseRemoteGDB *g) : gdb(g) + {} + + void type(int t) { _type = t; } + void process(); + }; + friend class Event; Event *event; + TrapEvent trapEvent; GDBListener *listener; int number; -- cgit v1.2.3