How do I get a valid backtrace()?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I get a valid backtrace()?

838 Views
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 Kudos
Reply
1 Reply

781 Views
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 Kudos
Reply