Linux PDB Debug Summary

Source: Internet
Author: User
1. First GDB compiles: gcc-g xxx.c-o xxx2. Then gdb xxx goes to debug

Break line number

Add Breakpoint

(1) Then run can run to the next breakpoint (2) step (or s) step tracking (3) print can (or p) to view the current program's operating data such as: Print a output a variable value output format can be set: for example p/d a decimal output a variable value (4) You can also set display, such as display a so that each debug will output the value of a variable (5) examine (or x) to see the value in memory address syntax:x/<n/f/u> <addr> (6) List View original program (7) Print x=8 modifies the value of the variable x during debugging, which takes effect (8) Jump <linespec> implementation jumps, either the line number of the file, the File:line, or the +num in this format, jumping <address> is the memory address of the line of code (9) Signal <signal> generate semaphore (Ten) return forced return (one) call <expr> Force invoke

Linux PDB Debug Summary

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.