理解 gdb
来源:互联网 发布:哪些网络兼职可信 编辑:程序博客网 时间:2024/06/05 20:19
http://baike.baidu.com/view/639266.htm
文件清单
执行程序
显示数据
断点
断点管理
变量检查赋值
单步执行
函数调用
机器语言工具
http://www.bobbog.com/archives/24
GDB 内存断点的使用例子:
http://blog.csdn.net/livelylittlefish/article/details/5110234#quote
在使用的过程中有什么忘掉了或是不懂的就直接help,查看帮助信息:
(gdb) help
List of classes of commands:
aliases -- Aliases of other commands
breakpoints -- Making program stop at certain points
data -- Examining data
files -- Specifying and examining files
internals -- Maintenance commands
obscure -- Obscure features
running -- Running the program
stack -- Examining the stack
status -- Status inquiries
support -- Support facilities
tracepoints -- Tracing of program execution without stopping the program
user-defined -- User-defined commands
Type "help" followed by a class name for a list of commands in that class.
Type "help all" for the list of all commands.
Type "help" followed by command name for full documentation.
Type "apropos word" to search for commands related to "word".
Command name abbreviations are allowed if unambiguous.
比如,我的可执行文件包含多个C/C++ 源文件,想查看其中一个文件的指定行,使用list 命令,help 如下
(gdb) help list
List specified function or line.
With no argument, lists ten more lines after or around previous listing.
"list -" lists the ten lines before a previous ten-line listing.
One argument specifies a line, and ten lines are listed around that line.
Two arguments with comma between specify starting and ending lines to list.
Lines can be specified in these ways:
LINENUM, to list around that line in current file,
FILE:LINENUM, to list around that line in that file,
FUNCTION, to list around beginning of that function,
FILE:FUNCTION, to distinguish among like-named static functions.
*ADDRESS, to list around the line containing that address.
With two args if one is empty it stands for ten lines away from the other arg.
数据读断点/写断点 :
(gdb) help awatchSet a watchpoint for an expression.Usage: awatch [-l|-location] EXPRESSIONA watchpoint stops execution of your program whenever the value ofan expression is either read or written.If -l or -location is given, this evaluates EXPRESSION and watchesthe memory to which it refers.
数据写断点:
(gdb) help watchSet a watchpoint for an expression.Usage: watch [-l|-location] EXPRESSIONA watchpoint stops execution of your program whenever the value ofan expression changes.If -l or -location is given, this evaluates EXPRESSION and watchesthe memory to which it refers.
- 理解 gdb
- 通过GDB调试理解GOT/PLT
- GDB
- gdb
- GDB
- GDB
- gdb
- GDB
- Gdb
- GDB
- gdb
- gdb
- GDB
- GDB
- gdb
- gdb
- gdb
- GDB
- TL标签使用说明
- 20/32md5加密密文解密
- 绩效管理模型
- Windows系统下 制作Fedora17安装U盘
- Urban Airship Android Client - Helium Push
- 理解 gdb
- WINDOWS:ftp登入时 显示为目录浏览 如何显示为文件 ?
- 中文Unicode范围
- 开源C++函数库Boost内存池使用与测试
- Java回调函数的理解 精辟~~
- 802.1Q Vlan原理简介
- 基于STM32的USB枚举过程学习笔记(一)
- 关于Win7安装VS2010旗舰版.Net4.0报错的原因及解决方法
- JNI学习笔记(六)——局部和全局引用