From: Nathan Binkert Date: Thu, 13 May 2004 10:59:05 +0000 (-0400) Subject: Avoid sending a signal to ourselves if we're not debugging X-Git-Tag: m5_1.0_beta2~38 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce697a592e9e999f49d39e8ffe75995f0fb7eeb9;p=gem5.git Avoid sending a signal to ourselves if we're not debugging --HG-- extra : convert_revision : d6ba1ce30bad4a44d716238a8107c3bff0ce89c4 --- diff --git a/sim/debug.cc b/sim/debug.cc index 09c604a95..b73ab4245 100644 --- a/sim/debug.cc +++ b/sim/debug.cc @@ -40,11 +40,13 @@ using namespace std; +#ifdef DEBUG void debug_break() { kill(getpid(), SIGTRAP); } +#endif // // Debug event: place a breakpoint on the process function and diff --git a/sim/debug.hh b/sim/debug.hh index eb0be772e..a4f8b8702 100644 --- a/sim/debug.hh +++ b/sim/debug.hh @@ -29,6 +29,10 @@ #ifndef __DEBUG_HH__ #define __DEBUG_HH__ +#ifdef DEBUG void debug_break(); +#else +inline void debug_break() { } +#endif #endif // __DEBUG_HH__