[Lldb-commits] [PATCH] D44015: Fix std unique pointer not printing.
Alexandre Yukio Yamashita via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 2 07:32:43 PST 2018
alexandreyy created this revision.
alexandreyy added reviewers: labath, clayborg.
Std unique pointers were not being printed. The unique pointer layout was changed in libstdc++ 6.0.23.
https://reviews.llvm.org/D44015
Files:
source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
Index: source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
===================================================================
--- source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
+++ source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
@@ -64,6 +64,16 @@
ValueObjectSP tuple_sp =
valobj_sp->GetChildMemberWithName(ConstString("_M_t"), true);
+
+ ValueObjectSP tuple_sp_child =
+ tuple_sp->GetChildMemberWithName(ConstString("_M_t"), true);
+
+ /* if there is a _M_t child, the pointers are found in the
+ * tuple_sp_child (for libstdc++ 6.0.23). */
+ if (tuple_sp_child) {
+ tuple_sp = tuple_sp_child;
+ }
+
if (!tuple_sp)
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44015.136749.patch
Type: text/x-patch
Size: 704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180302/65ac5189/attachment.bin>
More information about the lldb-commits
mailing list