- 05 Apr, 2016 1 commit
-
-
Jeffrey Lee authored
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'
-
- 28 Nov, 2013 1 commit
-
-
Jeffrey Lee authored
Detail: This change adds up-to-date VFP & NEON disassembly to the module, by way of a partially machine-generated disassembler written in C. It's also possible to build a standalone disassembler utility (dubbed 'dis2') which is 100% C and has support for all ARM instructions (including some obscure stuff the assembler disassembler currently lacks, e.g. XScale DSP instructions). One day this may completely replace the assembler disassembler, but at the moment it's a bit bulky and probably has a few bugs left to squash. The disassembler is also fairly flexible, supporting various output formatting options. Main changes: - Makefile - Rewritten to switch over to using the CModule makefile fragment instead of AAsmModule, to allow the C code to be included in the component. Also added 'dis2' as an alternative component to build as. - Resources/UK/Messages, Resources/Germany/Messages - Updated with new disassembler messages - s/Debugger - Add new UseCVFPNEON switch to allow control over whether the module builds with the C VFP/NEON disassembler or the original assembler VFP disassembler - s/CGlue - Glue code used with the C disassembler to bridge the gap between the assembler world and the C world - actions/* - A set of decgen action files describing what to do for each instruction the new disassembler supports. These are basically just blocks of C code - although they need to match up with the encoding names in Library/Misc/decgen/encodings - cache/* - Folder for decgen to cache decision trees in. Building the decision tree for the disassembler is currently a lengthy process, but caching the trees reduces the build time to a fraction of the full time. - c/head - Stub C file that decgen prepends to the code it generates - c/main - main frontend for the standalone version of the disassembler - c/support - Reimplementation of the standard C library functions required for the disassembler. This allows us to avoid a runtime dependency on the shared C library, and also allows us to deal with control-terminated strings from messagetrans where relevant. For convenience this file also has the main entry point that's called from assembler. - c/util - Utility code for outputting various forms of instruction, decoding immediate constants, etc. - h/dis2 - Header file for the C code - Test/c/testbed - Simple C testbed app to allow the output of dis2 to be compared against the Debugger module and decaof - !MkDis2,fd7 - Script to allow easy building of the standalone 'dis2' disassembler Bugfixes: - s/ARMv6 - Change 'ROR#' to 'ROR #' for UXTAB, etc. disassembly. Fix bitfield extract & clear instructions to detect unpredictable/invalid bitfield definitions Misc other changes: - s/* - Source files updated so s/Debugger contains a list of GETs instead of each source file LNK'ing to the next Admin: Tested in ROM form on BB-xM, and as softload on Iyonix German messages are in need of translation Requires Library-1_65 and BuildSys-6_34 Version 1.85. Tagged as 'Debugger-1_85'
-