GDB Debug Command

Source: Internet
Author: User

GDB Main launches GDB

(GDB) L is equivalent to list, starting from the first line to list the source code

(GDB) Break 16 set breakpoints, set breakpoints on line 16th of source code

(GDB) Break Func sets a breakpoint at the entrance of the Func function

(GDB) Info Break View breakpoint Information

(GDB) d [number] Deletes a breakpoint of the specified number or removes all breakpoints, and the breakpoint number increments from 1

(GDB) r Run command, Run command shorthand

(GDB) n single statement execution , next command shorthand, equivalent to step over, step tracking

(GDB) s equivalent to stepinto, single-step tracking into, if there are sub-functions, will enter the child function execution

(GDB) C continues to run, continue command shorthand

(GDB) P J Prints the value of the variable J, p is shorthand for print

(GDB) bt view function stack

(GDB) Finish Exit function

(GDB) Q exit GDB

(gdb) Help [command name]

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.