This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can we inspect contents of the return stack to get the call tree?

Using Cortex-R5F, I would like to get the contents of the 4-entry call-return stack (i.e. get the addresses). Is this possible through some indirect manner?

The goal here is to have the knowlege of the call tree above the current execution point (backtrace). In my situation, the call tree must be determined by the OS on target and in real-time, it must work when no debugger is attached and the debug symbols are not loaded onto the target. From my understanding, getting the LR saved in the real stack (in RAM) is not possible with ARM architecture since the call tree agent cannot know the size of the stack frame and the offset where LR is saved in that frame. Inspecting the call-return stack embedded in the core itself would be an alternative.

Thanks.