Simple command arrangement for gdb debugging

Source: Internet
Author: User

Compile gcc-g-O2-o test with simple commands for gdb debugging. c. debug gdb filename gdb file filename. view the program list (l). Add the breakpoint break (B) to the function entry. The function name adds the breakpoint break (B) to the specified row) the row number adds the breakpoint break (B) file name to the specified row of the specified file: When the row number is true on a daily basis, the condition that the line number takes effect when the breakpoint occurs, for example: B 5 if I = 10 view all set breakpoint info break delete breakpoint number start run program run (r) one-step run program (do not enter the sub-function) next (n) run the program in one step (enter the sub-function) step (s) continue to run the program continue (c) to view the specified variable value print (p) to run the program, wait until the current function is finished. finish monitoring the specified variable. watch the variable name and exit gdb quit (q)

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: 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.