[lldb-dev] lldb debugging: custom summary for a vector's elements (c++)

Vincent Le Bourlot vlebourl at gmail.com
Thu Sep 4 07:57:50 PDT 2014


  Hi,


I’m not sure this is the place to cry for help. If not, please forgive me for this email.
I have been struggling with this issue for days and I cannot find any solution.


I have a custom class MyNameSpace::String
 for which I created a summary in lldb. For instance, for a MyNameSpace::String myString="a string"
, here is the summary in lldb:

frame variable myString
   (MyNameSpace::String) myString = "a string"

How can I get a summary for a std::vector<MyNameSpace::String>vecString
 that look as a summary of a std::vector<std::string>vec
?

So far, here are results of the command frame variable
 on the different variables:

vector of standard string

frame variable vec(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >) vec = size=3 {[0] = "str1"[1] = "str2"
[2] = "str3"
}


vector of my custom String

frame variable vecString(std::__1::vector< MyNameSpace::String, std::__1::allocator< MyNameSpace::String> >) vecString = size=2 {  [0] = {    value = 7453010373645639777  }  [1] = {    value = 18302628889929726940  }}



How can I get my custom summary to be applied to my vector’s elements?

Thank you very much for any help.

V.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140904/ce838da8/attachment.html>


More information about the lldb-dev mailing list