X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbctrace.C;h=930eabfc50f6bf562969812b3810c664e6782c75;hp=c50fff5f45acd2ce4681f222374fe77ebac9c753;hb=b9f98da8f1cd8b7b31ead02fa41f299b56cac3da;hpb=d348518c261d543e12282d516768d4f446434a42 diff --git a/cinelerra-5.1/guicast/bctrace.C b/cinelerra-5.1/guicast/bctrace.C index c50fff5f..930eabfc 100644 --- a/cinelerra-5.1/guicast/bctrace.C +++ b/cinelerra-5.1/guicast/bctrace.C @@ -5,6 +5,21 @@ #include "bctrace.h" +#ifdef BOOBY +#include +#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= 0 && the_list[i]->tid != tid ); + while( --i >= 0 && !(the_list[i]->tid == tid && the_list[i]->owner == owner) ); if( i >= 0 ) { printf("dbg_add, dup %016lx %s %s\n", (unsigned long)tid, nm, the_list[i]->name);