There are two interrelated suggestions here: a primary and a secondary.
Assume that the user has code compiled with debugging options, so locations in the Disassembly window can be mapped to approximate locations in the C source code.
The Disassembly window does show (in orange text) the source filename and line number. However, it is a completely manual operation to find this file, open it, and scroll to that line number.
What about a right-click option in the Disassembly code to seek to the corresponding C code? There is already a right-click "Go To Source Code" in the Call Stack window that would be similar in operation.
When a Data Abort happens, the user either has the standard Rowley startup handler (endless loop), or they've substituted a routine that prints out the Link Register value.
Say the user has the standard Rowley startup handler. The procedure to find the offending code is:
Break execution (if Crossworks didn't automatically Break)
Go to Registers window
expand the CPU Context that has the Link Register for the abort
note the Link Register value
subtract 8 to determine the address
Go to the Disassembly window
enter the calculated address at the top of the Disassembly window
then, perform steps in Primary above to map this location to C code
I don't wish to look a gift horse in the mouth, as Crossworks is light years ahead of what embedded tools offered in decades past (and even today), but would it be worthwhile to aid the user in getting to the code that caused the Abort?
Please sign in to leave a comment.