[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] Skip TestPointerToMemberTypeDependingOnParentSize on Windows and GCCThe test added in D100977 is failing to compile on these platforms. This seemsto be caused by GCC, MSVC and Clang@Windows
[lldb] Skip TestPointerToMemberTypeDependingOnParentSize on Windows and GCCThe test added in D100977 is failing to compile on these platforms. This seemsto be caused by GCC, MSVC and Clang@Windows rejecting the code because`ToLayout` isn't complete when pointer_to_member_member is declared (even thoughthat seems to be valid code).This also reverts the test changes in the lazy-loading test from D100977 asthat failed for the same reason.
[lldb] Use forward type in pointer-to-memberThis change is similar in spirit to the change at:https://reviews.llvm.org/rG34c697c85e9d0af11a72ac4df5578aac94a627b3It fixes the problem where the la
[lldb] Use forward type in pointer-to-memberThis change is similar in spirit to the change at:https://reviews.llvm.org/rG34c697c85e9d0af11a72ac4df5578aac94a627b3It fixes the problem where the layout of a type was being accessedwhile its base classes were not populated yet; which caused anincorrect layout to be produced and cached.This fixes PR50054Reviewed By: teemperorDifferential Revision: https://reviews.llvm.org/D100977
[lldb] Don't recursively load types of static member variables in the DWARF AST parserWhen LLDB's DWARF parser is parsing the member DIEs of a struct/class itcurrently fully resolves the types of
[lldb] Don't recursively load types of static member variables in the DWARF AST parserWhen LLDB's DWARF parser is parsing the member DIEs of a struct/class itcurrently fully resolves the types of static member variables in a class beforeadding the respective `VarDecl` to the record.For record types fully resolving the type will also parse the member DIEs of therespective class. The other way of resolving is just 'forward' resolving the typewhich will try to load only the minimum amount of information about the type(for records that would only be the name/kind of the type). Usually we alwaysresolve types on-demand so it's rarely useful to speculatively fully resolvethem on the first use.This patch changes makes that we only 'forward' resolve the types of staticmembers. This solves the fact that LLDB unnecessarily loads debug informationto parse the type if it's maybe not needed later and it also avoids a crash wherethe parsed type might in turn reference the surrounding class that is currentlybeing parsed.The new test case demonstrates the crash that might happen. The crash happenswith the following steps:1. We parse class `ToLayout` and it's members.2. We parse the static class member and fully resolve its type(`DependsOnParam2<ToLayout>`).3. That type has a non-static class member `DependsOnParam1<ToLayout>` for whichLLDB will try to calculate the size.4. The layout (and size)`DependsOnParam1<ToLayout>` turns depends on the`ToLayout` size/layout.5. Clang will calculate the record layout/size for `ToLayout` even though we arecurrently parsing it and it's missing it's non-static member.The created is missing the offset for the yet unparsed non-static member. If welater try to get the offset we end up hitting different asserts. Most common isthe one in `TypeSystemClang::DumpValue` where it checks that the record layouthas offsets for the current FieldDecl.``` assert(field_idx < record_layout.getFieldCount());```Fixed rdar://67910011Reviewed By: shafikDifferential Revision: https://reviews.llvm.org/D100180
[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