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

stack unwinding, where and how to

Hello.

I have situation where I end up in exception and LR register points to invalid address. uC core is ARM7TDMI and RTX is used. I would like to check stack content and find out what functions were executed last
Question is where function registers will be saved when jumping to other address, in user stack or task in which that function is running stack? And which registers are pushed to stack in such action? I found that in case of cortex-m3 PC, xPSR, r[0..3], r12 and LR registers are pushed to stack, tho in case of ARM7TDMI I failed to find any answer to such question, and does that rule apply if registers are saved in task stack, if not how could I understand it and fetch last return addresses?

Any information regarding way of finding last executed functions return addresses are very welcome.

Laurynas