Expositor is scriptable time-travel debugging Python library for GDB/UndoDB.
Expositor requires UndoDB, and works best with a recent version of GDB that supports the
python-interactive command (available in the CVS repository after August 22, 2012; should be released in GDB 7.6).
Currently, Expositor only debugs 32-bit applications on Linux.
Differences from ICSE paper
The design of Expositor is described in the ICSE 2013 paper; however, there are numerous API differences:
the_executionin the paper is simply named
executionin actual Expositor.
the_execution.get_timein the paper corresponds to
execution.controller.get_timein actual Expositor. See
snapshot.read_retaddrsin the paper roughly corresponds to
snapshot.pcsin actual Expositor: where
read_retaddrscorresponds to a list of return address r-values on the stack,
snapshot.pcscorresponds to a list of the current instruction pointer l-value as well as the return address l-values (i.e., values on the stack already casted to Python
The paper describes time as represented as a floating-point number, whereas in actual Expositor, time is represented as a tuple time
( virtual_nanosecond, block_instruction_pointer )to avoid the costly conversion to floating-point time. Floating-point time is still accepted by Expositor, and will be automatically converted to the appropriate tuple time (particularly convenient for, e.g.,
The paper describes the
itemclass as having the field
time, whereas in Expositor, it is split into two fields,
upperto the lower bound of the next
itemin the trace.
The paper describes the EditHAMT data structure as a single class with factory class methods, however, in actual Expositor, it is implemented as a Scala-style class cluster under the Python module
Run Expositor's tests (optionally providing paths to
env \ EXPOSITOR_UNDODB=optional-path-to-undodb-gdb \ EXPOSITOR_GDB=optional-path-to-gdb \ make test
Start Expositor on <program-to-debug> (optionally providing paths to
env \ EXPOSITOR_UNDODB=optional-path-to-undodb-gdb \ EXPOSITOR_GDB=optional-path-to-gdb \ Source/expositor-undodb <program-to-debug>
In Expositor (GDB), enter the Python interactive prompt:
or more concisely:
Create a breakpoint trace and query it:
>>> foo = execution.breakpoints("foo") >>> s = foo.get_after(0) >>> print s
Expositor: Scriptable time-travel debugging with First Class Traces. Khoo Yit Phang, Jeffrey S. Foster, and Michael Hicks. In Proceedings of the International Conference on Software Engineering (ICSE), May 2013. Preprint (Presentation).