http://beej.us/guide/bggdb/

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 的文章的更多相关文章

  1. gdb tui中切换窗口

    gdb的gui用法 调试代码的时候,只能看到下一行,每次使用list非常烦,不知道当前代码的context  http://beej.us/guide/bggdb/#compiling 简单来说就是在 ...

  2. gdb tui设置默认窗口高度

    gdb -p 12999 -tui 先显示win信息(输入:info win) 显示如下: SRC (35 lines) <has focus> CMD (17 lines) 我们要改的是 ...

  3. 使用GDB调试Go语言

    用Go语言已经有一段时间了,总结一下如何用GDB来调试它! ps:网上有很多文章都有描述,但是都不是很全面,这里将那些方法汇总一下 GDB简介  GDB是GNU开源组织发布的⼀一个强⼤大的UNIX下的 ...

  4. 每天学点GDB 15

    本节重点描述两个gdb集成测试环境 有没有办法在一边调试的时候,一边显示对应的源码呢?有没有一种工具能够将gdb集成到ide中呢,本文就试图回答这些问题. emacs gdb 在linux的世界里,e ...

  5. gdb 调试入门,大牛写的高质量指南

    引用自:http://blog.jobbole.com/107759/ gdb 调试 ncurses 全过程: 发现网上的“gdb 示例”只有命令而没有对应的输出,我有点不满意.gdb 是 GNU 调 ...

  6. 【持续更新】GDB使用笔记

    多文件程序的调试,例子: 文件结构: /demo Makefile /src demo.cpp util.cpp /include util.h 截图: ----------------------- ...

  7. gdb各种调试命令和技巧

    陈皓:用GDB调试程序 GDB概述———— GDB是GNU开源组织发布的一个强大的UNIX下的程序调试工具.或许,各位比较喜欢那种图形界面方式的,像VC.BCB等IDE的调试,但如果你是在UNIX平台 ...

  8. gdb 调试 ncurses 全过程:

    转载地址: http://blog.jobbole.com/107759/ gdb 调试 ncurses 全过程: 发现网上的“gdb 示例”只有命令而没有对应的输出,我有点不满意.gdb 是 GNU ...

  9. GDB技巧:使用终端界面模式

    欢迎来到 GreatSQL社区分享的MySQL技术文章,如有疑问或想学习的内容,可以在下方评论区留言,看到后会进行解答 GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. 简 ...

随机推荐

  1. PHP获取Linux当前目录下文件并实现下载功能

    使用nginx转发过去给php server{ listen 9099; server_name 18.5.6.2; location / { proxy_http_version 1.1; root ...

  2. vector at()函数比 []运算符操作安全

    转载:https://blog.csdn.net/chenjiayi_yun/article/details/18507659 []操作符的源码 reference operator[](size_t ...

  3. centos7之安装wordpress

    wordpress安装教程如下: mysql安装可以参考我的博客园Centos构建Java环境:https://www.cnblogs.com/youcong/p/9118753.html 1.安装a ...

  4. Received empty response from Zabbix Agent at [172.16.1.7]...

    Centos7.5  zabbix添加主机发现ZBX爆红报错 原因:在配置/etc/zabbix/zabbix_agentd.conf中172.16.1.71写成了127.16.1.71 解决方法:重 ...

  5. JDK8新特性:使用Optional避免null导致的NullPointerException

    空指针异常是导致Java应用程序失败的最常见原因.以前,为了解决空指针异常,Google公司著名的Guava项目引入了Optional类,Guava通过使用检查空值的方式来防止代码污染,它鼓励程序员写 ...

  6. uniGUI试用笔记(九)

    uniGUI执行程序部署有3种形式 1.ISAPI模式 部署在IIS或Apache,程序编译为Dll形式,没有试,准备后续专门测试一下. 2.标准执行文件模式 将软件编译成一个独立的Exe文件,包括了 ...

  7. Linux下调整ext3分区大小【转】

    本文转载自:https://blog.csdn.net/cruise_h/article/details/22403529 本文讨论如何再不丢失数据的情况下调整已有ext3分区的大小,包括: 压缩已有 ...

  8. CF1131D tarjan,拓扑

    题目链接 541div2 http://codeforces.com/contest/1131/problem/D 思路 给出n序列和m序列的相对大小关系 构造出最大值最小的序列 缩点+拓扑 小的向大 ...

  9. 使用JAX-WS开发WebService

    Axis2和CXF是目前流行的Webservice框架,这两个框架都属于重量级框架.相对而言,JAX-WS RI是一个轻量级的框架.开发WebService只需要很简单的几个步骤:写接口和实现-> ...

  10. Lintcode241-String to Integer - Naive

    Given a string, convert it to an integer. You may assume the string is a valid integer number that c ...