p/s proxy icon, rework window locks, segv in close_mixers + exportedl, ffmpeg default...
[goodguy/history.git] / cinelerra-5.1 / guicast / bctrace.C
index 027379bcad5faf867cb2d0e0d6acc32da51ba5d3..930eabfc50f6bf562969812b3810c664e6782c75 100644 (file)
@@ -5,6 +5,21 @@
 
 #include "bctrace.h"
 
 
 #include "bctrace.h"
 
+#ifdef BOOBY
+#include <execinfo.h>
+#define BT_BUF_SIZE 100
+// booby trap (backtrace)
+void booby() {
+       printf("BOOBY!\n"); 
+       void *buffer[BT_BUF_SIZE];
+       int nptrs = backtrace(buffer, BT_BUF_SIZE);
+       char **trace = backtrace_symbols(buffer, nptrs);
+       if( !trace ) return;
+       for( int i=0; i<nptrs; ) printf("%s\n", trace[i++]);
+       free(trace);
+}
+#endif
+
 BC_Trace *BC_Trace::global_trace = 0;
 int trace_memory = 0;
 int trace_locks = 1;
 BC_Trace *BC_Trace::global_trace = 0;
 int trace_memory = 0;
 int trace_locks = 1;