diff options
Diffstat (limited to 'sim')
-rw-r--r-- | sim/debug.cc | 6 | ||||
-rw-r--r-- | sim/debug.hh | 4 |
2 files changed, 4 insertions, 6 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 diff --git a/sim/debug.hh b/sim/debug.hh index 3ccf1dbd4..5ee77cf28 100644 --- a/sim/debug.hh +++ b/sim/debug.hh @@ -29,10 +29,6 @@ #ifndef __DEBUG_HH__ #define __DEBUG_HH__ -#ifdef DEBUG void debug_break(); -#else -inline void debug_break() { } -#endif #endif // __DEBUG_HH__ |