these are my notes after finishing the GDB module from pwn.college. This covered the essential toolkit—the basic commands for navigating execution, inspecting memory, and beginning analysis. It's the critical first step in going from randomly guessing to strategically interrogating a program.
The expert in anything was once a beginner. What looks like magic to you is simply the result of practice you haven't done yet. !
run / rPurpose: Starts your program from the beginning under GDB's control.
Syntax: run [arguments] or r [arguments]
Key Points:
gdb ./program or the file command.run will ask if you want to restart it.Example:
(gdb) file ./my_app
(gdb) run arg1 arg2
Starting program: /home/user/my_app arg1 arg2
...program output...
continue / c / fgcontinue [ignore-count]fg is a synonym (foreground).ignore-count tells GDB to ignore the next breakpoint n times.Breakpoint 1, main () at main.c:10
10 int x = 5;
(gdb) continue 2 # Will ignore the next breakpoint here twice
Continuing.