Avoid sending a signal to ourselves if we're not debugging
authorNathan Binkert <binkertn@umich.edu>
Thu, 13 May 2004 10:59:05 +0000 (06:59 -0400)
committerNathan Binkert <binkertn@umich.edu>
Thu, 13 May 2004 10:59:05 +0000 (06:59 -0400)
--HG--
extra : convert_revision : d6ba1ce30bad4a44d716238a8107c3bff0ce89c4

sim/debug.cc
sim/debug.hh

index 09c604a951c57571949d8557d879e03415db1aa5..b73ab4245856e51da6d2994b7251bf85b7e999ec 100644 (file)
 
 using namespace std;
 
+#ifdef DEBUG
 void
 debug_break()
 {
     kill(getpid(), SIGTRAP);
 }
+#endif
 
 //
 // Debug event: place a breakpoint on the process function and
index eb0be772e1b2046bced7af32685593826bca55f6..a4f8b8702dfa0f1b8c85b0f9a472ebe22c04cb8b 100644 (file)
 #ifndef __DEBUG_HH__
 #define __DEBUG_HH__
 
+#ifdef DEBUG
 void debug_break();
+#else
+inline void debug_break() { }
+#endif
 
 #endif // __DEBUG_HH__