4 ms·
Darwin (iOS and Mac OS) have it too: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/backtrace_symbols.3.html https://devel
by cokernel_hacker 11y ago
Darwin (iOS and Mac OS) have it too: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/backtrace_symbols.3.html https://developer.apple.com/library/mac/documentation/Darwin...
- eliben 11y agoAh cool. But I'm fairly sure that these days os x uses libcxx which uses libunwind
- boulos 11y agoI seem to recall them implementing the unwind interface but with standard rbp/ebp unwinding. As in http://www.opensource.apple.com/source/Libc/Libc-498.1.1/gen/backtrace.c http://www.opensource.apple.com/source/Libc/Libc-498.1.1/gen... and http://www.opensource.apple.com/source/Libc/Libc-825.25/gen/thread_stack_pcs.c http://www.opensource.apple.com/source/Libc/Libc-825.25/gen/... My biggest problem with "standard" libunwind is how slow it is compared to a whole loop against the registers (which of course isn't reliable with -fomit-frame-pointer). IIRC, the gcc's call to backtrace actually parses DWARF to work around this (and thus is super slow).