GDB usage Record
Used to record the methods used for daily debugging, not simple command instructions
Let's start by listing the commands you've used.
Command: Abbreviation: description
RUN:R: Executing the program
BREAK:B: Setting breakpoints
PRINT:P: Print variable contents
Next:n: Executes to the next statement
Step:s: Enter function Execution (GDB is officially said to be step program until it reaches a different source line.)
CONTINUE:C: Continue execution
BACKTRACE:BT: Print Call stack
Frame:f: Displays the current stack information
Finish:: Completes the execution of the current function (the official version of the GDB manual is the execute until selected stack frame returns. The function here is popular)
EXAMINE:X: Print Memory content
Until:u: Complete the current loop (although in many cases this is not the case, the official version of the GDB manual is the execute until the program reaches a source line greater than the present or a spec ified location (same args as Break command) within the current frame.)
Jump:j: Jumps to the specified location to execute
The usual means
1, redirect. Run 0<input.file 1>output.file or set args 0<input.file 1>output.file
2. Repeat the code (within the same function). b line_number \ n J line_number\n
3, print memory. X/8XB address, print 8 bytes in 16-in-A-way
GDB usage Record