I recently installed GDB 16.3, the GNU Debugger, on my Debian system. It is an incredibly powerful and free tool for dynamic analysis and debugging.
How I Installed It
I ran these commands:
Bash
sudo apt update
sudo apt install gdb gdb-multiarch
I also installed GEF (a modern interface) by cloning the repository and adding it to my ~/.gdbinit file. Now when I type gdb, I get the enhanced gef➤ prompt, which is much more user-friendly with colors and extra commands.
I tried installing pwndbg too, but I ran into a libc6-dbg version conflict due to my mixed repositories (trixie + unstable). I’ll fix that later.
How I Use GDB
I mainly use GDB for dynamic analysis — running programs step-by-step, setting breakpoints, inspecting memory and registers, and understanding how binaries behave at runtime.
Common commands I use:
- gef ./program — Start debugging with GEF
- break main — Set a breakpoint
- run — Start execution
- next / step — Move through code
- print $rax — View register values
- x/10gx $rsp — Examine stack memory
- checksec — See security protections (GEF command)
Why I Use GDB
I use GDB when I need to:
- Debug running programs
- Develop or test exploits
- Analyze malware dynamically
- Solve CTF challenges
- Investigate crashes using core dumps
I like to combine it with IDA Free — I use IDA for static analysis (disassembly + decompilation) and GDB/GEF for dynamic runtime behavior.