[Lldb-commits] [PATCH] D126080: Adapt C++ std::string dataformatter for D125496
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri May 20 11:25:54 PDT 2022
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf4570ce442b4: Adapt C++ std::string dataformatter for D125496 (authored by aprantl).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126080/new/
https://reviews.llvm.org/D126080
Files:
lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
Index: lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
===================================================================
--- lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
+++ lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
@@ -546,7 +546,7 @@
nullptr, nullptr, &valobj, false, false);
}
-// the field layout in a libc++ string (cap, side, data or data, size, cap)
+/// The field layout in a libc++ string (cap, side, data or data, size, cap).
enum LibcxxStringLayoutMode {
eLibcxxStringLayoutModeCSD = 0,
eLibcxxStringLayoutModeDSC = 1,
@@ -626,6 +626,9 @@
return {};
ValueObjectSP location_sp = short_sp->GetChildAtIndex(
(layout == eLibcxxStringLayoutModeDSC) ? 0 : 1, true);
+ // After D125496, there is a flat layout.
+ if (location_sp->GetName() == g_size_name)
+ location_sp = short_sp->GetChildAtIndex(3, true);
if (using_bitmasks)
size = (layout == eLibcxxStringLayoutModeDSC)
? size_mode_value
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126080.431014.patch
Type: text/x-patch
Size: 1025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220520/4b15f3b4/attachment.bin>
More information about the lldb-commits
mailing list