Debugging C/C++ with GDB on Linux
GDB is the standard debugger for C/C++ development on Linux. This reference covers essential commands for breakpoints, execution control, inspection, and troubleshooting common debugging scenarios. Starting GDB gdb ./program gdb ./program core.dump # Debug with core file gdb -p <pid> # Attach to running process gdb –args ./program arg1 arg2 # Pass arguments to program…
