[Lldb-commits] [PATCH] D60588: Adjusting libc++ std::list formatter to act better with pointers and references and adding a test to cover a previous related fix
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 24 10:37:00 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL359118: [DataFormatters] Adjusting libc++ std::list formatter to act better with… (authored by shafik, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D60588?vs=194766&id=196487#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60588/new/
https://reviews.llvm.org/D60588
Files:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/main.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
@@ -162,6 +162,10 @@
'[2] = ', '3',
'[3] = ', '4'])
+ ListPtr = self.frame().FindVariable("list_ptr")
+ self.assertTrue(ListPtr.GetChildAtIndex(
+ 0).GetValueAsUnsigned(0) == 1, "[0] = 1")
+
# check that MightHaveChildren() gets it right
self.assertTrue(
self.frame().FindVariable("numbers_list").MightHaveChildren(),
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/main.cpp
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/main.cpp
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/main.cpp
@@ -8,7 +8,8 @@
int main()
{
int_list numbers_list;
-
+ std::list<int>* list_ptr = &numbers_list;
+
printf("// Set break point at this line.");
(numbers_list.push_back(0x12345678));
(numbers_list.push_back(0x11223344));
Index: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
===================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
@@ -486,7 +486,7 @@
cpp_category_sp,
lldb_private::formatters::LibcxxStdListSyntheticFrontEndCreator,
"libc++ std::list synthetic children",
- ConstString("^std::__[[:alnum:]]+::list<.+>(( )?&)?$"), stl_synth_flags,
+ ConstString("^std::__[[:alnum:]]+::list<.+>(( )?&)?$"), stl_deref_flags,
true);
AddCXXSynthetic(
cpp_category_sp,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60588.196487.patch
Type: text/x-patch
Size: 2259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190424/2df29420/attachment.bin>
More information about the lldb-commits
mailing list