summaryrefslogtreecommitdiff
path: root/lldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py
AgeCommit message (Collapse)Author
2025-07-30[lldb] deactivate some tests on older SDKs (#147768)Charles Zablit
https://github.com/llvm/llvm-project/pull/144913 was reverted because some of the Darwin tests were failing on SDKs prior to `15.0`. Only the x86 bots run on macOS `14.0`. The aarch64 ones run on macOS `15.0`. In this patch, we deactivate the failing Darwin tests on older SDKs (prior to `15.0`).
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
2023-02-10[lldb][Test] Check compiler in data forammter compiler version checksMichael Buch
**Summary** The compiler version check wouldn't make sense for non-GCC compilers, so check for the compiler too. Differential Revision: https://reviews.llvm.org/D143656
2023-02-02[lldb][Test] Fix import-std-module and data-formatter tests on older compilersMichael Buch
Fixes API tests for older compilers. Since https://reviews.llvm.org/D141828 defaulted arguments will be omitted, but older Clang's won't. Differential Revision: https://reviews.llvm.org/D143022
2023-01-27Reland "[lldb] Add support for DW_AT_default_value in template params"Michael Buch
**Summary** This patch makes LLDB understand the `DW_AT_default_value` on template argument DIEs. As a result, type summaries will no longer contain the defaulted template arguments, reducing noise substantially. E.g., Before: ``` (lldb) v nested (std::vector<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator <char> > > > > >) nested = size=0 {} ``` After: ``` (lldb) v nested (std::vector<std::vector<std::basic_string<char> > >) nested = size=0 {} ``` See discussion in https://reviews.llvm.org/D140423 **Testing** * Adjust API tests * Added unit-test Differential Revision: https://reviews.llvm.org/D141828
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-10-04[lldb][import-std-module] Prefer the non-module diagnostics when in fallback ↵Raphael Isemann
mode The `fallback` setting for import-std-module is supposed to allow running expression that require an imported C++ module without causing any regressions for users (neither in terms of functionality nor performance). This is done by first trying to normally parse/evaluate an expression and when an error occurred during this first attempt, we retry with the loaded 'std' module. When we run into a system with a 'std' module that for some reason doesn't build or otherwise causes parse errors, then this currently means that the second parse attempt will overwrite the error diagnostics of the first parse attempt. Given that the module build errors are outside of the scope of what the user can influence, it makes more sense to show the errors from the first parse attempt that are only concerned with the actual user input. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D110696
2020-12-10[lldb] Allow LLDB to automatically retry a failed expression with an ↵Raphael Isemann
imported std C++ module By now LLDB can import the 'std' C++ module to improve expression evaluation, but there are still a few problems to solve before we can do this by default. One is that importing the C++ module is slightly slower than normal expression evaluation (mostly because the disk access and loading the initial lookup data is quite slow in comparison to the barebone Clang setup the rest of the LLDB expression evaluator is usually doing). Another problem is that some complicated types in the standard library aren't fully supported yet by the ASTImporter, so we end up types that fail to import (which usually appears to the user as if the type is empty or there is just no result variable). To still allow people to adopt this mode in their daily debugging, this patch adds a setting that allows LLDB to automatically retry failed expression with a loaded C++ module. All success expressions will behave exactly as they would do before this patch. Failed expressions get a another parse attempt if we find a usable C++ module in the current execution context. This way we shouldn't have any performance/parsing regressions in normal debugging workflows, while the debugging workflows involving STL containers benefit from the C++ module type info. This setting is off by default for now with the intention to enable it by default on macOS soon-ish. The implementation is mostly just extracting the existing parse logic into its own function and then calling the parse function again if the first evaluation failed and we have a C++ module to retry the parsing with. Reviewed By: shafik, JDevlieghere, aprantl Differential Revision: https://reviews.llvm.org/D92784