GDB & DDD
This page autogenerated as placeholder
DDD (Data Display Debugger)
Purpose:
DDD is a graphical front-end for command-line debuggers like GDB.
It provides an interactive UI with visualizations for breakpoints, memory, and variables.
Key Features: ✔ Graphical user interface for GDB. ✔ Displays memory contents visually. ✔ Supports debugging of C, C++, Java, Python, Perl, etc. ✔ Allows setting breakpoints, stepping through code, and inspecting variables.
Common Commands:
ddd myprogram
→ Launch DDD with myprogram.Use GUI buttons or enter GDB commands in the command window.
Right-click variables to inspect or modify values.
Supports mouse-based breakpoints and stepping.
GDB (GNU Debugger)
Purpose:
GDB is a powerful command-line debugger for programs written in C, C++, and other languages.
Key Features: ✔ Allows program execution control (breakpoints, stepping). ✔ Inspects variables and memory. ✔ Supports core dump analysis and remote debugging.
Common Commands:
gdb myprogram
→ Start debugging myprogram.break main
→ Set a breakpoint at main.run
(orr
) → Run the program.next
(orn
) → Step over a line of code.step
(ors
) → Step into a function.print var
(orp var
) → Print the value of var.bt
→ Backtrace (view call stack).quit
(orq
) → Exit GDB.
DDD vs. GDB
Interface
Graphical
Command-line
Usability
Easier for beginners
Powerful but requires memorizing commands
Breakpoints
Mouse-based
Text commands
Visual Debugging
Yes
No
🔹 Use DDD for a visual debugging experience. 🔹 Use GDB for direct, scriptable, and advanced debugging.
Quick Tip: If you already know GDB, DDD is just a graphical wrapper around it—commands work the same!
🚀 Happy Debugging! 🚀
Last updated