From d60de7122da3a90a0204853f633d34d93dcc622f Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sat, 24 Sep 2005 14:20:29 -0400 Subject: Add functions to System object to set up function-based events, including automatically fixing up addresses to deal with optionally executed Alpha gp update prolog. SConscript: Remove freebsd_events.cc and linux_events.cc. base/remote_gdb.cc: cpu/pc_event.cc: kern/system_events.cc: kern/system_events.hh: PCEvents now schedule themselves in constructor. cpu/pc_event.hh: PCEvents now schedule themselves in the constructor. Get rid of constructor versions that don't take an address and all the schedule() methods that are now unnecessary. kern/freebsd/freebsd_system.cc: kern/freebsd/freebsd_system.hh: Use new System methods to schedule function-based events. Move FreeBSD-specific function event classes into FreebsdSystem. kern/linux/linux_system.cc: kern/linux/linux_system.hh: Use new System methods to schedule function-based events. Move Linux-specific function event classes into LinuxSystem. kern/tru64/tru64_events.hh: PCEvents now schedule themselves in constructor. Add DebugPrintfrEvent to encapsulate raw setting as new type (to work better with new System function-event method.) kern/tru64/tru64_system.cc: Use new System methods to schedule function-based events. kern/tru64/tru64_system.hh: Add DebugPrintfrEvent to encapsulate raw setting as new type (to work better with new System function-event method.) sim/system.cc: sim/system.hh: Add functions to set up function-based events, including automatically fixing up addresses to deal with optionally executed Alpha gp update prolog. --HG-- extra : convert_revision : c2cf09144297b6602afe755a34a0a2227023783f --- kern/linux/linux_system.hh | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'kern/linux/linux_system.hh') diff --git a/kern/linux/linux_system.hh b/kern/linux/linux_system.hh index 2ddddbc1a..f883bef93 100644 --- a/kern/linux/linux_system.hh +++ b/kern/linux/linux_system.hh @@ -32,10 +32,6 @@ class ExecContext; class BreakPCEvent; -class DebugPrintkEvent; -class BreakPCEvent; -class LinuxSkipDelayLoopEvent; -class SkipFuncEvent; class IdleStartEvent; class PrintThreadInfo; @@ -47,6 +43,34 @@ class PrintThreadInfo; class LinuxSystem : public System { private: + class SkipDelayLoopEvent : public SkipFuncEvent + { + public: + SkipDelayLoopEvent(PCEventQueue *q, const std::string &desc, Addr addr) + : SkipFuncEvent(q, desc, addr) {} + virtual void process(ExecContext *xc); + }; + + class DebugPrintkEvent : public SkipFuncEvent + { + private: + bool raw; + + public: + DebugPrintkEvent(PCEventQueue *q, const std::string &desc, Addr addr, + bool r = false) + : SkipFuncEvent(q, desc, addr), raw(r) {} + virtual void process(ExecContext *xc); + }; + + class PrintThreadInfo : public PCEvent + { + public: + PrintThreadInfo(PCEventQueue *q, const std::string &desc, Addr addr) + : PCEvent(q, desc, addr) {} + virtual void process(ExecContext *xc); + }; + /** * Addresses defining where the kernel bootloader places various * elements. Details found in include/asm-alpha/system.h @@ -94,7 +118,7 @@ class LinuxSystem : public System * Skip calculate_delay_loop() rather than waiting for this to be * calculated */ - LinuxSkipDelayLoopEvent *skipDelayLoopEvent; + SkipDelayLoopEvent *skipDelayLoopEvent; /** * Event to print information about thread switches if the trace flag -- cgit v1.2.3