Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4742626
  • 博文数量: 930
  • 博客积分: 12070
  • 博客等级: 上将
  • 技术积分: 11448
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-15 16:57
文章分类

全部博文(930)

文章存档

2011年(60)

2010年(220)

2009年(371)

2008年(279)

分类: C/C++

2010-08-24 14:40:45

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

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

比如说打印vector,只要输入 pvector

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

document pvector
    Prints std::vector information.
    Syntax: pvector
    Note: idx, idx1 and idx2 must be in acceptable range [0...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下
阅读(3408) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-08-27 11:19:11

Download More than 1000 free IT eBooks: http://free-ebooks.appspot.com