On Cortex-M we can just return SP directly, which will return
PSP/MSP depending on the current processor mode.
Note that unwarminder doesn't handle Cortex-M exception frames
yet, so a panic from an interrupt handler will currently stop
at the exception boundary.
Change-Id: I8818126c065c896d781bd52b877965a4094dee2a
__get_sp is missing a return! I don't know how it ever worked.
Use "bx lr" since it works in all cases (armp and thumb).
Change-Id: I26011db333a8a5f96276be83e18da7507c501c38
Reviewed-on: http://gerrit.rockbox.org/206
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Simplified stack unwinder for ARM. This is port of
http://www.mcternan.me.uk/ArmStackUnwinding/
backtrace() is called from UIE() on native targets
and from panicf() on both native and ARM RaaA.
Change-Id: I8e4b3c02490dd60b30aa372fe842d193b8929ce0