#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
+#include "base/types.hh"
-class ExecContext;
+class ThreadContext;
class PCEventQueue;
+class System;
class PCEvent
{
Addr pc() const { return evpc; }
bool remove();
- virtual void process(ExecContext *xc) = 0;
+ virtual void process(ThreadContext *tc) = 0;
};
class PCEventQueue
protected:
map_t pc_map;
- bool doService(ExecContext *xc);
+ bool doService(ThreadContext *tc);
public:
PCEventQueue();
bool remove(PCEvent *event);
bool schedule(PCEvent *event);
- bool service(ExecContext *xc)
+ bool service(ThreadContext *tc)
{
if (pc_map.empty())
return false;
- return doService(xc);
+ return doService(tc);
}
range_t equal_range(Addr pc);
public:
BreakPCEvent(PCEventQueue *q, const std::string &desc, Addr addr,
bool del = false);
- virtual void process(ExecContext *xc);
+ virtual void process(ThreadContext *tc);
+};
+
+void sched_break_pc_sys(System *sys, Addr addr);
+
+void sched_break_pc(Addr addr);
+
+class PanicPCEvent : public PCEvent
+{
+ public:
+ PanicPCEvent(PCEventQueue *q, const std::string &desc, Addr pc);
+ virtual void process(ThreadContext *tc);
};
#endif // __PC_EVENT_HH__