Improve GDBVariableParser
This merge request proposes a rewriting of GDBVariableParser
.
Before this MR, the GDB variable structure was limited to one depth level ; for deeper levels, the raw GDB string was returned as is, leading to a LocalsView
difficult to read :
After this MR, there is no more limit on variable structure depth :
These improvements are also applied to the register scope view :
Some internal details of this rewriting :
- full recursive parsing, no limit on the variable structure depth
- no regular expression, just a few character tests are enough
- single pass : the input string is parsed from the beginning to the end in a straightforward way
- no unnecessary string copies, the remaining
tail
to parse is propagated as aQStringView
- an autotest has been added to check typical cases (from basic to complex)
- a fuzzy test has been added to detect potential problems that can be difficult to catch by reading the code (run 1000000 times without problem).
Edited by Rémi Peuchot