Gdb gui usage

Source: Internet
Author: User
Debugging Code You can only see the next line. It is annoying to use list every time and you do not know the context of the current Code.

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

 

Simply put, you can add a-tui option at the beginning of GDB. Some versions already have the gdbtui OptionProgramNow

It is displayed normally on the Linux terminal, but in securecrt, the edge may be garbled due to encoding issues, but it does not affect the use (If your program has incorrect output, this will disrupt the entire interface. Therefore, it is recommended to add 2>/dev/null during debugging. This is basically available)

After GDB is started, the above is the SRC window, and the following is the CMD window. By default, the focus is in the SRC window. In this case, the up and down keys and Pagedown and Pageup are all moving and displaying code, the upstream and downstream Debugging commands are not displayed. switch the focus at this time. For more information, see

(GDB)Info win view current focusSRC (36 lines) FS next switch focusFocus set to cmd window. (GDB)Info winSRC (36 lines) cmd (18 lines) Fs src switch specifies focusFocus set to SRC window. (GDB)

(Window names are case in-sensitive .)

 

 

To start in neato and highly-recommended GUI Mode, Start the debuggerGDB-tui. (For details of the examples, below, I show the outputGDB'S dumb terminal mode, but in real life I use Tui mode exclusively .)

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

 

 

 

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.