libzmq: problem: cannot get stack trace
I’m trying to debug libzmq and cannot stack trace on assert, I’m trying the following:
void* callstack[128];
int i, frames = backtrace(callstack, 128);
char** strs = backtrace_symbols(callstack, frames);
for (i = 0; i < frames; ++i) {
printf("%s\n", strs[i]);
}
free(strs);
But I don’t get the methods names, for example:
/home/somdoron/git/libzmq/src/.libs/libzmq.so.5(+0x189c0) [0x7ff8c9ad29c0]
/home/somdoron/git/libzmq/src/.libs/libzmq.so.5(+0x11bc0) [0x7ff8c9acbbc0]
/home/somdoron/git/libzmq/src/.libs/libzmq.so.5(+0x183b2) [0x7ff8c9ad23b2]
/home/somdoron/git/libzmq/tests/.libs/lt-test_inproc_connect() [0x403231]
/home/somdoron/git/libzmq/tests/.libs/lt-test_inproc_connect() [0x401076]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7ff8c94f2a40]
/home/somdoron/git/libzmq/tests/.libs/lt-test_inproc_connect() [0x4010b9]
I try to configure with --enable-debug, but output is the same.
I’m actually using the libzmq tests (make check), so how do I compile the tests with symbols of libzmq? Platform is Ubuntu and using autotools.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (15 by maintainers)
Will send as soon as I clean it up. Also managed to get demangled names: