How to make backtrace()/backtrace_symbols() print the function names?

后端 未结 5 1915
别那么骄傲
别那么骄傲 2020-11-29 16:57

The Linux specific backtrace() and backtrace_symbols() allows you to produce a call trace of the program. However, it only prints function addresse

5条回答
  •  旧时难觅i
    2020-11-29 17:13

    Use the addr2line command to map executable addresses to source code filename+line number. Give the -f option to get function names as well.

    Alternatively, try libunwind.

提交回复
热议问题