~/talk

Back to Basics: Debugging in C++

Talkat CppCon 2022 · 2022-09-11..09-16· [rust]
slides:none on file

Argues programmers spend roughly 35–50% of time debugging and often budget 50–75% for it, then demonstrates concrete debugging work: compile with -g and -Wall, use GDB TUI, set break and conditional breakpoints, inspect with bt, info locals, print and watch, attach to live processes, and use reverse execution via target record full. Compares printf/macro logging and delta debugging to interactive stepping, shows a segmentation fault investigation and how numbers of lines and library vs source affect choices.

AI-written summary · about

  1. 0:00Start
  2. 0:11How Much Time Do You Think Programmers Spend Debugging
  3. 1:56Debugging Strategies
  4. 3:43What Is a Bug
  5. 4:51Software Bugs
  6. 9:32Why Is It Hard To Write Correct Software
  7. 11:16Behavior of Unknown Libraries
  8. 11:42Typos
  9. 13:15Goals
  10. 15:57Debugging Techniques and Strategies
  11. 16:28Scan and Look Debugging
  12. 16:50The Scan and Look Strategy
  13. 19:09Compiler
  14. 19:23Compiler Flags
  15. 19:56Static Analysis
  16. 20:36Cons
  17. 21:10Printf Debugging
  18. 24:49Delta Debugging
  19. 28:04Macros
  20. 28:44Challenges
  21. 30:41An Interactive Debugger
  22. 31:07Gdb
  23. 33:41Standard Array Example
  24. 34:04Compiling with Debugging
  25. 35:09Start Gdb
  26. 36:26Temporary Breakpoint
  27. 38:03Restart this Debugging Process
  28. 42:39Gdb's Text User Interface
  29. 47:34Segmentation Fault
  30. 49:52Back Trace
  31. 53:39Print the Type out of O1
  32. 54:05Loops
  33. 58:01Can You Overwrite Values of the Existing Variables
  34. 1:00:02General Tips on Debugging
~/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.