summaryrefslogtreecommitdiff
path: root/sim/debug.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sim/debug.cc')
-rw-r--r--sim/debug.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sim/debug.cc b/sim/debug.cc
index 293edcbe2..3467d1669 100644
--- a/sim/debug.cc
+++ b/sim/debug.cc
@@ -40,13 +40,15 @@
using namespace std;
-#ifdef DEBUG
void
debug_break()
{
+#ifndef NDEBUG
kill(getpid(), SIGTRAP);
-}
+#else
+ cprintf("debug_break suppressed, compiled with NDEBUG\n");
#endif
+}
//
// Debug event: place a breakpoint on the process function and