@@ -2850,38 +2850,38 @@ ValueObjectSP ValueObject::Dereference(Status &error) {
28502850 if (m_deref_valobj)
28512851 return m_deref_valobj->GetSP ();
28522852
2853- const bool is_valid_dereference_type =
2854- GetCompilerType ().IsValidDereferenceType ();
2855- if (is_valid_dereference_type) {
2856- bool omit_empty_base_classes = true ;
2857- bool ignore_array_bounds = false ;
2858-
2859- std::string child_name_str;
2860- uint32_t child_byte_size = 0 ;
2861- int32_t child_byte_offset = 0 ;
2862- uint32_t child_bitfield_bit_size = 0 ;
2863- uint32_t child_bitfield_bit_offset = 0 ;
2864- bool child_is_base_class = false ;
2865- bool child_is_deref_of_parent = false ;
2866- const bool transparent_pointers = false ;
2867- CompilerType compiler_type = GetCompilerType ();
2868- uint64_t language_flags = 0 ;
2853+ bool omit_empty_base_classes = true ;
2854+ bool ignore_array_bounds = false ;
2855+ std::string child_name_str;
2856+ uint32_t child_byte_size = 0 ;
2857+ int32_t child_byte_offset = 0 ;
2858+ uint32_t child_bitfield_bit_size = 0 ;
2859+ uint32_t child_bitfield_bit_offset = 0 ;
2860+ bool child_is_base_class = false ;
2861+ bool child_is_deref_of_parent = false ;
2862+ const bool transparent_pointers = false ;
2863+ CompilerType compiler_type = GetCompilerType ();
2864+ uint64_t language_flags = 0 ;
2865+ bool is_valid_dereference_type = false ;
28692866
2870- ExecutionContext exe_ctx (GetExecutionContextRef ());
2867+ ExecutionContext exe_ctx (GetExecutionContextRef ());
28712868
2872- CompilerType child_compiler_type;
2873- auto child_compiler_type_or_err = compiler_type.GetChildCompilerTypeAtIndex (
2874- &exe_ctx, 0 , transparent_pointers, omit_empty_base_classes,
2875- ignore_array_bounds, child_name_str, child_byte_size, child_byte_offset,
2876- child_bitfield_bit_size, child_bitfield_bit_offset, child_is_base_class,
2877- child_is_deref_of_parent, this , language_flags);
2878- if (!child_compiler_type_or_err)
2879- LLDB_LOG_ERROR (GetLog (LLDBLog::Types),
2880- child_compiler_type_or_err.takeError (),
2881- " could not find child: {0}" );
2882- else
2883- child_compiler_type = *child_compiler_type_or_err;
2869+ CompilerType child_compiler_type;
2870+ auto child_compiler_type_or_err = compiler_type.GetDereferencedType (
2871+ &exe_ctx, transparent_pointers, omit_empty_base_classes,
2872+ ignore_array_bounds, child_name_str, child_byte_size, child_byte_offset,
2873+ child_bitfield_bit_size, child_bitfield_bit_offset, child_is_base_class,
2874+ child_is_deref_of_parent, this , language_flags,
2875+ is_valid_dereference_type);
28842876
2877+ if (!child_compiler_type_or_err && is_valid_dereference_type)
2878+ LLDB_LOG_ERROR (GetLog (LLDBLog::Types),
2879+ child_compiler_type_or_err.takeError (),
2880+ " could not find child: {0}" );
2881+ else
2882+ child_compiler_type = *child_compiler_type_or_err;
2883+
2884+ if (is_valid_dereference_type) {
28852885 if (child_compiler_type && child_byte_size) {
28862886 ConstString child_name;
28872887 if (!child_name_str.empty ())
@@ -2916,7 +2916,6 @@ ValueObjectSP ValueObject::Dereference(Status &error) {
29162916 }
29172917 }
29182918 }
2919-
29202919 } else if (HasSyntheticValue ()) {
29212920 m_deref_valobj =
29222921 GetSyntheticValue ()->GetChildMemberWithName (" $$dereference$$" ).get ();
0 commit comments