[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://reviews.llvm.org/D128077
show more ...
[lldb] Update field offset/sizes when encountering artificial members such as vtable pointers`DWARFASTParserClang::ParseSingleMember` turns DWARF DIEs that describestruct/class members into their
[lldb] Update field offset/sizes when encountering artificial members such as vtable pointers`DWARFASTParserClang::ParseSingleMember` turns DWARF DIEs that describestruct/class members into their respective Clang representation (e.g.,clang::FieldDecl). It also updates a record of where the last fieldstarted/ended so that we can speculatively fill any holes between a field and abitfield with unnamed bitfield padding.Right now we are completely ignoring 'artificial' members when parsing the DWARFof a struct/class. The only artificial member that seems to be emitted inpractice for C/C++ seems to be the vtable pointer.By completely skipping both the Clang AST node creation and the updating of thelast-field record, we essentially leave a hole in our layout with the size ofour artificial member. If the next member is a bitfield we then speculativelyfill the hole with an unnamed bitfield. During CodeGen Clang inserts anartificial vtable pointer into the layout again which now occupies the sameoffset as the unnamed bitfield. This later brings down Clang's`CGRecordLowering::insertPadding` when it checks that none of the fields of thegenerated record layout overlap.Note that this is not a Clang bug. We explicitly set the offset of our fields inLLDB and overwrite whatever Clang makes up.Reviewed By: labathDifferential Revision: https://reviews.llvm.org/D112697
[lldb] Modernize and expand TestCppBitfields* clang-format test source.* Removed the dead setup code.* Using expect_expr etc. instead of raw expect.* Slightly expanded with tests for vtable poin
[lldb] Modernize and expand TestCppBitfields* clang-format test source.* Removed the dead setup code.* Using expect_expr etc. instead of raw expect.* Slightly expanded with tests for vtable pointers (which mostly just crash atm.)* Removed some other minor test guideline problems.
Recommit: Compress formatting of array type names (int [4] -> int[4])Based on post-commit review discussion on2bd84938470bf2e337801faafb8a67710f46429d with Richard Smith.Other uses of forcing Ha
Recommit: Compress formatting of array type names (int [4] -> int[4])Based on post-commit review discussion on2bd84938470bf2e337801faafb8a67710f46429d with Richard Smith.Other uses of forcing HasEmptyPlaceHolder to false seem OK to me -they're all around pointer/reference types where the pointer/referencetoken will appear at the rightmost side of the left side of the typename, so they make nested types (eg: the "int" in "int *") behave asthough there is a non-empty placeholder (because the "*" is essentiallythe placeholder as far as the "int" is concerned).This was originally committed in 277623f4d5a672d707390e2c3eaf30a9eb4b075cReverted in f9ad1d1c775a8e264bebc15d75e0c6e5c20eefc7 due to breakagesoutside of clang - lldb seems to have some strange/strong dependence on"char [N]" versus "char[N]" when printing strings (not due to that nameappearing in DWARF, but probably due to using clang to stringify typenames) that'll need to be addressed, plus a few other odds and ends inother subprojects (clang-tools-extra, compiler-rt, etc).
[lldb] Enable TestCppBitfields on WindowsThe test works correctly on Windows, the linked bug has been resolved.Reviewed By: teemperorDifferential Revision: https://reviews.llvm.org/D102769
[lldb] Encode `bool` as unsigned int`bool` is considered to be unsigned according to `std::is_unsigned<bool>::value` (and `Type::GetTypeInfo`). Encoding it as signed int works fine for normal varia
[lldb] Encode `bool` as unsigned int`bool` is considered to be unsigned according to `std::is_unsigned<bool>::value` (and `Type::GetTypeInfo`). Encoding it as signed int works fine for normal variables and fields, but breaks when reading the values of boolean bitfields. If the field is declared as `bool b : 1` and has a value of `0b1`, the call to `SBValue::GetValueAsSigned()` will return `-1`.Reviewed By: teemperorDifferential Revision: https://reviews.llvm.org/D102685
[LLDB] Fix handling of bit-fields in a unionWhen parsing DWARF and laying out bit-fields we don't properly take into account when they are in a union, they will all have a zero offset.Differentia
[LLDB] Fix handling of bit-fields in a unionWhen parsing DWARF and laying out bit-fields we don't properly take into account when they are in a union, they will all have a zero offset.Differential Revision: https://reviews.llvm.org/D91118
[LLDB] Fix handling of bit-fields when there is a base class when parsing DWARFWhen parsing DWARF and laying out bit-fields we currently don't take into account whether we have a base class or not.
[LLDB] Fix handling of bit-fields when there is a base class when parsing DWARFWhen parsing DWARF and laying out bit-fields we currently don't take into account whether we have a base class or not.Currently if the first field is a bit-field but the bit offset is due a field we inherit from a base class we currentlytreat it as an unnamed bit-field and therefore add an extra field.This fix will not check if we have a base class and assume that this offset is due to members we are inheriting from the base.We are currently seeing asserts during codegen when debugging clang::DiagnosticOptions.This assumption will fail in the case where the first field in the derived class in an unnamed bit-field. Fixing the first fieldbeing an unnamed bit-field looks like it will require a larger change since we will need a way to track or discover the last field offset of the bases(s).Differential Revision: https://reviews.llvm.org/D76808
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdi
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}}mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runnerfor d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done```lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure.Reviewers: labath, JDevlieghereTags: #lldbDifferential Revision: https://reviews.llvm.org/D71151