GET /api/v2/video/1028
HTTP 200 OK Vary: Accept Content-Type: text/html; charset=utf-8 Allow: GET, PUT, PATCH, HEAD, OPTIONS
{ "category": "EuroPython 2011", "language": "English", "slug": "combining-embedded-and-interactive-python-in-a-de", "speakers": [ "Caroline Tice" ], "tags": [ "api", "embedded" ], "id": 1028, "state": 1, "title": "Combining Embedded and Interactive Python in a Debugger: A Case Study", "summary": "[EuroPython 2011] Caroline Tice - 23 June 2011 in \"Track Ravioli\"\n\n", "description": "LLDB is an open source compiler currently under development. LLDB incorporates\nPython in several different ways: From the command line, one can drop into an\ninteractive Python script interpreter, entering normal Python interactive\ncommands and having them interpreted and executed. In addition, the LLDB\ndebugger has a programming API that allows users to call actual debugger\nfunctions and access real debugger objects. This API is run through SWIG and\nconverted into a Python module that gets automatically imported into the\ninteractive interpreter inside LLDB. The upshot of this is that, in the Python\nmode, users can call the API functions as if they were regular Python\nfunctions. This is turn means that users can do things like hit a breakpoint,\ncall the appropriate API functions to get the actual current frame object,\ncheck to see if the caller function several frames up the stack is a\nparticular function, and if so, perform some other interesting action. LLDB\nalso allows for breakpoint commands to be written in Python (which therefore\nallows them to call the API functions), as well as having a command that\ninterprets and executes a single line of Python.\n\nBecause the API and all of the debugger functionality is available in a Python\nmodule, it is also possible to write a debugger front end completely in Python\nand have it import the LLDB module and call the LLDB API functions (which\ncalls into the LLDB shared library), to create a new debugger front end. Our\ntest suite takes advantage of this to run tests on the LLDB library without\nhaving to start up an interactive LLDB debubgger session.\n\nThere were many interesting problems encountered and overcome in getting all\nof this to work. LLDB combines both interactive Python and embedded Python.\nThere were some interesting things worked out so that a single Python\nenvironment dictionary is used for the entire debugger session: A user can pop\ninto and out of the interactive interpreter and have access at any time to\nanything defined in any previous visit to the interactive interpreter (within\nthe same debug session); breakpoint commands have access to everything defined\nin the interactive session; so do embedded script commands. It gets even more\ncomplicated, because LLDB can have multiple debugger sessions alive at once,\nand each debugger session has its own Python interpreter with its own\ndictionary and must not be allowed to interfere with another session's state.\nIn this talk I will discuss how we implemented many of these features in LLDB,\npointing out some of the more interesting problems we encountered and how we\novercame them, and demonstrate it all working in LLDB.\n\n", "quality_notes": "", "copyright_text": "Standard YouTube License", "embed": "<object width=\"640\" height=\"390\"><param name=\"movie\" value=\"http://youtube.com/v/a6oHHGIV3r4?version=3&amp;hl=en_US\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://youtube.com/v/a6oHHGIV3r4?version=3&amp;hl=en_US\" type=\"application/x-shockwave-flash\" width=\"640\" height=\"390\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed></object>", "thumbnail_url": "http://i.ytimg.com/vi/a6oHHGIV3r4/hqdefault.jpg", "duration": null, "video_ogv_length": null, "video_ogv_url": null, "video_ogv_download_only": false, "video_mp4_length": null, "video_mp4_url": null, "video_mp4_download_only": false, "video_webm_length": null, "video_webm_url": null, "video_webm_download_only": false, "video_flv_length": null, "video_flv_url": null, "video_flv_download_only": false, "source_url": "http://www.youtube.com/watch?v=a6oHHGIV3r4", "whiteboard": "", "recorded": "2011-07-24", "added": "2012-08-30T21:02:11", "updated": "2014-04-08T20:28:27.705" }