Changeset 222 in flair-src for trunk/tools/FlairGCS/src/main.cpp
- Timestamp:
- 02/26/18 09:36:16 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/main.cpp
r45 r222 8 8 #include <qmetatype.h> 9 9 #include <tclap/CmdLine.h> 10 #include <execinfo.h> 11 #include <signal.h> 10 12 11 13 #include "Manager.h" … … 39 41 } 40 42 43 void seg_fault(int sig __attribute__((unused))) { 44 void *bt[32]; 45 int nentries; 46 47 printf("Segmentation fault:\n"); 48 /* Dump a backtrace of the frame which caused the segfault: */ 49 nentries = backtrace(bt, sizeof(bt) / sizeof(bt[0])); 50 backtrace_symbols_fd(bt, nentries, fileno(stdout)); 51 52 exit(1); 53 } 54 41 55 int main(int argc, char *argv[]) { 42 56 … … 52 66 53 67 compile_info("FlairGCS"); 68 69 // catch segfault 70 signal(SIGSEGV, seg_fault); 54 71 55 72 parseOptions(argc, argv);
Note:
See TracChangeset
for help on using the changeset viewer.