Make the debugger a bit more useful with m5.opt by moving stuff
from #ifdef DEBUG to #ifndef NDEBUG base/remote_gdb.cc: make the remote debugger gdb stuff work in m5.opt sim/system.cc: sim/system.hh: make the console panic break event happen in m5.opt --HG-- extra : convert_revision : 044a9b7cdacb058112388a31315e45c5d8cf70fd
This commit is contained in:
parent
47ff0af17e
commit
108cfe53d6
|
@ -133,7 +133,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef NDEBUG
|
||||
vector<RemoteGDB *> debuggers;
|
||||
int current_debugger = -1;
|
||||
|
||||
|
@ -195,12 +195,12 @@ GDBListener::listen()
|
|||
event = new Event(this, listener.getfd(), POLLIN);
|
||||
pollQueue.schedule(event);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef NDEBUG
|
||||
gdb->number = debuggers.size();
|
||||
debuggers.push_back(gdb);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef NDEBUG
|
||||
ccprintf(cerr, "%d: %s: listening for remote gdb #%d on port %d\n",
|
||||
curTick, name(), gdb->number, port);
|
||||
#else
|
||||
|
|
|
@ -123,7 +123,7 @@ System::System(Params *p)
|
|||
DPRINTF(Loader, "Kernel loaded...\n");
|
||||
|
||||
Addr addr = 0;
|
||||
#ifdef DEBUG
|
||||
#ifndef NDEBUG
|
||||
consolePanicEvent = addConsoleFuncEvent<BreakPCEvent>("panic");
|
||||
#endif
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ class System : public SimObject
|
|||
|
||||
Kernel::Binning *kernelBinning;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef NDEBUG
|
||||
/** Event to halt the simulator if the console calls panic() */
|
||||
BreakPCEvent *consolePanicEvent;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue