@@ -2794,38 +2794,38 @@ ValueObjectSP ValueObject::Dereference(Status &error) {
27942794 if (m_deref_valobj)
27952795 return m_deref_valobj->GetSP ();
27962796
2797- const bool is_valid_dereference_type =
2798- GetCompilerType ().IsValidDereferenceType ();
2799- if (is_valid_dereference_type) {
2800- bool omit_empty_base_classes = true ;
2801- bool ignore_array_bounds = false ;
2802-
2803- std::string child_name_str;
2804- uint32_t child_byte_size = 0 ;
2805- int32_t child_byte_offset = 0 ;
2806- uint32_t child_bitfield_bit_size = 0 ;
2807- uint32_t child_bitfield_bit_offset = 0 ;
2808- bool child_is_base_class = false ;
2809- bool child_is_deref_of_parent = false ;
2810- const bool transparent_pointers = false ;
2811- CompilerType compiler_type = GetCompilerType ();
2812- uint64_t language_flags = 0 ;
2797+ bool omit_empty_base_classes = true ;
2798+ bool ignore_array_bounds = false ;
2799+ std::string child_name_str;
2800+ uint32_t child_byte_size = 0 ;
2801+ int32_t child_byte_offset = 0 ;
2802+ uint32_t child_bitfield_bit_size = 0 ;
2803+ uint32_t child_bitfield_bit_offset = 0 ;
2804+ bool child_is_base_class = false ;
2805+ bool child_is_deref_of_parent = false ;
2806+ const bool transparent_pointers = false ;
2807+ CompilerType compiler_type = GetCompilerType ();
2808+ uint64_t language_flags = 0 ;
2809+ bool is_valid_dereference_type = false ;
28132810
2814- ExecutionContext exe_ctx (GetExecutionContextRef ());
2811+ ExecutionContext exe_ctx (GetExecutionContextRef ());
28152812
2816- CompilerType child_compiler_type;
2817- auto child_compiler_type_or_err = compiler_type.GetChildCompilerTypeAtIndex (
2818- &exe_ctx, 0 , transparent_pointers, omit_empty_base_classes,
2819- ignore_array_bounds, child_name_str, child_byte_size, child_byte_offset,
2820- child_bitfield_bit_size, child_bitfield_bit_offset, child_is_base_class,
2821- child_is_deref_of_parent, this , language_flags);
2822- if (!child_compiler_type_or_err)
2823- LLDB_LOG_ERROR (GetLog (LLDBLog::Types),
2824- child_compiler_type_or_err.takeError (),
2825- " could not find child: {0}" );
2826- else
2827- child_compiler_type = *child_compiler_type_or_err;
2813+ CompilerType child_compiler_type;
2814+ auto child_compiler_type_or_err = compiler_type.GetDereferencedType (
2815+ &exe_ctx, transparent_pointers, omit_empty_base_classes,
2816+ ignore_array_bounds, child_name_str, child_byte_size, child_byte_offset,
2817+ child_bitfield_bit_size, child_bitfield_bit_offset, child_is_base_class,
2818+ child_is_deref_of_parent, this , language_flags,
2819+ is_valid_dereference_type);
28282820
2821+ if (!child_compiler_type_or_err && is_valid_dereference_type)
2822+ LLDB_LOG_ERROR (GetLog (LLDBLog::Types),
2823+ child_compiler_type_or_err.takeError (),
2824+ " could not find child: {0}" );
2825+ else
2826+ child_compiler_type = *child_compiler_type_or_err;
2827+
2828+ if (is_valid_dereference_type) {
28292829 if (child_compiler_type && child_byte_size) {
28302830 ConstString child_name;
28312831 if (!child_name_str.empty ())
@@ -2860,7 +2860,6 @@ ValueObjectSP ValueObject::Dereference(Status &error) {
28602860 }
28612861 }
28622862 }
2863-
28642863 } else if (IsSynthetic ()) {
28652864 m_deref_valobj = GetChildMemberWithName (" $$dereference$$" ).get ();
28662865 }
0 commit comments