$ gdb ecrash_test.debug GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-suse-linux"...Using host libthread_db library "/lib64/tls/libthread_db.so.1". (gdb) list *0x401a84 0x401a84 is in createGlobalBacktrace (eCrash.c:305). 300 * 301 */ 302 static void createGlobalBacktrace( void ) 303 { 304 305 gbl_backtraceEntries = backtrace(gbl_backtraceBuffer, 306 gbl_params.maxStackDepth); 307 308 /* This is NOT signal safe -- it calls malloc. We need to 309 let the caller pass in a pointer to a symbol table inside of (gdb) list *0x401bfa 0x401bfa is in outputBacktrace (eCrash.c:361). 356 * Output our current stack's backtrace 357 */ 358 static void outputBacktrace( void ) 359 { 360 createGlobalBacktrace(); 361 outputGlobalBacktrace(); 362 } /* outputBacktrace */ 363 364 static void outputBacktraceThreads( void ) 365 { (gdb) list *0x401d6b 0x401d6b is in crash_handler (eCrash.c:416). 411 outputPrintf("* Got a crash! signo=%d\n", signo); 412 outputPrintf("*\n"); 413 outputPrintf("* Offending Thread's Backtrace:\n"); 414 outputPrintf("*\n"); 415 outputBacktrace(); 416 outputPrintf("*\n"); 417 418 if (gbl_params.dumpAllThreads != FALSE) { 419 outputBacktraceThreads(); 420 } (gdb) list *0x2aaaaad04f00 No source file for address 0x2aaaaad04f00. (gdb) list *0x400ed4 0x400ed4 is in crashC (ecrash_test.c:83). 78 79 void crashC(char *name) 80 { 81 int *kaBoom = NULL; 82 printf("%s: kaBoom\n", name); fflush(stdout); 83 *kaBoom = 7; 84 } 85 void crashB(char *name) 86 { 87 crashC(name); (gdb) list *0x400ef1 0x400ef1 is in crashB (ecrash_test.c:88). 83 *kaBoom = 7; 84 } 85 void crashB(char *name) 86 { 87 crashC(name); 88 } 89 void crashA (char *name) 90 { 91 crashB(name); 92 } (gdb) list *0x400f08 0x400f08 is in crashA (ecrash_test.c:92). 87 crashC(name); 88 } 89 void crashA (char *name) 90 { 91 crashB(name); 92 } 93 94 void *ecrash_test_thread(void *vparams) 95 { 96 eCrashTestParams *params = (eCrashTestParams *)vparams; (gdb) list *0x400fa0 0x400fa0 is in ecrash_test_thread (ecrash_test.c:111). 106 if (params->threadToCrash == params->threadNumber) { 107 printf("%s: Sleeping %d seconds before crash\n", 108 threadName, params->secondsBeforeCrash); 109 fflush(stdout); 110 sleep(params->secondsBeforeCrash); 111 crashA(threadName); 112 } else { 113 sleepFuncA(threadName); 114 } 115 (gdb) list *0x2aaaaabc884f No source file for address 0x2aaaaabc884f. (gdb) list *0x2aaaaad90703 No source file for address 0x2aaaaad90703. (gdb) quit