Original Author: ADMIN
Transferred from: http://blog.ikow.cn/gdb-peda-common-command/
Info
View various information:
Info file to view information about the current file, such as the program entry point (Entry points)
Info Break View current Breakpoint information
Disassemble+func Disassembly of the established functions
Break + Address set breakpoints
R is equivalent to "run" running the program
c is equivalent to "continue", continue execution
x/
N, F, and u are optional parameters.
n is a positive integer that represents the number of memory units that need to be displayed, that is, the contents of several memory units are displayed backwards from the current address, and the size of a memory unit is defined by the following U.
F represents the format shown, see below. If the address refers to a string, then the format can be S, if the address is an instruction address, then the format can be I.
U represents the number of bytes requested from the current address, and if not specified, gdb defaults to 4 bytes. The u parameter can be substituted with the following character, b for single byte, h for Double Byte, W for four bytes, and G for eight bytes. When we specify the byte length, GDB starts by referring to the memory address, reads and writes the specified byte, and takes it as a value.
Represents a memory address.
Note: The relationship between N and U is strictly distinguished, N represents the number of units, and U represents the size of each cell.
layout: Used to split the window, you can view the code while testing. There are several ways to use the main:
Layout src: Display source code window
Layout ASM: Display Assembly window
Layout regs: Display source code/assembly and Register window
Layout split: Display source Code and assembly window
Layout Next: Show Next layout
Layout prev: Show Previous layout
Ctrl + L: Refresh window
Ctrl + x, then press 1: Single-window mode, display a window
Ctrl + x, press 2: Double-window mode, display two windows
Ctrl + x, then press a: Back to the traditional mode, exit layout and go back to the debug window before the layout is executed.