How to get a call stack backtrace? (deeply embedded, no library support)

前端 未结 6 1530

I want my exception handlers and debug functions to be able to print call stack backtraces, basically just like the backtrace() library function in glibc. Unfortunately, my C li

6条回答
  •  面向向阳花
    2021-01-31 11:14

    Does your executable contain debugging information, from compiling with the -g option? I think this is required to get a full stack trace without a frame pointer.

    You might need -gdwarf-2 to make sure it uses a format that includes unwind information.

提交回复
热议问题