summaryrefslogtreecommitdiff
path: root/cpu/pc_event.hh
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/pc_event.hh')
-rw-r--r--cpu/pc_event.hh57
1 files changed, 9 insertions, 48 deletions
diff --git a/cpu/pc_event.hh b/cpu/pc_event.hh
index 08c6fa59a..645138fdd 100644
--- a/cpu/pc_event.hh
+++ b/cpu/pc_event.hh
@@ -98,13 +98,21 @@ class PCEventQueue
protected:
map_t pc_map;
+ bool doService(ExecContext *xc);
+
public:
PCEventQueue();
~PCEventQueue();
bool remove(PCEvent *event);
bool schedule(PCEvent *event);
- bool service(ExecContext *xc);
+ bool service(ExecContext *xc)
+ {
+ if (pc_map.empty())
+ return false;
+
+ return doService(xc);
+ }
range_t equal_range(Addr pc);
range_t equal_range(PCEvent *event) { return equal_range(event->pc()); }
@@ -155,52 +163,6 @@ PCEvent::schedule(PCEventQueue *q, Addr pc)
return schedule();
}
-
-#ifdef FULL_SYSTEM
-class SkipFuncEvent : public PCEvent
-{
- public:
- SkipFuncEvent(PCEventQueue *q, const std::string &desc)
- : PCEvent(q, desc) {}
- virtual void process(ExecContext *xc);
-};
-
-class BadAddrEvent : public SkipFuncEvent
-{
- public:
- BadAddrEvent(PCEventQueue *q, const std::string &desc)
- : SkipFuncEvent(q, desc) {}
- virtual void process(ExecContext *xc);
-};
-
-class PrintfEvent : public PCEvent
-{
- public:
- PrintfEvent(PCEventQueue *q, const std::string &desc)
- : PCEvent(q, desc) {}
- virtual void process(ExecContext *xc);
-};
-
-class DebugPrintfEvent : public PCEvent
-{
- private:
- bool raw;
-
- public:
- DebugPrintfEvent(PCEventQueue *q, const std::string &desc, bool r = false)
- : PCEvent(q, desc), raw(r) {}
- virtual void process(ExecContext *xc);
-};
-
-class DumpMbufEvent : public PCEvent
-{
- public:
- DumpMbufEvent(PCEventQueue *q, const std::string &desc)
- : PCEvent(q, desc) {}
- virtual void process(ExecContext *xc);
-};
-#endif
-
class BreakPCEvent : public PCEvent
{
protected:
@@ -211,5 +173,4 @@ class BreakPCEvent : public PCEvent
virtual void process(ExecContext *xc);
};
-
#endif // __PC_EVENT_HH__