~/talk

Favourite GDB developers tricks

Talkat DevConf.CZ 2025 · 2025-06-12..06-14· [linux-and-operating-systems]
links:none on file
slides:none on file

Claim that GDB is usually faster than printf debugging and demonstrate concrete commands: set a breakpoint at line 10 with B 10 then run and use p/type to inspect variables and ptype for struct layouts; use watch to stop on writes and see old/new values, use drprintf to print at a breakpoint, and disable/enable numbered breakpoints. Show saving breakpoints to a file, define a show_bt user command that logs a backtrace to a file, and a small Python API command "hello-python" example. Demonstrate Valgrind integration where Valgrind sends a trap for an uninitialized-value conditional and GDB inspects flags and queries Valgrind.

AI-written summary · about

  1. 0:00Introduction
  2. 1:04GDB setup and breakpoints
  3. 2:29Advanced breakpoints
  4. 4:18Breakpoints and watchpoints
  5. 6:52Hardware vs software watchpoints
  6. 7:57GDB help and obscure commands
  7. 9:00Info commands and types
  8. 9:44Memory inspection with X
  9. 10:29Auto-display variables
  10. 11:14Temp breakpoints and continue
  11. 12:00Source listing and UDFs
  12. 13:47Python API for GDB
  13. 15:11Valgrind with GDB
  14. 17:22Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.