~/talk

Combining Embedded and Interactive Python in a Debugger: A Case Study

Talkat EuroPython 2011 · 2011-06-20..06-26· [python]
links:none on file
slides:none on file

LLDB embeds a full Python interpreter, exposes its C++ API via a SWIG-generated module, and provides interactive, one-line and breakpoint-script entry points. Each debugger session gets a persistent Python dictionary and session dictionary isolation is enforced by copying keys and by a custom mutex/cond lock that serializes access (no true concurrency). Breakpoint scripts receive frame and location objects; a real case study uses a Python DFS to find "romeo" in a BST and uncovers a case-conversion bug, proving the approach works.

AI-written summary · about

  1. 0:00Intro
  2. 0:42OUTLINE
  3. 1:27WHAT IS LLDB?
  4. 2:18SOME USES OF THE LLDB LIBRARY
  5. 3:01TARGETS & PROCESSES
  6. 3:32BREAKPOINTS
  7. 3:54FRAMES & STACKS
  8. 5:31DESIRED GUI DEBUGGER BEHAVIOR
  9. 6:20DEBUGGERS IN LLDB
  10. 11:04WHY SCRIPTING IN A DEBUGGER?
  11. 15:52LLDB EXTENSIONS FOR PYTHON
  12. 17:38IMPLEMENTING INTERACTIVE PYTHON INTERPRETER
  13. 18:43IMPLEMENTING ONE- LINE SCRIPT COMMANDS
  14. 19:00HOW THE DICTIONARIES WORK (1)
  15. 19:42INVOKING ONE-LINE SCRIPT COMMANDS
  16. 20:20INVOKING INTERACTIVE SCRIPT INTERPRETER
  17. 21:32MORE ABOUT LLOB BREAKPOINT SCRIPTS...
  18. 22:45COMMANDS - CREATE
  19. 23:44COMMANDS - CALL
  20. 24:52BUILDING THE LLOB PYTHON API MODULE
  21. 25:37PARTICULAR PROBLEMS & SOLUTIONS
  22. 28:39GETTING A SINGLE OBJECT ACROSS THE DEBUGGER
  23. 30:14WHY A DEBUGGER- LEVEL DICTIONARY?
  24. 30:49INTERACTIVE INTERPRETER ONE LINE COMMANDS
  25. 31:24BREAKPOINT COMMANDS: A PROBLEM
  26. 32:34DICTIONARY SET-UP
  27. 33:07DICTIONARY CLEAN-UP
  28. 34:08POSSIBLE APPROACHES
  29. 35:45WRITE OUR OWN!
  30. 37:36EXAMPLE: SIMPLE DICTIONARY PROGRAM Store and find words in Binary Search Tree
  31. 38:35THE PLAN Searching Tree Without Restarting Program
  32. 39:48USING THE INTERACTIVE INTERPRETER
  33. 41:43PYTHON BREAKPOINT COMMAND (At Decision to Follow Right Child)
  34. 43:58SUMMARY
~/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.