llvm-project/lldb/test/API/lang/cpp
Arthur Eubanks 8b80e8ee1f [lldb] Disable looking at pointee types to find synthetic value for non-ObjC
After D134378, we started seeing crashes with incomplete types (in the
context of shared libraries).

When trying to print a `std::vector<int> &` with only debug info for a
declaration, we now try to use the formatter after D134378. With an
incomplete type, this somehow goes into infinite recursion with the
frames

```
lldb_private::ValueObject::Dereference
lldb_private::ValueObjectSynthetic::CreateSynthFilter
lldb_private::ValueObjectSynthetic::ValueObjectSynthetic
lldb_private::ValueObject::CalculateSyntheticValue
lldb_private::ValueObject::HasSyntheticValue
```

This has to do with `FrontEndWantsDereference` that some STL formatters
set, causing recursion between the formatter (which tries to dereference),
and dereferencing (which wants to know if there's a formatter to avoid dereferencing).

The reason this only started appearing after D134378 was because
previously with incomplete types, for names with `<`, lldb would attempt
to parse template parameter DIEs, which were empty, then create an empty
`ClassTemplateSpecializationDecl` which overrode the name used to lookup
a formatter in `FormattersMatchData()` to not include template
parameters (e.g. `std::vector<> &`). After D134378 we don't create a
`ClassTemplateSpecializationDecl` when there are no template parameters
and the name to lookup a formatter is the original name (e.g.
`std::vector<int> &`).

The code to try harder with incomplete child compiler types was added in
D79554 for ObjC purposes.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D137983
2022-11-21 09:30:29 -08:00
..
abi_tag_lookup [lldb][ClangExpression] Add asm() label to all FunctionDecls we create from DWARF 2022-08-17 09:02:43 +01:00
accelerator-table [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
alignas_base_class [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
auto [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
bitfields [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
bool [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
break-on-initializers [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
breakpoint-commands [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
breakpoint_in_member_func_w_non_primitive_params [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
call-function [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
chained-calls [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
char8_t [lldb] Skip target variable tests on Darwin because of chained fixups 2022-08-12 10:23:15 -07:00
char1632_t [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
class-loading-via-member-typedef [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
class-template-non-type-parameter-pack [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
class-template-parameter-pack [lldb][test] Remove explicit mydir definitions (NFC) 2022-10-27 09:08:54 -07:00
class-template-type-parameter-pack [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
class_static [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
class_types [LLDB] Remove __future__ imports from tests 2022-08-15 08:54:06 +00:00
complete-type-check [lldb] Support simplified template names 2022-10-28 16:15:37 -07:00
const_static_integral_member [lldb][test] TestConstStaticIntegralMember.py: fix for clang-{9,11,13} 2022-11-10 14:09:10 -08:00
const_static_integral_member_int128 Reland "[lldb] Add support for using integral const static data members in the expression evaluator" 2022-07-15 10:52:35 +00:00
const_this [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
constructors [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
covariant-return-types [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
crtp [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
default-template-args [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
dereferencing_references [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
diamond [lldb] Remove prefer-dynamic-value test override 2022-08-22 15:46:03 -07:00
dynamic-value [lldb] Rewrite to assertEqual/assertNotEqual (NFC) 2022-11-11 17:03:02 -08:00
dynamic-value-same-basename [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
elaborated-types [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
enum_types [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
exceptions [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
extern_c [lldb] Pass TestExternCSymbols.py on Windows 2022-08-08 11:01:16 -07:00
forward-declared-template-specialization [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
frame-var-anon-unions [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
function-local-class [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
function-qualifiers Rename a duplicate test, also give the test class a useful name. 2022-09-27 12:38:22 -07:00
function-ref-qualifiers Rename a duplicate test, also give the test class a useful name. 2022-09-27 12:38:22 -07:00
function-template-parameter-pack
function_refs
global_operators [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
global_variables [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
gmodules [lldb][test] 2 - Add gmodules test category explicitly where previously done implicitly 2022-09-26 19:54:24 +01:00
incompatible-class-templates [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
incomplete-stl-types [lldb] Disable looking at pointee types to find synthetic value for non-ObjC 2022-11-21 09:30:29 -08:00
incomplete-types [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
inlines [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
keywords_enabled [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
lambdas
limit-debug-info [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
llvm-style
member-and-local-vars-with-same-name [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
modules-import [lldb] Remove unused "import unittest2" statements 2022-08-11 19:11:01 -07:00
multiple-inheritance [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
namespace [lldb][Test] Add missing breakpoint in TestNamespaceLookup.py 2022-08-26 10:28:28 +01:00
namespace_conflicts
namespace_definitions [lldb] Remove unused "import unittest2" statements 2022-08-11 19:11:01 -07:00
nested-class-other-compilation-unit [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
non-type-template-param [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
nsimport [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
offsetof
operator-overload [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
operators [lldb] Skip tests failing with GCC due to LLDB not being able to call constructors 2021-06-25 11:33:09 +02:00
overloaded-functions [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
pointer_to_member_type_depending_on_parent_size [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
printf Reland "[lldb/DWARF] Only match mangled name in full-name function lookup (with accelerators)" 2021-08-04 12:50:13 +02:00
reference-to-outer-type [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
rvalue-references [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
scope [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
scratch-context-merging/structs [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
signed_types [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
sizeof [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
static_member_type_depending_on_parent_size [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
static_members [lldb] Remove unused "import unittest2" statements 2022-08-11 19:11:01 -07:00
static_methods [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
std-function-step-into-callable [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
step-through-trampoline [lldb] Delete more mydir references (NFC) 2022-07-10 18:56:06 -07:00
stl [LLDB] Remove __future__ imports from tests 2022-08-15 08:54:06 +00:00
struct_with_keyword_name [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
structured-binding [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
subst_template_type_param [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
symbols
template [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
template-arguments [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
template-function [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
template-specialization-type [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
this [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
this_class_type_mixing [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
thread_local [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
trivial_abi [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
type_lookup [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
type_lookup_duplicate [lldb] Print newline between found types 2022-10-17 14:24:21 -07:00
typedef [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
typeof [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
unicode-literals [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
unique-types Apparently I moved the wrong one to "2", then Jason moved the right 2022-11-10 15:23:51 -08:00
unique-types2 [lldb] Fix simple template names and template params with scope qualifiers 2022-11-15 16:52:34 -08:00
unsigned_types [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
virtual-functions [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00
virtual-overload
wchar_t [lldb][tests] Automatically call compute_mydir (NFC) 2022-06-17 14:34:49 -07:00