Add exception dump generation and processing facilities
Detail: This set of changes adds support for the following features: * A new code system variable, Debugger$DumpOptions, to control whether exception/crash dumps are collected from SeriousErrorV and where they should be output * Dump output can be in raw (binary) or annotated (text) form. * Annotated form provides detailed annotation of the stack(s), detecting certain constructs such as SWI invocations, IRQsema frames, CMHG veneers, APCS stack frame chains, and most forms of assembler function calls. The output isn't as easy to understand as a proper stack backtrace would be, but the low-level nature allows it to cope with corrupt or partially-overwritten stack frames, and avoids making invasive changes to components in order to make them backtrace-friendly * Stack annotation is able to make use of embedded ROM debug symbols (to be supported by romlinker 0.06) and Norcroft-style embedded function names in order to provide function-level location information for most ROM components and applications * System variables Debugger$RawFile and Debugger$AnnotatedFile to specify where to save raw and annotated exception dumps (preliminary, approach may change in future) * As well as supporting saving to file, the exception dumps can also be sent to the HAL via HAL_DebugTX, or if a program is driving SeriousErrorV directly it can use SeriousErrorV_CustomReport to have it fed to a custom callback function The code is structured in such a way that the core dump annotation code can potentially be built into a standalone application to allow offline processing of dumps (offline application not part of this checkin) File changes: c/exc, h/exc - Core code for producing the annotated exception dumps hdr/ExcDump - Header detailing the format of the binary dump s/ExceptionDump - Code variable and SeriousErrorV handling. Several support calls (used by c/exc) are also implemented here, in order to separate the dump processing from any interrogation of the originating machine Makefile - Updated for c/exc inclusion, and C header generation from hdr/ExcDump Resources/UK/Messages, Resources/Germany/Messages - New messages used by exception dump code c/support - Add a strcmp implementation, and extend vsprintf to be vsnprintf. Add support for string width format specifier. s/Debugger - Workspace definitions and init/shutdown hooks for exception dump code. Refactor *Where so that the locate logic is separate from the message output logic, to allow the locate logic to be used by the exception dump code. Admin: Tested on Raspberry Pi German messages in need of translation Version 1.92. Tagged as 'Debugger-1_92'
Showing with 2344 additions and 72 deletions