Avoid sending a signal to ourselves if we're not debugging
--HG-- extra : convert_revision : d6ba1ce30bad4a44d716238a8107c3bff0ce89c4
This commit is contained in:
parent
a4d7bb113a
commit
ce697a592e
2 changed files with 6 additions and 0 deletions
|
@ -40,11 +40,13 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
void
|
void
|
||||||
debug_break()
|
debug_break()
|
||||||
{
|
{
|
||||||
kill(getpid(), SIGTRAP);
|
kill(getpid(), SIGTRAP);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Debug event: place a breakpoint on the process function and
|
// Debug event: place a breakpoint on the process function and
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#ifndef __DEBUG_HH__
|
#ifndef __DEBUG_HH__
|
||||||
#define __DEBUG_HH__
|
#define __DEBUG_HH__
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
void debug_break();
|
void debug_break();
|
||||||
|
#else
|
||||||
|
inline void debug_break() { }
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // __DEBUG_HH__
|
#endif // __DEBUG_HH__
|
||||||
|
|
Loading…
Reference in a new issue