[Lldb-commits] [PATCH] Implement formatter for std::vector<bool, ...> of libstdc++ in Python.
Siva Chandra
sivachandra at google.com
Tue Mar 17 13:32:01 PDT 2015
The existing formatter for std::vector<bool, ...> from libstdc++ is not used. If I run "type synthetic list", I see this:
...
-----------------------
Category: gnu-libstdc++ (enabled)
-----------------------
Regex-based synthetic providers (slower):
^std::_Rb_tree_iterator<.+>$: Generator at 0x7f13f9f0c310 - std::map iterator synthetic children
^__gnu_cxx::__normal_iterator<.+>$: Generator at 0x7f13f9f0c390 - std::vector iterator synthetic children
^std::vector<.+>(( )?&)?$: Python class lldb.formatters.cpp.gnu_libstdcpp.StdVectorSynthProvider
^std::map<.+> >(( )?&)?$: Python class lldb.formatters.cpp.gnu_libstdcpp.StdMapSynthProvider
^std::list<.+>(( )?&)?$: Python class lldb.formatters.cpp.gnu_libstdcpp.StdListSynthProvider
...
Formatters for map iterator and vector iterator are implemented in C++, but the formatters for std::vector, std::list and std::map are all implemented in Python. The approach I have taken is to extend the existing std::vector formatter (Python) to handle std::vector<bool, ...> as a special case. Since the c++ implementation of std::vector<bool, ...> is anyway not used, I removed it.
Do you suggest that we should actually be moving the Python formatters into C++?
http://reviews.llvm.org/D8390
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the lldb-commits
mailing list