summaryrefslogtreecommitdiff
path: root/src/base/remote_gdb.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2014-12-05 01:51:49 -0800
committerGabe Black <gabeblack@google.com>2014-12-05 01:51:49 -0800
commitf9f46b8fa91e1da166b1e346029f3072a40223c9 (patch)
treeced1905a0d4dc7ec3cf5b9cd5dd75226ccc67473 /src/base/remote_gdb.hh
parentbacbb8ecbcee2b4c5c3fe71f415abc5852ae4a8f (diff)
downloadgem5-f9f46b8fa91e1da166b1e346029f3072a40223c9.tar.xz
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.
Diffstat (limited to 'src/base/remote_gdb.hh')
-rw-r--r--src/base/remote_gdb.hh15
1 files changed, 15 insertions, 0 deletions
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;