[all-commits] [llvm/llvm-project] 0ae237: [lldb] Do not produce field information for regist...
David Spickett via All-commits
all-commits at lists.llvm.org
Thu Jun 27 01:27:16 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0ae23708ef4345f0832ba4443ce7b184248b4784
https://github.com/llvm/llvm-project/commit/0ae23708ef4345f0832ba4443ce7b184248b4784
Author: David Spickett <david.spickett at linaro.org>
Date: 2024-06-27 (Thu, 27 Jun 2024)
Changed paths:
M lldb/source/Plugins/Process/Utility/RegisterFlagsLinux_arm64.cpp
M lldb/source/Plugins/Process/Utility/RegisterFlagsLinux_arm64.h
M lldb/source/Target/RegisterFlags.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list