GDB GNU Debugger

GDB GNU Debugger

www.sourceware.org

3

About this website

GDB (GNU Debugger) is a free and open-source portable debugger for programs written in C, C++, Fortran, Go, Ada, Pascal, Rust, Modula-2, and assembly language, running on Linux, macOS, and BSD. Originally written by Richard Stallman in 1986 as part of the GNU Project, GDB is one of the oldest and most widely used debuggers in the software industry. Key features: program execution control: start, stop at breakpoints, step through code line-by-line (step, next, stepi for instruction-level), continue, and terminate programs. Breakpoints: set at specific lines (break main.c:42), function entry (break my_function), memory addresses, and conditional breakpoints (break foo if x > 10). Watchpoints: monitor data changes on variables or memory locations (watch my_variable). Catchpoints: trigger on C++ exceptions (catch throw), system calls (catch syscall), fork/exec. Stack inspection: backtrace (bt), switch stack frames (frame N, up, down), inspect local variables and arguments. Data inspection: print variable values (print my_var), examine memory (x/Nx address for hex dump, x/Ns for strings), inspect data structures, call functions. Remote debugging: via GDB Remote Serial Protocol (RSP) connecting to a gdbserver over TCP/serial. Thread debugging: list threads (info threads), switch (thread N), apply to all threads (thread apply all bt). Core dump analysis: analyze post-mortem core files to diagnose crashes. Python scripting: custom debugging commands, pretty printers, automated analysis. Reverse debugging: step backward through execution (record/replay). TUI: terminal user interface for integrated source view. GPL-3.0.

Tags & Categories

Tags

Statistics

3
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!