misc: Rename misc.(hh|cc) to logging.(hh|cc)
[gem5.git] / src / cpu / pc_event.hh
index 32b7f3ef5efc45c98ab8b05919001b08b17fd01e..7b57e97a7c58b7e3996304af21c1add8bee44757 100644 (file)
@@ -24,6 +24,9 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Nathan Binkert
+ *          Steve Reinhardt
  */
 
 #ifndef __PC_EVENT_HH__
 
 #include <vector>
 
-#include "base/misc.hh"
+#include "base/logging.hh"
+#include "base/types.hh"
 
-class ExecContext;
+class ThreadContext;
 class PCEventQueue;
+class System;
 
 class PCEvent
 {
@@ -55,7 +60,7 @@ class PCEvent
     Addr pc() const { return evpc; }
 
     bool remove();
-    virtual void process(ExecContext *xc) = 0;
+    virtual void process(ThreadContext *tc) = 0;
 };
 
 class PCEventQueue
@@ -87,7 +92,7 @@ class PCEventQueue
   protected:
     map_t pc_map;
 
-    bool doService(ExecContext *xc);
+    bool doService(ThreadContext *tc);
 
   public:
     PCEventQueue();
@@ -95,12 +100,12 @@ class 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);
@@ -134,7 +139,18 @@ class BreakPCEvent : public PCEvent
   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__