Debugger: Bring back the expression parser #11769
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
The old wxWidgets debugger used the expression parser for the
Go To In Memory View
andGo To In Disassembly
dialogs, however previously the Qt debugger did not. This brings back that missing functionality.In addition, I've made it so it should now be possible to translate the error messages generated by the expression parser. I've made some changes to its logic to fix an annoyance where it wouldn't accept a hex value starting with a letter (e.g. "f0000") without a base suffx, and to fix some stack buffer overflows.
It fixes an issue introduced by my symbol table PR where it would try to lookup symbols by their demangled names, even though the expression parser only supports parsing mangled/C-style symbol names. The approach I've taken is to build maps of the mangled names in
MipsExpressionFunctions::MipsExpressionFunctions
since while this restores the previous functionality, I don't think it's ideal. Improving this behaviour would require a more substantial rewrite of the expression parser.To make the behaviour explained above more practical, I've added an option in the function and global variable symbol trees to copy the mangled name of a symbol to the clipboard.
Rationale behind Changes
This was a very useful feature.
Suggested Testing Steps