添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
从这里下载一个gdb脚本: sourceware org/gdb/wiki/STLSupport

启动gdb之后,用 source stl-views.gdb 把这个脚本包含进来,

然后就可以用 pmap 命令打印 map 的内容了。

Data type
GDB command

std::vector<T> pvector stl_variable
std::list<T> plist stl_variable T
std::map<T,T> pmap stl_variable
std::multimap<T,T> pmap stl_variable
std::set<T> pset stl_variable T
std::multiset<T> pset stl_variable
std::deque<T> pdequeue stl_variable
std::stack<T> pstack stl_variable
std::queue<T> pqueue stl_variable
std::priority_queue<T> ppqueue stl_variable
std::bitset<n>td> pbitset stl_variable
std::string pstring stl_variable
std::widestring pwstring stl_variable