gdb的gui用法

调试代码的时候,只能看到下一行,每次使用list非常烦,不知道当前代码的context 

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

简单来说就是在以往的gdb开始的时候添加一个-tui选项.有的版本已经有gdbtui这个程序了

在linux自带的终端里是正常显示的,但是在securecrt里面,可能由于编码的问题,边缘会有些乱码,不过不影响使用(如果你的程序有错误输出,会扰乱整个界面,所以在调试的时候,建议添加2>/dev/null,这样的话基本可用)

启动gdb之后,上面是src窗口,下面是cmd窗口,默认focus在src窗口的,这样的话上下键以及pagedown,pageup都是在移动显示代码,并不显示上下的调试命令.这个时候要切换focus,具体可简单参见

(gdb) info win  查看当前focus
SRC (36 lines) <has focus>
CMD (18 lines)
(gdb) fs next 切换focus
Focus set to CMD window.
(gdb) info win
SRC (36 lines)
CMD (18 lines) <has focus>
(gdb) fs SRC 切换指定focus
Focus set to SRC window.
(gdb)

(Window names are case in-sensitive.)

To start in neato and highly-recommended GUI mode, start the debugger with gdb -tui. (For many of the examples, below, I show the output of gdb's dumb terminal mode, but in real life I use TUI mode exclusively.)

And here is a screenshot of what you'll see, approximately:

In TUI mode, the layout command controls which windows you see. Additionally, the tui reg allows control of the register window, and will open it if it's not already open.

The commands are:

layout src Standard layout—source on top, command window on the bottom
layout asm Just like the "src" layout, except it's an assembly window on top
layout split Three windows: source on top, assembly in the middle, and command at the bottom
layout reg Opens the register window on top of either source or assembly, whichever was opened last
tui reg general Show the general registers
tui reg float Show the floating point registers
tui reg system Show the "system" registers
tui reg next Show the next page of registers—this is important because there might be pages of registers that aren't in the "general", "float", or "system" sets

gdb tui中切换窗口的更多相关文章

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

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

  2. Qt中切换窗口功能的实现

    两条语句就能够实现了: this->newNC.setWindowFlags(Qt::WindowStaysOnTopHint); this->newNC.show(); mark一下,防 ...

  3. selenium中三大窗口切换

    我们在做UI自动化时,不得不会遇到一些窗口跳转与弹框,在这种的时候如果不进行切换的话,继续执行脚本必然会报错,所以我们就需要用到切换窗口的方法. selenium中主要是三种窗口 Windows窗口 ...

  4. Java中怎么切换窗口

    首先,创建一个窗口对象: eg:  JFram frame = JFrame();//创建一个窗体 frame.setVisible(true);//设置窗体可见,默认不可见 然后编写相关应用或组件… ...

  5. WebDriver(Selenium2) 根据新窗口title切换窗口

    http://uniquepig.iteye.com/blog/1559321 在webdriver官方的api中,切换窗口的方法提供的参数是nameOrHandle. 引用 http://uniqu ...

  6. selenium切换窗口

    在做网页自动化测试的时候,难免会打开很多个网页,那么,如何在多个窗口之间切换呢? 获取窗口的唯一标识用句柄(handle)表示,因此只需要切换句柄,就可以灵活的在各窗口之间切换. 下面介绍几个方法 c ...

  7. MFC关于多线程中传递窗口类指针时ASSERT_VALID出错的另类解决 转

    MFC关于多线程中传递窗口类指针时ASSERT_VALID出错的另类解决   在多线程设计中,许多人为了省事,会将对话框类或其它类的指针传给工作线程,而在工作线程中调用该类的成员函数或成员变量等等. ...

  8. Selenium切换窗口,警告框处理,调用JavaScript代码

    多窗口切换 在页面操作过程中有时候点击某个链接会弹出新的窗口,这时就需要主机切换到新打开的窗口上进行操作. WebDriver提供了switch_to.window()方法,可以实现在不同的窗口之间切 ...

  9. 【转】WPF中的窗口的生命周期

    原文地址:http://www.cnblogs.com/Jennifer/articles/1997763.html WPF中的窗口的生命周期 WPF中所有窗口的基类型都是System.Windows ...

随机推荐

  1. [翻译]Review——Learn these core JavaScript concepts in just a few minutes

    Learn these core JavaScript concepts in just a few minutes(只需几分钟即可学习这些核心JavaScript概念) 原文地址:https://m ...

  2. Vue指令的钩子函数使用方法

    在Vue 中可以把一系列复杂的操作包装为一个指令. 什么是复杂的操作? 我的理解是:复杂逻辑功能的包装.违背数据驱动的 DOM 操作以及对一些 Hack 手段的掩盖等.我们总是期望以操作数据的形式来实 ...

  3. 关于 img 父容器比img图片要多4个像素的问题

    问题背景: <div> <img src="" /> </div> 图片和div 的宽度相同,div的高度等于图片的高度 结果发现div的高度 ...

  4. JS全国城市三级联动

    HTML <select id="s_province" name="s_province"></select> <select ...

  5. Linux 中常用命令

    命令基本格式: 命令提示符:[root@localhost ~]#      root 代表当前的登录用户(linux当中管理员账号是root)      @ 无实际意义      localhost ...

  6. 基于Vue的WebApp项目开发(四)

    实现新闻咨询页面 目录结构 步骤一:创建newslist.vue文件 <template> <div id="tml"> <!--使用mui框架,实现 ...

  7. 小程序UI

    从input组件说起 <input maxlength="10" placeholder="最大输入长度10" /> <div id=&quo ...

  8. Visual Staudio 2015 打开指定文件,定位到指定文件目录下

    Visual Staudio 2015 项目定位文件位置 每次使用的Visual Staudio 2015 写代码的时候总是打开了.cs文件或xaml文件时, 还要手动去找该 文件位置,每次都要翻好大 ...

  9. 服务器编程入门(13) Linux套接字设置超时的三种方法

    摘要:     本文介绍在套接字的I/O操作上设置超时的三种方法. 图片可能有点宽,看不到的童鞋可以点击图片查看完整图片.. 1 调用alarm 使用SIGALRM为connect设置超时 设置方法: ...

  10. Office 365实现单点登录系列(1)—域环境搭建

    Hello 小伙伴们, 2018新年快乐,作为2018年首篇文章,怎么能不给大家带来点干货呢?这篇文章其实我9月底的时候已经在MSDN上发布过了,为表诚意,我更新了这篇文章,并把它组成了一个系列,2. ...