简体   繁体   中英

Crash handler printing a backtrace

I want to install a SIGSEGV and friends handler in C++ to print a stack trace and exit on a crash.

backtrace_symbols_fd from glibc is almost what I want, but it doesn't symbolize calls in anonymous namespaces. However, gdb deals with that just fine (I have symbols compiled in, DWARF etc).

What library would you recommend for my situation?

您是否看过abi::__cxa_demangle应该正确地将backtrace_symbols的输出abi::__cxa_demangle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM