编译: # gcc -g -rdynamic backtrace.c # ./a.out called by 0x8048710 -- ./a.out(test2+0x3c) [0x8048710] called by 0x8048772 -- ./a.out(test1+0xb) [0x8048772] called by 0x804877f -- ./a.out(test+0xb) [0x804877f] called by 0x804878c -- ./a.out(main+0xb) [0x804878c] called by 0xbc7bd6 -- /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xbc7bd6] called by 0x8048641 -- ./a.out() [0x8048641]