5 #error *****IsisDebug.h MUST be included before any system header files!***** 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()) +
92 std::string(
" --- ") +
96 currElement +=
"?????:0 --- " + demangled_name;
99 stackTraceResult->push_back(currElement);
105 #define ASSERT_PTR(x) 124 std::cerr << ">> " << __FILE__ << ":" << __LINE__ << \ 125 " error: ASSERT " << #x << " FAILED\n"; \ long long int BigInt
Big int.
Definition: Constants.h:65
void stopMonitoringMemory()
void startMonitoringMemory()
void InterruptSignal(int)
static void GetStackTrace(const void *)
Definition: IsisDebug.h:115
Definition: IsisDebug.h:113
void SegmentationFault(int)