GDB Switch window in TUI

Source: Internet
Author: User

GDB GUI usage When debugging code, only see the next line, each use list very annoying, do not know the current code context

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

In short, add a-tui option at the beginning of the previous gdb. Some versions already have gdbtui this program.

Linux comes with the terminal is normal display, but in the SecureCRT, may be due to coding problems, the edge will be some garbled, but does not affect the use (if your program has error output, will disrupt the entire interface, so in debugging, it is recommended to add 2>/dev/null, This is basically available)

After starting GDB, the above is the SRC window, the following is the CMD window, the default focus in the SRC window, so that the upper and lower keys and pagedown,pageup are moving the display code, do not display the upper and lower debug commands. To switch focus at this point, you can simply see

Info win  View current focus        SRC     (lines)  fs next  info win         SRC     (lines)        CMD     (lines)  FS src  switch specifies focusfocus set to SRC window. GDB)  

(Window names is 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 exclu sively.)

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

In TUI mode, the Layout command controls which Windows. Additionally, the TUI Reg allows control of the Register window, and would open it if it ' s not already open.

The commands are:

Layout src Standard layout-source in top, command window on the bottom
Layout asm Just like the "src" layout, except it's an assembly windows 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 is 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 are pages of registers that aren ' t in the ' General ', "Float", or "system" sets

gdb TUI Toggle window

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.