summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2004-11-18 10:52:56 -0500
committerSteve Reinhardt <stever@eecs.umich.edu>2004-11-18 10:52:56 -0500
commit7bac427874d2999073074354d0b2cc6fc95487e9 (patch)
treeac13f2ed5b64942ee5ac6bc1644b5df06732e6a2 /sim
parent171ebf16be437ff83987da2d74c33a5407a41d48 (diff)
downloadgem5-7bac427874d2999073074354d0b2cc6fc95487e9.tar.xz
Minor fixes.
base/loader/ecoff_object.cc: Only warn (not die) if we can't load symbols from an ecoff object. sim/debug.cc: Compile in functioning debug_break unless NDEBUG, not only if DEBUG. Print warning if we hit breakpoint when compiled with NDEBUG. sim/debug.hh: Compile in functioning debug_break unless NDEBUG, not only if DEBUG. --HG-- extra : convert_revision : baef2caac4a9c88e1389660823eaa7c42b1d19c8
Diffstat (limited to 'sim')
-rw-r--r--sim/debug.cc6
-rw-r--r--sim/debug.hh4
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__