gdb 7 有一些用于 STL 结构的有用 python 脚本http://sourceware.org/gdb/wiki/STLSupport
lldb有没有类似的工具?即使使用简单的地图或矢量,显示的信息也非常神秘。
-> 100 h->moveReceivedSummaries(summaries);
101 auto res = h->moveReceivedSummaries();
102 EXPECT_TRUE(*summary == *res[1].get());
103 }
(lldb) p summaries
(std::__1::map<int, std::__1::unique_ptr<ContextSummary, std::__1::default_delete<ContextSummary> >, std::__1::less<int>, std::__1::allocator<std::__1::pair<const int, std::__1::unique_ptr<ContextSummary, std::__1::default_delete<ContextSummary> > > > >) $0 = size=1 {
(std::__1::__tree_node<std::__1::pair<int, std::__1::unique_ptr<ContextSummary, std::__1::default_delete<ContextSummary> > >, void *>::value_type) [0] = {
(int) first = 1
(std::__1::unique_ptr<ContextSummary, std::__1::default_delete<ContextSummary> >) second = {
(std::__1::__compressed_pair<ContextSummary *, std::__1::default_delete<ContextSummary> >) __ptr_ = {
(std::__1::__libcpp_compressed_pair_imp<ContextSummary *, std::__1::default_delete<ContextSummary> >) std::__1::__libcpp_compressed_pair_imp<ContextSummary *, std::__1::default_delete<ContextSummary> > = {
(ContextSummary *) __first_ = 0x0000000100308390
}
}
}
}
}