@@ -527,20 +527,22 @@ def get_child_at_index(self, index):
527
527
def update (self ):
528
528
# type: () -> None
529
529
table = self .table ()
530
- capacity = table .GetChildMemberWithName ("bucket_mask" ).GetValueAsUnsigned () + 1
531
- ctrl = table .GetChildMemberWithName ("ctrl" ).GetChildAtIndex (0 )
530
+ inner_table = table .GetChildMemberWithName ("table" )
532
531
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 ()
534
536
self .pair_type = table .type .template_args [0 ]
535
537
if self .pair_type .IsTypedefType ():
536
538
self .pair_type = self .pair_type .GetTypedefedType ()
537
539
self .pair_type_size = self .pair_type .GetByteSize ()
538
540
539
- self .new_layout = not table .GetChildMemberWithName ("data" ).IsValid ()
541
+ self .new_layout = not inner_table .GetChildMemberWithName ("data" ).IsValid ()
540
542
if self .new_layout :
541
543
self .data_ptr = ctrl .Cast (self .pair_type .GetPointerType ())
542
544
else :
543
- self .data_ptr = table .GetChildMemberWithName ("data" ).GetChildAtIndex (0 )
545
+ self .data_ptr = inner_table .GetChildMemberWithName ("data" ).GetChildAtIndex (0 )
544
546
545
547
u8_type = self .valobj .GetTarget ().GetBasicType (eBasicTypeUnsignedChar )
546
548
u8_type_size = self .valobj .GetTarget ().GetBasicType (eBasicTypeUnsignedChar ).GetByteSize ()
@@ -563,7 +565,7 @@ def table(self):
563
565
# HashSet wraps either std HashMap or hashbrown::HashSet, which both
564
566
# wrap hashbrown::HashMap, so either way we "unwrap" twice.
565
567
hashbrown_hashmap = self .valobj .GetChildAtIndex (0 ).GetChildAtIndex (0 )
566
- return hashbrown_hashmap .GetChildMemberWithName ("table" ). GetChildMemberWithName ( "table" )
568
+ return hashbrown_hashmap .GetChildMemberWithName ("table" )
567
569
568
570
def has_children (self ):
569
571
# type: () -> bool
0 commit comments