summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/lazy-loading
AgeCommit message (Collapse)Author
2023-05-25[NFC][Py Reformat] Reformat python files in lldbJonas Devlieghere
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
2022-06-17[lldb][tests] Automatically call compute_mydir (NFC)Dave Lee
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py. Differential Revision: https://reviews.llvm.org/D128077
2021-04-26[lldb] Skip TestPointerToMemberTypeDependingOnParentSize on Windows and GCCRaphael Isemann
The test added in D100977 is failing to compile on these platforms. This seems to be caused by GCC, MSVC and Clang@Windows rejecting the code because `ToLayout` isn't complete when pointer_to_member_member is declared (even though that seems to be valid code). This also reverts the test changes in the lazy-loading test from D100977 as that failed for the same reason.
2021-04-26[lldb] Use forward type in pointer-to-memberEmre Kultursay
This change is similar in spirit to the change at: https://reviews.llvm.org/rG34c697c85e9d0af11a72ac4df5578aac94a627b3 It fixes the problem where the layout of a type was being accessed while its base classes were not populated yet; which caused an incorrect layout to be produced and cached. This fixes PR50054 Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D100977
2021-04-12[lldb] Don't recursively load types of static member variables in the DWARF ↵Raphael Isemann
AST parser When LLDB's DWARF parser is parsing the member DIEs of a struct/class it currently fully resolves the types of static member variables in a class before adding the respective `VarDecl` to the record. For record types fully resolving the type will also parse the member DIEs of the respective class. The other way of resolving is just 'forward' resolving the type which 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 always resolve types on-demand so it's rarely useful to speculatively fully resolve them on the first use. This patch changes makes that we only 'forward' resolve the types of static members. This solves the fact that LLDB unnecessarily loads debug information to parse the type if it's maybe not needed later and it also avoids a crash where the parsed type might in turn reference the surrounding class that is currently being parsed. The new test case demonstrates the crash that might happen. The crash happens with 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 which LLDB 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 are currently 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 we later try to get the offset we end up hitting different asserts. Most common is the one in `TypeSystemClang::DumpValue` where it checks that the record layout has offsets for the current FieldDecl. ``` assert(field_idx < record_layout.getFieldCount()); ``` Fixed rdar://67910011 Reviewed By: shafik Differential Revision: https://reviews.llvm.org/D100180
2020-02-11[lldb][test] Remove symlink for API tests.Jordan Rupprecht
Summary: Moves lldbsuite tests to lldb/test/API. This is a largely mechanical change, moved with the following steps: ``` rm lldb/test/API/testcases mkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}} mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runner for 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; done for 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; done for 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, JDevlieghere Tags: #lldb Differential Revision: https://reviews.llvm.org/D71151