[Lldb-commits] [lldb] r180219 - See: http://stackoverflow.com/questions/16166897/c-how-to-obtain-address-of-stdvector-object-in-lldb-xcode

Enrico Granata egranata at apple.com
Wed Apr 24 14:52:24 PDT 2013


Author: enrico
Date: Wed Apr 24 16:52:24 2013
New Revision: 180219

URL: http://llvm.org/viewvc/llvm-project?rev=180219&view=rev
Log:
See: http://stackoverflow.com/questions/16166897/c-how-to-obtain-address-of-stdvector-object-in-lldb-xcode
The user was trying to obtain the address-of an std::vector and the experience was more painful than necessary because data formatters were kicking in for vector* objects
We got this right for libc++ - we should get it right for libstdc++ too

Modified:
    lldb/trunk/source/DataFormatters/FormatManager.cpp

Modified: lldb/trunk/source/DataFormatters/FormatManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/FormatManager.cpp?rev=180219&r1=180218&r2=180219&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/FormatManager.cpp (original)
+++ lldb/trunk/source/DataFormatters/FormatManager.cpp Wed Apr 24 16:52:24 2013
@@ -565,7 +565,7 @@ FormatManager::LoadLibStdcppFormatters()
                                                        SyntheticChildrenSP(new ScriptedSyntheticChildren(stl_synth_flags,
                                                                                                  "lldb.formatters.cpp.gnu_libstdcpp.StdListSynthProvider")));
     
-    stl_summary_flags.SetDontShowChildren(false);
+    stl_summary_flags.SetDontShowChildren(false);stl_summary_flags.SetSkipPointers(true);
     gnu_category_sp->GetRegexSummaryNavigator()->Add(RegularExpressionSP(new RegularExpression("^std::vector<.+>(( )?&)?$")),
                                                      TypeSummaryImplSP(new StringSummaryFormat(stl_summary_flags,
                                                                                                "size=${svar%#}")));





More information about the lldb-commits mailing list