summaryrefslogtreecommitdiff
path: root/src/arch/alpha/linux
diff options
context:
space:
mode:
authorAndreas Sandberg <Andreas.Sandberg@ARM.com>2013-04-22 13:20:31 -0400
committerAndreas Sandberg <Andreas.Sandberg@ARM.com>2013-04-22 13:20:31 -0400
commitaa08069b3fb9a564df755ec558fd64ba076b0ef3 (patch)
tree663e54fb3287ac7522457381e49190d1da36a823 /src/arch/alpha/linux
parentc9e4678c16164ca12de951ea6faffc9ab9600b0b (diff)
downloadgem5-aa08069b3fb9a564df755ec558fd64ba076b0ef3.tar.xz
sim: Add helper functions that add PCEvents with custom arguments
This changeset adds support for forwarding arguments to the PC event constructors to following methods: addKernelFuncEvent addFuncEvent Additionally, this changeset adds the following helper method to the System base class: addFuncEventOrPanic - Hook a PCEvent to a symbol, panic on failure. addKernelFuncEventOrPanic - Hook a PCEvent to a kernel symbol, panic on failure. System implementations have been updated to use the new functionality where appropriate.
Diffstat (limited to 'src/arch/alpha/linux')
-rw-r--r--src/arch/alpha/linux/system.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/arch/alpha/linux/system.cc b/src/arch/alpha/linux/system.cc
index 0507af029..80d13cdfa 100644
--- a/src/arch/alpha/linux/system.cc
+++ b/src/arch/alpha/linux/system.cc
@@ -120,14 +120,10 @@ LinuxAlphaSystem::setupFuncEvents()
{
AlphaSystem::setupFuncEvents();
#ifndef NDEBUG
- kernelPanicEvent = addKernelFuncEvent<BreakPCEvent>("panic");
- if (!kernelPanicEvent)
- panic("could not find kernel symbol \'panic\'");
+ kernelPanicEvent = addKernelFuncEventOrPanic<BreakPCEvent>("panic");
#if 0
- kernelDieEvent = addKernelFuncEvent<BreakPCEvent>("die_if_kernel");
- if (!kernelDieEvent)
- panic("could not find kernel symbol \'die_if_kernel\'");
+ kernelDieEvent = addKernelFuncEventOrPanic<BreakPCEvent>("die_if_kernel");
#endif
#endif