security enabled verified low v1.0.0

gdb

GNU Project debugger for analyzing program execution, reverse engineering binaries, and debugging crashes.

📋 Live Preview
gdb -q -ex "{command}" {binary}
๐ŸŒ command โ†’ ๐ŸŒ binary โ†’
gdb -q -ex "{command}" {binary}

Sandbox: execFile · Timeout: 300s

Capabilities

reverse.debugging
reverse.disassembly
reverse.analysis
debug.memory.inspect
debug.register.inspect

Parameters

Name Type Required Default Description Aliases
quiet boolean No - Suppress introductory banner and warnings -q
ex string No - Execute a single GDB command -ex
x string No - Execute GDB commands from file -x
pid integer No - Attach to a running process by PID -p
batch boolean No - Run in batch mode (no interactive shell) -batch
symbols string No - Read symbol table from file -s, --symbols
exec string No - Use specified file as the executable --exec
core string No - Use specified file as the core dump --core
cd string No - Change to directory before starting --cd
nx boolean No - Do not read .gdbinit file -nx
nh boolean No - Do not read .gdbearlyinit file -nh
tty string No - Set the terminal for GDB I/O --tty
args boolean No - pass remaining args to program --args

Contract

Inputs

file.binary

Binary to debug

file.core

Core dump file for post-mortem analysis

Outputs

debug.backtrace

Stack backtrace

debug.disassembly

Disassembled code

Side effects: process_spawn

Workflow Edges

Produces

debug.backtracedebug.disassembly

Consumes

file.binaryfile.core

Resource Profile

ResourceValue
CPUmedium
Memory128 MB
Networklow
Disk I/Olow

Examples

Attach to a running process

gdb -p 1234

Analyze a core dump

gdb /bin/ls core.dump -batch -ex bt

Disassemble main function in batch mode

gdb -q -batch -ex "disassemble main" /bin/ls

Run with commands from a file

gdb -x commands.gdb /bin/ls

Inspect registers and memory

gdb -q -ex "info registers" -ex "x/16xw \$rsp" -batch /bin/ls

Documentation

GDB โ€” GNU Debugger

GDB is the standard debugger for compiled Unix programs, supporting C, C++, Rust, Go, and many other languages. It enables instruction-level debugging, memory/register inspection, disassembly, and reverse engineering.

Common Debugging Commands

Command Description
disassemble main Disassemble the main function
info registers Show CPU register values
x/16xw $rsp Examine 16 words on the stack
bt Print backtrace
break *0x400510 Set breakpoint at address
ni Execute next instruction
si Step into instruction

Batch Analysis

gdb -q -batch -ex "file /bin/ls" -ex "disassemble main" -ex "info functions"

Related Tools

radare2ltracestracepwndbgpwntools