wrap debugging stuff with #ifdef DEBUG

--HG--
extra : convert_revision : 8205633c1c1b49b04f389aa40f95fbbc03a43fb6
This commit is contained in:
Nathan Binkert 2004-01-29 22:30:14 -05:00
parent cb35f819c5
commit 9374efa725

View file

@ -192,8 +192,10 @@ Tru64System::Tru64System(const string _name, const uint64_t _init_param,
//INSTRUMENTATION CODEGEN END //INSTRUMENTATION CODEGEN END
#endif //FS_MEASURE #endif //FS_MEASURE
#ifdef DEBUG
kernelPanicEvent = new BreakPCEvent(&pcEventQueue, "kernel panic"); kernelPanicEvent = new BreakPCEvent(&pcEventQueue, "kernel panic");
consolePanicEvent = new BreakPCEvent(&pcEventQueue, "console panic"); consolePanicEvent = new BreakPCEvent(&pcEventQueue, "console panic");
#endif
badaddrEvent = new BadAddrEvent(&pcEventQueue, "badaddr"); badaddrEvent = new BadAddrEvent(&pcEventQueue, "badaddr");
skipPowerStateEvent = new SkipFuncEvent(&pcEventQueue, skipPowerStateEvent = new SkipFuncEvent(&pcEventQueue,
"tl_v48_capture_power_state"); "tl_v48_capture_power_state");
@ -262,6 +264,7 @@ Tru64System::Tru64System(const string _name, const uint64_t _init_param,
strcpy(osflags, boot_osflags.c_str()); strcpy(osflags, boot_osflags.c_str());
} }
#ifdef DEBUG
if (kernelSymtab->findAddress("panic", addr)) if (kernelSymtab->findAddress("panic", addr))
kernelPanicEvent->schedule(addr); kernelPanicEvent->schedule(addr);
else else
@ -269,6 +272,7 @@ Tru64System::Tru64System(const string _name, const uint64_t _init_param,
if (consoleSymtab->findAddress("panic", addr)) if (consoleSymtab->findAddress("panic", addr))
consolePanicEvent->schedule(addr); consolePanicEvent->schedule(addr);
#endif
if (kernelSymtab->findAddress("badaddr", addr)) if (kernelSymtab->findAddress("badaddr", addr))
badaddrEvent->schedule(addr); badaddrEvent->schedule(addr);
@ -511,8 +515,10 @@ Tru64System::~Tru64System()
delete kernelSymtab; delete kernelSymtab;
delete consoleSymtab; delete consoleSymtab;
#ifdef DEBUG
delete kernelPanicEvent; delete kernelPanicEvent;
delete consolePanicEvent; delete consolePanicEvent;
#endif
delete badaddrEvent; delete badaddrEvent;
delete skipPowerStateEvent; delete skipPowerStateEvent;
delete skipScavengeBootEvent; delete skipScavengeBootEvent;