@@ -527,20 +527,22 @@ def get_child_at_index(self, index):
527527 def update (self ):
528528 # type: () -> None
529529 table = self .table ()
530- capacity = table .GetChildMemberWithName ("bucket_mask" ).GetValueAsUnsigned () + 1
531- ctrl = table .GetChildMemberWithName ("ctrl" ).GetChildAtIndex (0 )
530+ inner_table = table .GetChildMemberWithName ("table" )
532531
533- self .size = table .GetChildMemberWithName ("items" ).GetValueAsUnsigned ()
532+ capacity = inner_table .GetChildMemberWithName ("bucket_mask" ).GetValueAsUnsigned () + 1
533+ ctrl = inner_table .GetChildMemberWithName ("ctrl" ).GetChildAtIndex (0 )
534+
535+ self .size = inner_table .GetChildMemberWithName ("items" ).GetValueAsUnsigned ()
534536 self .pair_type = table .type .template_args [0 ]
535537 if self .pair_type .IsTypedefType ():
536538 self .pair_type = self .pair_type .GetTypedefedType ()
537539 self .pair_type_size = self .pair_type .GetByteSize ()
538540
539- self .new_layout = not table .GetChildMemberWithName ("data" ).IsValid ()
541+ self .new_layout = not inner_table .GetChildMemberWithName ("data" ).IsValid ()
540542 if self .new_layout :
541543 self .data_ptr = ctrl .Cast (self .pair_type .GetPointerType ())
542544 else :
543- self .data_ptr = table .GetChildMemberWithName ("data" ).GetChildAtIndex (0 )
545+ self .data_ptr = inner_table .GetChildMemberWithName ("data" ).GetChildAtIndex (0 )
544546
545547 u8_type = self .valobj .GetTarget ().GetBasicType (eBasicTypeUnsignedChar )
546548 u8_type_size = self .valobj .GetTarget ().GetBasicType (eBasicTypeUnsignedChar ).GetByteSize ()
@@ -563,7 +565,7 @@ def table(self):
563565 # HashSet wraps either std HashMap or hashbrown::HashSet, which both
564566 # wrap hashbrown::HashMap, so either way we "unwrap" twice.
565567 hashbrown_hashmap = self .valobj .GetChildAtIndex (0 ).GetChildAtIndex (0 )
566- return hashbrown_hashmap .GetChildMemberWithName ("table" ). GetChildMemberWithName ( "table" )
568+ return hashbrown_hashmap .GetChildMemberWithName ("table" )
567569
568570 def has_children (self ):
569571 # type: () -> bool
0 commit comments