summaryrefslogtreecommitdiff
path: root/kern/tru64
diff options
context:
space:
mode:
Diffstat (limited to 'kern/tru64')
-rw-r--r--kern/tru64/tru64_events.hh25
-rw-r--r--kern/tru64/tru64_system.cc46
-rw-r--r--kern/tru64/tru64_system.hh4
3 files changed, 31 insertions, 44 deletions
diff --git a/kern/tru64/tru64_events.hh b/kern/tru64/tru64_events.hh
index d3b6d6f8c..9b5bcfea2 100644
--- a/kern/tru64/tru64_events.hh
+++ b/kern/tru64/tru64_events.hh
@@ -39,16 +39,16 @@ class ExecContext;
class BadAddrEvent : public SkipFuncEvent
{
public:
- BadAddrEvent(PCEventQueue *q, const std::string &desc)
- : SkipFuncEvent(q, desc) {}
+ BadAddrEvent(PCEventQueue *q, const std::string &desc, Addr addr)
+ : SkipFuncEvent(q, desc, addr) {}
virtual void process(ExecContext *xc);
};
class PrintfEvent : public PCEvent
{
public:
- PrintfEvent(PCEventQueue *q, const std::string &desc)
- : PCEvent(q, desc) {}
+ PrintfEvent(PCEventQueue *q, const std::string &desc, Addr addr)
+ : PCEvent(q, desc, addr) {}
virtual void process(ExecContext *xc);
};
@@ -58,16 +58,25 @@ class DebugPrintfEvent : public PCEvent
bool raw;
public:
- DebugPrintfEvent(PCEventQueue *q, const std::string &desc, bool r = false)
- : PCEvent(q, desc), raw(r) {}
+ DebugPrintfEvent(PCEventQueue *q, const std::string &desc, Addr addr,
+ bool r = false)
+ : PCEvent(q, desc, addr), raw(r) {}
virtual void process(ExecContext *xc);
};
+class DebugPrintfrEvent : public DebugPrintfEvent
+{
+ public:
+ DebugPrintfrEvent(PCEventQueue *q, const std::string &desc, Addr addr)
+ : DebugPrintfEvent(q, desc, addr, true)
+ {}
+};
+
class DumpMbufEvent : public PCEvent
{
public:
- DumpMbufEvent(PCEventQueue *q, const std::string &desc)
- : PCEvent(q, desc) {}
+ DumpMbufEvent(PCEventQueue *q, const std::string &desc, Addr addr)
+ : PCEvent(q, desc, addr) {}
virtual void process(ExecContext *xc);
};
diff --git a/kern/tru64/tru64_system.cc b/kern/tru64/tru64_system.cc
index d4b056c62..f65293474 100644
--- a/kern/tru64/tru64_system.cc
+++ b/kern/tru64/tru64_system.cc
@@ -55,47 +55,25 @@ Tru64System::Tru64System(Tru64System::Params *p)
}
#ifdef DEBUG
- kernelPanicEvent = new BreakPCEvent(&pcEventQueue, "kernel panic");
- if (kernelSymtab->findAddress("panic", addr))
- kernelPanicEvent->schedule(addr);
- else
+ kernelPanicEvent = addKernelFuncEvent<BreakPCEvent>("panic");
+ if (!kernelPanicEvent)
panic("could not find kernel symbol \'panic\'");
#endif
- badaddrEvent = new BadAddrEvent(&pcEventQueue, "badaddr");
- if (kernelSymtab->findAddress("badaddr", addr))
- badaddrEvent->schedule(addr);
- else
+ badaddrEvent = addKernelFuncEvent<BadAddrEvent>("badaddr");
+ if (!badaddrEvent)
panic("could not find kernel symbol \'badaddr\'");
- skipPowerStateEvent = new SkipFuncEvent(&pcEventQueue,
- "tl_v48_capture_power_state");
- if (kernelSymtab->findAddress("tl_v48_capture_power_state", addr))
- skipPowerStateEvent->schedule(addr);
-
- skipScavengeBootEvent = new SkipFuncEvent(&pcEventQueue,
- "pmap_scavenge_boot");
- if (kernelSymtab->findAddress("pmap_scavenge_boot", addr))
- skipScavengeBootEvent->schedule(addr);
+ skipPowerStateEvent =
+ addKernelFuncEvent<SkipFuncEvent>("tl_v48_capture_power_state");
+ skipScavengeBootEvent =
+ addKernelFuncEvent<SkipFuncEvent>("pmap_scavenge_boot");
#if TRACING_ON
- printfEvent = new PrintfEvent(&pcEventQueue, "printf");
- if (kernelSymtab->findAddress("printf", addr))
- printfEvent->schedule(addr);
-
- debugPrintfEvent = new DebugPrintfEvent(&pcEventQueue, "debug_printf",
- false);
- if (kernelSymtab->findAddress("m5printf", addr))
- debugPrintfEvent->schedule(addr);
-
- debugPrintfrEvent = new DebugPrintfEvent(&pcEventQueue, "debug_printfr",
- true);
- if (kernelSymtab->findAddress("m5printfr", addr))
- debugPrintfrEvent->schedule(addr);
-
- dumpMbufEvent = new DumpMbufEvent(&pcEventQueue, "dump_mbuf");
- if (kernelSymtab->findAddress("m5_dump_mbuf", addr))
- dumpMbufEvent->schedule(addr);
+ printfEvent = addKernelFuncEvent<PrintfEvent>("printf");
+ debugPrintfEvent = addKernelFuncEvent<DebugPrintfEvent>("m5printf");
+ debugPrintfrEvent = addKernelFuncEvent<DebugPrintfrEvent>("m5printfr");
+ dumpMbufEvent = addKernelFuncEvent<DumpMbufEvent>("m5_dump_mbuf");
#endif
}
diff --git a/kern/tru64/tru64_system.hh b/kern/tru64/tru64_system.hh
index 290b44230..a9077e112 100644
--- a/kern/tru64/tru64_system.hh
+++ b/kern/tru64/tru64_system.hh
@@ -54,8 +54,8 @@ class Tru64System : public System
SkipFuncEvent *skipPowerStateEvent;
SkipFuncEvent *skipScavengeBootEvent;
PrintfEvent *printfEvent;
- DebugPrintfEvent *debugPrintfEvent;
- DebugPrintfEvent *debugPrintfrEvent;
+ DebugPrintfEvent *debugPrintfEvent;
+ DebugPrintfrEvent *debugPrintfrEvent;
DumpMbufEvent *dumpMbufEvent;
public: