<div dir="ltr">Hi,<div><br></div><div>Apologies if this is  the wrong forum for this question - redirection to the correct place would be appreciated...</div><div><br></div><div>I am running</div><div><br></div><div><div>lldb --version</div><div>lldb-900.0.64</div><div>  Swift-4.0</div></div><div><br></div><div>with binaries compiled using g++</div><div><br></div><div>g++-5 --version</div><div>g++-5 (Homebrew GCC 5.5.0_2) 5.5.0</div><div>Copyright (C) 2015 Free Software Foundation, Inc.</div><div>This is free software; see the source for copying conditions.  There is NO</div><div>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.(although I have tried a build from repo as well)<br></div><div><br></div><div><br></div><div>The <a href="https://lldb.llvm.org/varformats.html" target="_blank">website</a> implies that gcc std library formatters should be available:</div><div><br></div><div><p style="font-family:Times;font-size:medium">By default, several categories are created in LLDB:</p><ul style="font-family:Times;font-size:medium"><li><code>default</code>: this is the category where every formatter ends up, unless another category is specified</li><li><code>objc</code>: formatters for basic and common Objective-C types that do not specifically depend on Mac OS X</li><li><code>gnu-libstdc++</code>: formatters for std::string, std::vector, std::list and std::map as implemented by libstdcpp</li></ul><div>However I see:</div></div><div><br></div><div><div>(lldb) type category list                                                                                                                                     Category: default (enabled)</div><div>Category: VectorTypes (enabled, applicable for language(s): objective-c++)</div><div>Category: runtime-synthetics (enabled, applicable for language(s): objective-c++, swift)</div><div>Category: system (enabled, applicable for language(s): objective-c++)</div><div>(lldb) type category enable gnu-libstdc++                                                                                                                     warning: empty category enabled (typo?)</div></div><div><br></div><div>And the std containers do not print nicely:</div><div><br></div><div><div>containerTest: cat main.cpp</div><div>#include <iostream></div><div>#include <vector></div><div><br></div><div>using namespace std;</div><div><br></div><div>int main()</div><div>{</div><div>    auto v = vector< unsigned >{ 0, 1, 2, 3, 4, 5, 6, 7, 9 };</div><div><br></div><div>    for( auto i : v )</div><div>    {</div><div>        cout << i << "\n";</div><div>    }</div><div><br></div><div>    return( 0 );</div><div>}</div><div> containerTest: g++-5 -g -std=c++11  main.cpp</div><div>/var/folders/2_/07xjgwq904376gst9m3ddb100000gn/T//cctjpiwL.s:157:11: warning: section "__textcoal_nt" is deprecated</div><div>        .section __TEXT,__textcoal_nt,coalesced,pure_instructions</div><div>                 ^      ~~~~~~~~~~~~~</div><div>/var/folders/2_/07xjgwq904376gst9m3ddb100000gn/T//cctjpiwL.s:157:11: note: change section name to "__text"</div><div>        .section __TEXT,__textcoal_nt,coalesced,pure_instructions</div><div>                 ^      ~~~~~~~~~~~~~</div><div>/var/folders/2_/07xjgwq904376gst9m3ddb100000gn/T//cctjpiwL.s:386:11: warning: section "__textcoal_nt" is deprecated</div><div>        .section __TEXT,__textcoal_nt,coalesced,pure_instructions</div><div>                 ^      ~~~~~~~~~~~~~</div><div>/var/folders/2_/07xjgwq904376gst9m3ddb100000gn/T//cctjpiwL.s:386:11: note: change section name to "__text"</div><div>        .section __TEXT,__textcoal_nt,coalesced,pure_instructions</div><div>                 ^      ~~~~~~~~~~~~~</div><div>/var/folders/2_/07xjgwq904376gst9m3ddb100000gn/T//cctjpiwL.s:430:11: warning: section "__textcoal_nt" is deprecated</div><div>        .section __TEXT,__textcoal_nt,coalesced,pure_instructions</div><div>                 ^      ~~~~~~~~~~~~~</div><div>/var/folders/2_/07xjgwq904376gst9m3ddb100000gn/T//cctjpiwL.s:430:11: note: change section name to "__text"</div><div>        .section __TEXT,__textcoal_nt,coalesced,pure_instructions</div><div>                 ^      ~~~~~~~~~~~~~</div><div>/var/folders/2_/07xjgwq904376gst9m3ddb100000gn/T//cctjpiwL.s:683:11: warning: section "__textcoal_nt" is deprecated</div><div>        .section __TEXT,__textcoal_nt,coalesced,pure_instructions</div><div>                 ^      ~~~~~~~~~~~~~</div><div>/var/folders/2_/07xjgwq904376gst9m3ddb100000gn/T//cctjpiwL.s:683:11: note: change section name to "__text"</div><div>        .section __TEXT,__textcoal_nt,coalesced,pure_instructions</div><div>                 ^      ~~~~~~~~~~~~~</div><div> containerTest: lldb ./a.out</div><div>(lldb) target create "./a.out"</div><div>Current executable set to './a.out' (x86_64).</div><div>(lldb) b main</div><div>Breakpoint 1: where = a.out`main + 13 at main.cpp:8, address = 0x0000000100001673</div><div>(lldb) run</div><div>Process 98294 launched: './a.out' (x86_64)</div><div>Process 98294 stopped</div><div>* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1</div><div>    frame #0: 0x0000000100001673 a.out`main at main.cpp:8</div><div>   5</div><div>   6   <span style="white-space:pre-wrap">  </span>int main()</div><div>   7   <span style="white-space:pre-wrap">    </span>{</div><div>-> 8   <span style="white-space:pre-wrap">    </span>    auto v = vector< unsigned >{ 0, 1, 2, 3, 4, 5, 6, 7, 9 };</div><div>   9</div><div>   10  <span style="white-space:pre-wrap">     </span>    for( auto i : v )</div><div>   11  <span style="white-space:pre-wrap">        </span>    {</div><div>Target 0: (a.out) stopped.</div><div>(lldb) n</div><div>Process 98294 stopped</div><div>* thread #1, queue = 'com.apple.main-thread', stop reason = step over</div><div>    frame #0: 0x00000001000016bd a.out`main at main.cpp:10</div><div>   7   <span style="white-space:pre-wrap">    </span>{</div><div>   8   <span style="white-space:pre-wrap">     </span>    auto v = vector< unsigned >{ 0, 1, 2, 3, 4, 5, 6, 7, 9 };</div><div>   9</div><div>-> 10  <span style="white-space:pre-wrap">    </span>    for( auto i : v )</div><div>   11  <span style="white-space:pre-wrap">        </span>    {</div><div>   12  <span style="white-space:pre-wrap">        </span>        cout << i << "\n";</div><div>   13  <span style="white-space:pre-wrap">   </span>    }</div><div>Target 0: (a.out) stopped.</div><div>(lldb) p v</div><div>(vector<unsigned int, allocator<unsigned int> >) $0 = {</div><div>  _Vector_base<unsigned int, allocator<unsigned int> > = {</div><div>    _M_impl = {</div><div>      _M_start = 0x0000000100402050</div><div>      _M_finish = 0x0000000100402074</div><div>      _M_end_of_storage = 0x0000000100402074</div><div>    }</div><div>  }</div><div>}</div><div>(lldb)</div></div><div><br></div><div>Anyone able to point me at either a python pretty printer or solution to this?</div><div><br></div><div>Cheers, Bryan.</div></div>