~/talk

GDB: A Gentle Intro

Talkat RubyConf 2015 · 2015-11-15..11-17· [ruby]
slides:none on file

GDB attaches to a running Ruby process so you can attach to a PID, set breakpoints like break at RB_array_unique_bang, and inspect threads and stacks; an example shows two threads stuck in pthread_cond_wait and uses thread apply all bt to confirm a deadlock. Breakpointing into C reveals MRI internals, calling rb_p to print Ruby values and RB_backtrace to get Ruby-level traces; rubygems can call methods before script start so --disable-gems helps. A scripted nrdebug and Docker images with debug symbols prove useful.

AI-written summary · about

  1. 0:00Introduction
  2. 0:47Process deadlocks
  3. 1:18What is GDB
  4. 3:10GDB output
  5. 8:39Review
  6. 10:05Unique Bang
  7. 13:22Ruby Documentation
  8. 13:54C Functions
  9. 18:15Running Program
  10. 20:32Display
  11. 21:01Memory Location
  12. 22:05structs
  13. 26:57Display Variables
  14. 28:09RB Backtrace
  15. 31:35Return nil
  16. 32:30Array make hash
  17. 33:33Array length
  18. 34:35Documentation
  19. 34:51Debug Output
  20. 36:11Debug Printing
  21. 37:38Automation
  22. 39:00Recap
  23. 39:17Crazy tricks
  24. 39:38Conclusion
  25. 40:02Questions
~/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.