Help me to find appropriate worlaround for __builtin_return_address(). For now i'm trying to use ccmalloc (http://fossies.org/linux/misc/ccmalloc-0.4.0.tar.gz/) package to profile memory usage, but i'm stuck with segmentation fault inside there: My backtrace under gdb is: #0 return_address (i=3) at src/callchain.c:1164 #1 0x08050292 in backtrace (skip=3) at src/callchain.c:1294 #2 0x0805548e in _ccmalloc_malloc (number_of_bytes=96) at src/callchain.c:4306 #3 0x08055ad8 in ccmalloc_malloc (number_of_bytes=96) at src/callchain.c:4590 #4 0x080568ed in malloc (n=96) at src/wrapper.c:318 #5 0xb7c8fc7c in ?? () from /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 #6 0xb7c9032e in CRYPTO_malloc () from /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 #7 0xb7d0aeec in lh_new () from /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 #8 0xb7d0d82a in ?? () from /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 #9 0xb7d0dbee in ?? () from /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 #10 0xb7d0d45f in ?? () from /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 #11 0xb7d0dec4 in ERR_load_ERR_strings () from /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 #12 0xb7d0e0a6 in ERR_load_strings () from /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 #13 0xb7d0196e in ERR_load_BIO_strings () from /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 #14 0x08049dd0 in main (argc=5, argv=0xbfffec44) at openssl_client.c:215 and __builtin_return_address(3) returns 0x80568ed __builtin_return_address(4) returns 0xb7c8fc7c and __builtin_return_address(5) - segmentation fault. It would be nice to have same functionality as gdb has for "where" command -- Kind regards, Sergey Ivanov