Keil™, An ARM® Company

Discussion Forum

Exception Stack Backtracing?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Matt Woolsey
Posted
19-Dec-2005 14:40
Toolset
ARM
New! Exception Stack Backtracing?
Does anyone have any source code for handling abort exceptions and
doing some stack backtracing? I'm using the keil compiler, and the
supplied functions for Undefined Instruction, Prefetch Abort, and Data
Abort exceptions just sit in a while loop. I'd like to extract and
dump the offending program counter and a call stack.

I've also read about APCS - ARM Procedure Call Standard. Does the Keil compiler use this?

Thanks.
Read-Only
Author
Reinhard Keil
Posted
4-Jan-2006 01:17
Toolset
ARM
New! RE: Exception Stack Backtracing?
Please take a look to:
http://www.keil.com/support/docs/3080.htm

CARM follows closely the APCS, but is not 100% compatible for struct passing.
Read-Only
Author
Matt Woolsey
Posted
4-Jan-2006 11:52
Toolset
ARM
New! RE: Exception Stack Backtracing?
I've done that, where I get the offending address from R14. I was looking for additional code to backtrace through the stack to get some idea of the execution path leading up to the abort. For example, if the data abort comes from the printf function, that's not much help, since printf is called all over the place. I want to find out who called printf.

Thanks,

MW

Next Thread | Thread List | Previous Thread Start a Thread | Settings