非常好的 gdb tui 的文章
Help Commands | |
help command | Get help on a certain command |
apropos keyword | Search help for a particular keyword |
Starting and Quitting | |
gdb [-tui] [-c core] [exename] | (Unix Command) Start gdb on an executable or standalone; specify "-tui" to start the TUI GUI; specify "-c" with a corefile name to see where a crash occurred |
run [arg1] [arg2] [...] | Run the currently loaded program with the given command line arguments |
quit | Exit the debugger |
file exename | Load an executable file by name |
Breakpoints and Watchpoints | |
break location | Set a breakpoint at a location, line number, or file (e.g. "main", "5", or "hello.c:23") |
watch expression | Break when a variable is written to |
rwatch expression | Break when a variable is read from |
awatch expression | Break when a variable is written to or read from |
info break | Display breakpoint and watchpoint information and numbers |
info watch | Same as info break |
clear location | Clear a breakpoint from a location |
delete num | Delete a breakpoint or watchpoint by number |
Stepping and Running | |
next | Run to the next line of this function |
step | Step into the function on this line, if possible |
stepi | Step a single assembly instruction |
continue | Keep running from here |
CTRL-C | Stop running, wherever you are |
finish | Run until the end of the current function |
advance location | Advance to a location, line number, or file (e.g. "somefunction", "5", or "hello.c:23") |
jump location | Just like continue, except jump to a particular location first. |
Examining and Modifying Variables | |
display expression | Display the value of a variable or expression every step of the program—the expression must make sense in the current scope |
info display | Show a list of expressions currently being displayed and their numbers |
undisplay num | Stop showing an expression identified by its number (see info display) |
print expression | Print the value of a variable or expression |
printf formatstr expressionlist | Do some formatted output with printf() e.g. printf "i = %d, p = %s\n", i, p |
set variable expression | Set a variable to value, e.g. set variable x=20 |
set (expression) | Works like set variable |
Window Commands | |
info win | Shows current window info |
focus winname | Set focus to a particular window bby name ("SRC", "CMD", "ASM", or "REG") or by position ("next" or "prev") |
fs | Alias for focus |
layout type | Set the window layout ("src", "asm", "split", or "reg") |
tui reg type | Set the register window layout ("general", "float", "system", or "next") |
winheight val | Set the window height (either an absolute value, or a relative value prefaced with "+" or "-") |
wh | Alias for winheight |
set disassembly-flavor flavor | Set the look-and-feel of the disassembly. On Intel machines, valid flavors are intel and att |
Misc Commands | |
RETURN | Hit RETURN to repeat the last command |
backtrace | Show the current stack |
bt | Alias for backtrace |
attach pid | Attach to an already-running process by its PID |
info registers | Dump integer registers to screen |
info all-registers | Dump all registers to screen |
非常好的 gdb tui 的文章的更多相关文章
- gdb tui中切换窗口
gdb的gui用法 调试代码的时候,只能看到下一行,每次使用list非常烦,不知道当前代码的context http://beej.us/guide/bggdb/#compiling 简单来说就是在 ...
- gdb tui设置默认窗口高度
gdb -p 12999 -tui 先显示win信息(输入:info win) 显示如下: SRC (35 lines) <has focus> CMD (17 lines) 我们要改的是 ...
- 使用GDB调试Go语言
用Go语言已经有一段时间了,总结一下如何用GDB来调试它! ps:网上有很多文章都有描述,但是都不是很全面,这里将那些方法汇总一下 GDB简介 GDB是GNU开源组织发布的⼀一个强⼤大的UNIX下的 ...
- 每天学点GDB 15
本节重点描述两个gdb集成测试环境 有没有办法在一边调试的时候,一边显示对应的源码呢?有没有一种工具能够将gdb集成到ide中呢,本文就试图回答这些问题. emacs gdb 在linux的世界里,e ...
- gdb 调试入门,大牛写的高质量指南
引用自:http://blog.jobbole.com/107759/ gdb 调试 ncurses 全过程: 发现网上的“gdb 示例”只有命令而没有对应的输出,我有点不满意.gdb 是 GNU 调 ...
- 【持续更新】GDB使用笔记
多文件程序的调试,例子: 文件结构: /demo Makefile /src demo.cpp util.cpp /include util.h 截图: ----------------------- ...
- gdb各种调试命令和技巧
陈皓:用GDB调试程序 GDB概述———— GDB是GNU开源组织发布的一个强大的UNIX下的程序调试工具.或许,各位比较喜欢那种图形界面方式的,像VC.BCB等IDE的调试,但如果你是在UNIX平台 ...
- gdb 调试 ncurses 全过程:
转载地址: http://blog.jobbole.com/107759/ gdb 调试 ncurses 全过程: 发现网上的“gdb 示例”只有命令而没有对应的输出,我有点不满意.gdb 是 GNU ...
- GDB技巧:使用终端界面模式
欢迎来到 GreatSQL社区分享的MySQL技术文章,如有疑问或想学习的内容,可以在下方评论区留言,看到后会进行解答 GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. 简 ...
随机推荐
- 06:vuejs项目实战
1.1 项目说明 1.技术架构 vue.js, 模块化,工程化, 移动端 2.目录部署 Css:所有样式文件 Data:所有异步接口 Img:所有图片文件 Js:所有js文件(2.0) index.h ...
- mysql 中语句执行的顺序以及查询处理阶段的分析
原文链接:http://www.php.cn/mysql-tutorials-408865.html 本篇文章给大家带来的内容是关于mysql中语句执行的顺序以及查询处理阶段的分析,有一定的参考价值, ...
- javascript 点击按钮实现隐藏显示切换效果
原文链接:http://www.jb51.net/article/79083.htm <html> <head> <meta charset="gb2312&q ...
- Codeforces 995F Cowmpany Cowmpensation - 组合数学
题目传送门 传送点I 传送点II 传送点III 题目大意 给定一个棵$n$个点的有根树和整数$D$,给这$n$个点标号,要求每个节点的标号是正整数,且不超过父节点的标号,根节点的标号不得超过D. 很容 ...
- UVa 11019 Matrix Matcher - Hash
题目传送门 快速的vjudge传送门 快速的UVa传送门 题目大意 给定两个矩阵S和T,问T在S中出现了多少次. 不会AC自动机做法. 考虑一维的字符串Hash怎么做. 对于一个长度为$l$的字符串$ ...
- Python3 tkinter基础 Button command 单击按钮 在console中打印文本
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- ZOJ 3963 Heap Partition(multiset + stl自带二分 + 贪心)题解
题意:给你n个数字s1~sn,要你把它们组成一棵棵二叉树,对这棵二叉树来说,所有节点来自S,并且父节点si<=子节点sj,并且i<j,问你树最少几棵二叉数.树 思路:贪心.我们往multi ...
- UML类图中箭头的含义
Explanation of the UML arrows Here's some explanations from the Visual Studio 2015 docs: UML Class D ...
- P1948 [USACO08JAN]电话线Telephone Lines(二分答案+最短路)
思路 考虑题目要求求出最小的第k+1大的边权,想到二分答案 然后二分第k+1大的边权wx 把所有边权<=wx的边权变为0,边权>wx的边权变为0,找出最短路之后,如果dis[T]<= ...
- Redis事件订阅和持久化存储
http://blog.csdn.net/yinwenjie/article/details/53518286 Redis从2.X版本开始,就支持一种基于非持久化消息的.使用发布/订阅模式实现的事件通 ...