How do I get a valid backtrace()?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How do I get a valid backtrace()?

841 次查看
tfarnham
Contributor II

Within my applications, I am needing to be able to generate a valid call stack for reporting purposes.  I do this successfully on my standard x86 based Ubuntu machine using the backtrace() function in concert with backtrace_symbols().  However, when I try to perform the same operations running on the i.MX 6Q Sabre SD, I get mixed results.  Some look valid, but most are incomplete or invalid in some way.  I have tried compiling using -fno-omit-frame-pointer -mapcs-frame -funwind-tables -rdynamic, but nothing seems to affect the output of the backtrace() function.

0 项奖励
回复
1 回复

784 次查看
Yuri
NXP Employee
NXP Employee

Hello,

   Please try to compile Your application without any optimization.


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复