aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2024-07-03 14:30:47 +0100
committerGitHub <noreply@github.com>2024-07-03 14:30:47 +0100
commitdde3f17026be48c05a5d3876f12db72fdd6422ed (patch)
tree48959d6a23b609a04f7e305924082e281e5a0335 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
parentc1004cad4b62b70c4b316a49c5426271d4e1d740 (diff)
downloadllvm-dde3f17026be48c05a5d3876f12db72fdd6422ed.zip
llvm-dde3f17026be48c05a5d3876f12db72fdd6422ed.tar.gz
llvm-dde3f17026be48c05a5d3876f12db72fdd6422ed.tar.bz2
[lldb] Fix printing of unsigned enum bitfields when they contain the max value (#96202)
While testing register fields I found that if you put the max value into a bitfield with an underlying type that is an unsigned enum, lldb would not print the enum name. This is because the code to match values to names wasn't checking whether the enum's type was signed, it just assumed it was. So for example a 2 bit field with value 3 got signed extended to -1, which didn't match the enumerator value of 3. So lldb just printed the number instead of the name. For a value of 1, the top bit was 0 so the sign extend became a zero extend, and lldb did print the name of the enumerator. I added a new test because I needed to use C++ to get typed enums. It checks min, max and an in between value for signed and unsigned enums applied to a bitfield.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h')
0 files changed, 0 insertions, 0 deletions