Convenience Variables

UndoDB provides a number of convenience variables to allow for easier scripting. All of these variables are prefixed with the string _undo_.

GDB’s existing convenience variable mechanism has been extended, so the built in GDB command show convenience will also include Undo’s convenience variables. For example:

(udb) show convenience
$_undo_time_min = 0
$_undo_time = 27840
$_undo_time_max = 27840
$_any_caller_matches = <internal function _any_caller_matches>
$_any_caller_is = <internal function _any_caller_is>
$_caller_matches = <internal function _caller_matches>

Available Variables


Undo uses basic block count as a measure of time. This variable contains the current basic block count.


This variable contains the basic block count that accompanies the earliest possible time. This value can get never get smaller, but it can get larger when event log rotation occurs.


As the debuggee runs, this variable is updated to contain the basic block count that represents the end of time. Just like $_undo_time_min this value can never get smaller, unlike $_undo_time_min this variable only gets larger when the debuggee is in record mode.

Example Usage

THe following example shows how to jump through history, ten basic blocks at a time, printing out the value at the top of the stack each time we move forward.

def examine_every_ten
    while $_undo_time < $_undo_time_max - 10
        ugo time +10
        x $rsp