gdb tui中切换窗口

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
时间: 2024-08-12 13:25:41

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

gdb tui设置默认窗口高度

gdb -p 12999 -tui 先显示win信息(输入:info win) 显示如下: SRC (35 lines) <has focus> CMD (17 lines) 我们要改的是SRC高度,输入 winheight SRC +10 winheight SRC -10 ------------------------------------------------------------ 以上为立即生效的,但是退出gdb则不保存设置,如何设置默认窗口高度,请看如下 ----------

Qt中切换窗口功能的实现

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

【复习】selenium中切换窗口

原文地址:https://blog.51cto.com/11926720/2482934

Java中怎么切换窗口

首先,创建一个窗口对象: eg:  JFram frame = JFrame();//创建一个窗体 frame.setVisible(true);//设置窗体可见,默认不可见 然后编写相关应用或组件………… 需要切换窗口时加入以下函数:? this.setVisible(false); //设置当前窗体不可见 JFram frame1 = JFrame();//创建一个新的窗体 frame1.setVisible(true);//设置新窗体可见,默认不可见 然后编写相关新的窗体组件或…… 就这么

JavaScript跳转到指定页面并且到指定的tab切换窗口

案例的解析就是点击A页面的第一个的切换窗口的按钮跳转到B页面,再点击B页面的按钮跳转到A页面的第二个窗口,这个实现的效果有三种方法,下面的图片案例: A页面的第一个切换窗口 B页面的跳转按钮 A页面的第二个切换窗口 第一方法用函数function: 演示效果:JavaScript跳转到指定页面并且到指定的tab切换窗口 A页面按钮 <a href="b.html?id=1980&order_type=p_order">aaaaa</a> B页面按钮代码:

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

原文地址:http://www.cnblogs.com/Jennifer/articles/1997763.html WPF中的窗口的生命周期 WPF中所有窗口的基类型都是System.Windows.Window.Window通常用于SDI窗口和对话框.Window在应用程序中除了一个设计用于托管顶级内容的控件外,就别无他物了.典型的,可以混合使用标记和代码来定义一个窗口.代码如下: 在xaml页: <Window x:Class="WPFApplication1.MainWindow&

隐藏windows任务栏中的窗口显示

在实际应用中遇到类似下列需要: 隐藏windows窗口,在windows任务栏中窗口不可见,但应用程序在后台运行. windows应用程序的窗口默认会在任务栏中添加一个可见的窗口项,方便用户操作和在不同应用程序中切换. 考虑到windows操作系统是基于shell的,查找shell的接口资料会发现 ITaskbarList interface .ITaskbarList提供了AddTab和DeleteTab函数,用于向任务栏中添加删除窗口项. 第一种方法就是使用ITaskbarList接口,在程

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

http://uniquepig.iteye.com/blog/1559321 在webdriver官方的api中,切换窗口的方法提供的参数是nameOrHandle. 引用 http://uniquepig.iteye.com/blog/1559321 WebDriver window(java.lang.String nameOrHandle)           Switch the focus of future commands for this driver to the windo

《selenium2 python 自动化测试实战》(9)——切换窗口

有时候我们点击按钮后页面会跳转到新的窗口,我们需要到新的窗口中去进行接下来的操作,这时候就需要切换窗口的操作,我们根据句柄(handle)来操作窗口之间的切换,看代码: # coding: utf-8from selenium import webdriverfrom time import sleep driver = webdriver.Firefox() driver.get("http://www.jrj.com.cn/") driver.find_element_by_xpa