case IPR_IPLR:
#ifdef DEBUG
if (break_ipl != -1 && break_ipl == (int)(val & 0x1f))
- debug_break();
+ Debug::breakpoint();
#endif
// only write least significant five bits - interrupt level
#include "base/cprintf.hh"
+namespace Debug {
+
void
-debug_break()
+breakpoint()
{
#ifndef NDEBUG
kill(getpid(), SIGTRAP);
#else
- cprintf("debug_break suppressed, compiled with NDEBUG\n");
+ cprintf("Debug::breakpoint suppressed, compiled with NDEBUG\n");
#endif
}
+
+} // namespace Debug
#ifndef __BASE_DEBUG_HH__
#define __BASE_DEBUG_HH__
-void debug_break();
+namespace Debug {
+
+void breakpoint();
+
+} // namespace Debug
#endif // __BASE_DEBUG_HH__
{
id = id_count++;
if (debug_break_id >= 0 and debug_break_id == id)
- debug_break();
+ Debug::breakpoint();
}
Info::~Info()
{
StringWrap name(tc->getCpuPtr()->name() + ".break_event");
DPRINTFN("break event %s triggered\n", descr());
- debug_break();
+ Debug::breakpoint();
if (remove)
delete this;
}
intrTick = when;
if (intrTick < curTick()) {
- debug_break();
+ Debug::breakpoint();
intrTick = curTick();
}
udp->sum(cksum(udp));
txUdpChecksums++;
} else {
- debug_break();
+ Debug::breakpoint();
warn_once("UDPPKT set, but not UDP!\n");
}
} else if (extsts & EXTSTS_TCPPKT) {
tcp->sum(cksum(tcp));
txTcpChecksums++;
} else {
- debug_break();
+ Debug::breakpoint();
warn_once("TCPPKT set, but not UDP!\n");
}
}
ip->sum(cksum(ip));
txIpChecksums++;
} else {
- debug_break();
+ Debug::breakpoint();
warn_once("IPPKT set, but not UDP!\n");
}
}
intrTick = when;
if (intrTick < curTick()) {
- debug_break();
+ Debug::breakpoint();
intrTick = curTick();
}
void
DebugBreakEvent::process()
{
- debug_break();
+ Debug::breakpoint();
}
const char *
DebugBreakEvent::description() const
{
- return "debug break";
+ return "debug breakpoint";
}
//
void
debugbreak(ThreadContext *tc)
{
- debug_break();
+ Debug::breakpoint();
}
void