diff options
author | David Spickett <david.spickett@linaro.org> | 2024-06-27 09:26:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-27 09:26:54 +0100 |
commit | 0ae23708ef4345f0832ba4443ce7b184248b4784 (patch) | |
tree | 2d4bbe8544e6398625a70b28e46b8cff44be338d /lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp | |
parent | bdeee9b105b7f1e75adcbfbd43f884d4ddb1a612 (diff) | |
download | llvm-0ae23708ef4345f0832ba4443ce7b184248b4784.zip llvm-0ae23708ef4345f0832ba4443ce7b184248b4784.tar.gz llvm-0ae23708ef4345f0832ba4443ce7b184248b4784.tar.bz2 |
[lldb] Do not produce field information for registers known not to exist (#95125)
Currently the logic is generate field information for all registers in
LinuxArm64RegisterFlags and then as we walk the existing register info,
only those that are in that existing info will get the new fields
patched in.
This works fine but on a review for FreeBSD support it was pointed out
that this is not obvious from the source code.
So instead I've allowed the construction of empty lists of fields, and
field detection methods can return an empty field list if they think
that the register will never exist.
Then the pre-existing code will see the empty field list, and never look
for that register in the register info.
I think removing the assert is ok because the GDB classes filter out
empty field lists at runtime, and anyone updating the built in field
information would presumably notice if none of the fields they intended
to add were displayed.
mte_ctrl and svcr are the only registers that need this so far.
There is no extra testing here as the behaviour is the same, it doesn't
add field information to regiters that don't exist. The mechanism is
just clearer now.
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp')
0 files changed, 0 insertions, 0 deletions