diff options
Diffstat (limited to 'kern')
-rw-r--r-- | kern/linux/linux_system.cc | 11 | ||||
-rw-r--r-- | kern/linux/linux_system.hh | 5 |
2 files changed, 13 insertions, 3 deletions
diff --git a/kern/linux/linux_system.cc b/kern/linux/linux_system.cc index 401b4ef44..4ac03143e 100644 --- a/kern/linux/linux_system.cc +++ b/kern/linux/linux_system.cc @@ -102,12 +102,19 @@ LinuxSystem::LinuxSystem(Params *p) } else panic("could not find dp264_mv\n"); -#ifdef DEBUG +#ifndef NDEBUG kernelPanicEvent = new BreakPCEvent(&pcEventQueue, "kernel panic"); if (kernelSymtab->findAddress("panic", addr)) kernelPanicEvent->schedule(addr); else panic("could not find kernel symbol \'panic\'"); + + kernelDieEvent = new BreakPCEvent(&pcEventQueue, "die if kernel"); + if (kernelSymtab->findAddress("die_if_kernel", addr)) + kernelDieEvent->schedule(addr); + else + panic("could not find kernel symbol \'die_if_kernel\'"); + #endif /** @@ -174,7 +181,7 @@ LinuxSystem::LinuxSystem(Params *p) LinuxSystem::~LinuxSystem() { -#ifdef DEBUG +#ifndef NDEBUG delete kernelPanicEvent; #endif delete skipIdeDelay50msEvent; diff --git a/kern/linux/linux_system.hh b/kern/linux/linux_system.hh index 5e3cba9b3..905b0ee70 100644 --- a/kern/linux/linux_system.hh +++ b/kern/linux/linux_system.hh @@ -57,9 +57,12 @@ class PrintThreadInfo; class LinuxSystem : public System { private: -#ifdef DEBUG +#ifndef NDEBUG /** Event to halt the simulator if the kernel calls panic() */ BreakPCEvent *kernelPanicEvent; + + /** Event to halt the simulator if the kernel calls die_if_kernel */ + BreakPCEvent *kernelDieEvent; #endif /** |