GDB用法总结
来源:互联网 发布:php分页 编辑:程序博客网 时间:2024/05/23 19:20
1. 设置进程启动参数
set args arg1 arg2 ....
2. bt列出线程调用栈之后,在调用栈的各层(栈帧)之间切换
frame num
3. info threads列出线程之后,在各线程之间切换
thread num
4. 对所有线程执行bt列调用栈
thread apply all bt
thread apply all bt full 更加详细
5. 运行到当前所在函数返回
finish
6. 列出源代码
list
7.
Alpha- and MIPS-based computers use an unusual stack frame, which sometimes requires GDB to search backward in the object code to find the beginning of a function.
To improve response time (especially for embedded applications, where GDB may be restricted to a slow serial line for this search) you may want to limit the size of this search, using one of these commands:
set heuristic-fence-post limit
- Restrict GDB to examining at most limit bytes in its search for the beginning of a function. A value of 0 (the default) means there is no limit. However, except for 0, the larger the limit the more bytes
heuristic-fence-post
must search and therefore the longer it takes to run. show heuristic-fence-post
- Display the current limit.
These commands are available only when GDB is configured for debugging programs on Alpha or MIPS processors.
8. 以16进制查看变量
p/x var
9. 查看所有局部变量
info locals
10. 生成core dump
generate-core-file
- GDB用法总结
- gcc & gdb 常见用法总结
- 【新手】gcc g++ gdb make用法总结
- gdb 用法
- GDB用法
- gdb用法
- GDB 用法
- gdb用法
- GDB用法
- GDB用法
- gdb用法
- gdb用法
- gdb用法
- gdb用法
- gdb总结
- GDB总结
- GDB 总结
- GDB总结
- 360应用开放平台很给力
- jQuery 页面载入进度条
- Java初学者都应该搞懂的六个问题
- Android GPS getLastKnownLocation()返回null的解决
- Gentoo Linux下读写NTFS格式分区(ntfs-3g解决NTFS只读不可写的问题)
- GDB用法总结
- ant打包开启debug功能
- Oracle 服务器 进程中的 LOCAL=NO 和 LOCAL=YES
- 大小端编程注意事项
- 客户端连接ORACLE的几种方法
- centos升级内核无法加载显卡驱动
- undo丢失且存在未提交事务的恢复
- Server Application Unavailable
- c#事务机制