Xtensa [patch] Add support for windowed ABI stack dump
Original Reporter info from Mantis: ccrause @ccrause
-
Reporter name: Christo Crause
Original Reporter info from Mantis: ccrause @ccrause
- Reporter name: Christo Crause
Description:
Add support for ESP32 stack dump functionality so that stack trace can be generated on error.
Modifications:
Consoleio.pp - fix call signature for dump_stack so that correct overloaded function gets called.
System.pp - wrap function StackTop in ifdef so that alternative StackTop can be provided for xtensa. dump_stack checks frame pointer against StackTop for validity so it needs to be realistic. Probably temporary until freertos is integrated with RTL.
xtensa.inc - added code to extract frame and caller addresses from stack for windowed ABI.
Note: the current stack trace starts one level above where e.g. RunError() is called because the caller's frame pointer is stored in the current frame, but the caller's return address is stored in a live register.
Mantis conversion info:
- Mantis ID: 37583
- Build: 46462
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 46463 (#66e682df)