Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5 |
|
#
2238dcc3 |
| 25-May-2023 |
Jonas Devlieghere <jonas@devlieghere.com> |
[NFC][Py Reformat] Reformat python files in lldb
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0).
If you end up having problem
[NFC][Py Reformat] Reformat python files in lldb
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0).
If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black.
RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style
Differential revision: https://reviews.llvm.org/D151460
show more ...
|
Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2 |
|
#
c97e5adb |
| 27-Sep-2022 |
Michael Buch <michaelbuch12@gmail.com> |
[lldb][test] Disable TestSBValueUnsignedEnumBitField.py for old DWARF versions
With older DWARF versions we don't encode the enum's underlying type in DWARF. In those cases LLDB sign-extends the bit
[lldb][test] Disable TestSBValueUnsignedEnumBitField.py for old DWARF versions
With older DWARF versions we don't encode the enum's underlying type in DWARF. In those cases LLDB sign-extends the bitfield as a signed integer. Without the actual enum type being present in DWARF there's not much we can do.
Differential Revision: https://reviews.llvm.org/D134734
show more ...
|
#
d5d90428 |
| 22-Sep-2022 |
Michael Buch <michaelbuch12@gmail.com> |
[lldb][TypeSystemClang] Deduce lldb::eEncodingUint for unsigned enum types
The motivating issue was the following: ``` $ cat main.cpp enum class EnumVals : uint16_t { VAL1 = 0 };
struct Foo {
[lldb][TypeSystemClang] Deduce lldb::eEncodingUint for unsigned enum types
The motivating issue was the following: ``` $ cat main.cpp enum class EnumVals : uint16_t { VAL1 = 0 };
struct Foo { EnumVals b1 : 4; };
int main() { // Assign value out-of-range if // bit-field were signed Foo f{.b1 = (EnumVals)8};
return 0; // Break here }
(lldb) script >>> lldb.frame.FindVariable("f").GetChildMemberWithName("b1").GetValueAsUnsigned() 4294967288 ```
In the above example we observe a unsigned integer wrap-around because we sign-extended the bit-fields underlying Scalar value before casting it to an unsigned. The sign extension occurs because we don't mark APSInt::IsUnsigned == true correctly when extracting the value from memory (in Value::ResolveValue). The reason why sign extension causes the wraparound is that the value we're assigning to the bit-field is out-of-range (if it were a signed bit-field), which causes `Scalar::sext` to left-fill the Scalar with 1s.
This patch corrects GetEncoding to account for unsigned enum types. With this change the Scalar would be zero-extended instead.
This is mainly a convenience fix which well-formed code wouldn't encounter.
rdar://99785324
Differential Revision: https://reviews.llvm.org/D134493
show more ...
|