File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
lldb/source/Plugins/Language/CPlusPlus Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -578,17 +578,21 @@ ExtractLibcxxStringInfo(ValueObject &valobj) {
578
578
uint64_t size_mode_value = 0 ;
579
579
580
580
if (layout == eLibcxxStringLayoutModeDSC) {
581
- ValueObjectSP size_mode (D->GetChildAtIndexPath ({1 , 1 , 0 }));
581
+ llvm::SmallVector<size_t , 3 > size_mode_locations[] = {
582
+ {1 , 2 }, // Post-c3d0205ee771 layout
583
+ {1 , 1 , 0 },
584
+ {1 , 1 , 1 },
585
+ };
586
+ ValueObjectSP size_mode;
587
+ for (llvm::ArrayRef<size_t > loc : size_mode_locations) {
588
+ size_mode = D->GetChildAtIndexPath (loc);
589
+ if (size_mode && size_mode->GetName () == g_size_name)
590
+ break ;
591
+ }
592
+
582
593
if (!size_mode)
583
594
return {};
584
595
585
- if (size_mode->GetName () != g_size_name) {
586
- // we are hitting the padding structure, move along
587
- size_mode = D->GetChildAtIndexPath ({1 , 1 , 1 });
588
- if (!size_mode)
589
- return {};
590
- }
591
-
592
596
size_mode_value = (size_mode->GetValueAsUnsigned (0 ));
593
597
short_mode = ((size_mode_value & 0x80 ) == 0 );
594
598
} else {
You can’t perform that action at this time.
0 commit comments