5 #error *****IsisDebug.h MUST be included before any system header files!***** 
    8 void startMonitoringMemory();
 
    9 void stopMonitoringMemory();
 
   10 void SegmentationFault(
int);
 
   12 void InterruptSignal(
int);
 
   19 #include <libcwd/sys.h> 
   20 #include <libcwd/debug.h> 
   39 #define ASSERT_PTR(x)                                                       \ 
   40           if (libcwd::test_delete(x))                                       \ 
   42             std::cerr << ">> " << __FILE__ << ":" << __LINE__ <<            \ 
   43             " error: ASSERT POINTER " << #x << " FAILED\n";                 \ 
   46 class MyMutex : 
public QMutex {
 
   70     static void GetStackTrace(std::vector<std::string> *stackTraceResult) {
 
   71       stackTraceResult->clear();
 
   72       const int MAX_STACK_DEPTH = 1024;
 
   74       void *stackTrace[MAX_STACK_DEPTH];
 
   75       int stackSize = backtrace(stackTrace, MAX_STACK_DEPTH);
 
   77       for(
int stackEl = 2; stackEl < stackSize; stackEl ++) {
 
   78         std::string currElement;
 
   79         void *addr = stackTrace[stackEl];
 
   81         libcwd::location_ct addrInfo(addr);
 
   82         std::string demangled_name;
 
   83         libcwd::demangle_symbol(addrInfo.mangled_function_name(), demangled_name);
 
   87         if(addrInfo.is_known()) {
 
   89             std::string(addrInfo.file()) +
 
   91             QString((Isis::BigInt)addrInfo.line()) +
 
   92             std::string(
" --- ") +
 
   96           currElement += 
"?????:0 --- " + demangled_name;
 
   99         stackTraceResult->push_back(currElement);
 
  105 #define ASSERT_PTR(x) 
  115     static void GetStackTrace(
const void *) {}
 
  124             std::cerr << ">> " << __FILE__ << ":" << __LINE__ <<            \ 
  125             " error: ASSERT " << #x << " FAILED\n";                         \