文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>gdb环境下 打印出 stl vector map的内容

gdb环境下 打印出 stl vector map的内容

时间:2010-08-24  来源:ubuntuer

文件: gdbinit.tar
大小: 20KB
下载: 下载
把这个文件解压后放到$HOME目录下

启动gdb,就可以打印stl的内容了

比如说打印vector,只要输入 pvector <vector> <idx1> <idx2>

详细使用方法可以查看文件中的document段,比如说:

document pvector
    Prints std::vector<T> information.
    Syntax: pvector <vector> <idx1> <idx2>
    Note: idx, idx1 and idx2 must be in acceptable range [0..<vector>.size()-1].
    Examples:
    pvector v - Prints vector content, size, capacity and T typedef
    pvector v 0 - Prints element[idx] from vector
    pvector v 1 2 - Prints elements in range [idx1..idx2] from vector
end
  放到~/.gdbinit就可以了,不行的话 再source ~/.gdbinit下
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载