diff options
author | Gabe Black <gabeblack@google.com> | 2014-12-05 22:34:42 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2014-12-05 22:34:42 -0800 |
commit | cddf988bfdb60bbf2e77aa23d98ee7ea8d12f072 (patch) | |
tree | f06c00980c0d1713dec375d084af835bb95dd20b /src/base | |
parent | f9f46b8fa91e1da166b1e346029f3072a40223c9 (diff) | |
download | gem5-cddf988bfdb60bbf2e77aa23d98ee7ea8d12f072.tar.xz |
misc: Rename the GDB "Event" event class to InputEvent.
The "Event" name is the same as the base event class. That's a bit confusing,
and makes it a little awkward to add other event types.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/remote_gdb.cc | 30 | ||||
-rw-r--r-- | src/base/remote_gdb.hh | 18 |
2 files changed, 24 insertions, 24 deletions
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc index 7143763dd..50bb78259 100644 --- a/src/base/remote_gdb.cc +++ b/src/base/remote_gdb.cc @@ -166,18 +166,18 @@ debugger() // // -GDBListener::Event::Event(GDBListener *l, int fd, int e) +GDBListener::InputEvent::InputEvent(GDBListener *l, int fd, int e) : PollEvent(fd, e), listener(l) {} void -GDBListener::Event::process(int revent) +GDBListener::InputEvent::process(int revent) { listener->accept(); } GDBListener::GDBListener(BaseRemoteGDB *g, int p) - : event(NULL), gdb(g), port(p) + : inputEvent(NULL), gdb(g), port(p) { assert(!gdb->listener); gdb->listener = this; @@ -185,8 +185,8 @@ GDBListener::GDBListener(BaseRemoteGDB *g, int p) GDBListener::~GDBListener() { - if (event) - delete event; + if (inputEvent) + delete inputEvent; } string @@ -208,8 +208,8 @@ GDBListener::listen() port++; } - event = new Event(this, listener.getfd(), POLLIN); - pollQueue.schedule(event); + inputEvent = new InputEvent(this, listener.getfd(), POLLIN); + pollQueue.schedule(inputEvent); #ifndef NDEBUG gdb->number = debuggers.size(); @@ -241,12 +241,12 @@ GDBListener::accept() } } -BaseRemoteGDB::Event::Event(BaseRemoteGDB *g, int fd, int e) +BaseRemoteGDB::InputEvent::InputEvent(BaseRemoteGDB *g, int fd, int e) : PollEvent(fd, e), gdb(g) {} void -BaseRemoteGDB::Event::process(int revent) +BaseRemoteGDB::InputEvent::process(int revent) { BaseCPU *cpu = gdb->context->getCpuPtr(); EventQueue *eq = cpu->comInstEventQueue[gdb->context->threadId()]; @@ -269,7 +269,7 @@ BaseRemoteGDB::TrapEvent::process() } BaseRemoteGDB::BaseRemoteGDB(System *_system, ThreadContext *c, size_t cacheSize) - : event(NULL), trapEvent(this), listener(NULL), number(-1), fd(-1), + : inputEvent(NULL), trapEvent(this), listener(NULL), number(-1), fd(-1), active(false), attached(false), system(_system), context(c), gdbregs(cacheSize) @@ -279,8 +279,8 @@ BaseRemoteGDB::BaseRemoteGDB(System *_system, ThreadContext *c, size_t cacheSize BaseRemoteGDB::~BaseRemoteGDB() { - if (event) - delete event; + if (inputEvent) + delete inputEvent; } string @@ -298,8 +298,8 @@ BaseRemoteGDB::attach(int f) { fd = f; - event = new Event(this, fd, POLLIN); - pollQueue.schedule(event); + inputEvent = new InputEvent(this, fd, POLLIN); + pollQueue.schedule(inputEvent); attached = true; DPRINTFN("remote gdb attached\n"); @@ -312,7 +312,7 @@ BaseRemoteGDB::detach() close(fd); fd = -1; - pollQueue.remove(event); + pollQueue.remove(inputEvent); DPRINTFN("remote gdb detached\n"); } diff --git a/src/base/remote_gdb.hh b/src/base/remote_gdb.hh index 110059141..373f05343 100644 --- a/src/base/remote_gdb.hh +++ b/src/base/remote_gdb.hh @@ -105,17 +105,17 @@ class BaseRemoteGDB virtual const char * gdb_command(char cmd); protected: - class Event : public PollEvent + class InputEvent : public PollEvent { protected: BaseRemoteGDB *gdb; public: - Event(BaseRemoteGDB *g, int fd, int e); + InputEvent(BaseRemoteGDB *g, int fd, int e); void process(int revent); }; - class TrapEvent : public ::Event + class TrapEvent : public Event { protected: int _type; @@ -129,8 +129,8 @@ class BaseRemoteGDB void process(); }; - friend class Event; - Event *event; + friend class InputEvent; + InputEvent *inputEvent; TrapEvent trapEvent; GDBListener *listener; int number; @@ -270,18 +270,18 @@ BaseRemoteGDB::write(Addr addr, T data) class GDBListener { protected: - class Event : public PollEvent + class InputEvent : public PollEvent { protected: GDBListener *listener; public: - Event(GDBListener *l, int fd, int e); + InputEvent(GDBListener *l, int fd, int e); void process(int revent); }; - friend class Event; - Event *event; + friend class InputEvent; + InputEvent *inputEvent; protected: ListenSocket listener; |