Convenience variables

UDB provides a number of convenience variables to allow for easier scripting. All of these variables have names starting _undo_.

The built-in command show convenience lists the convenience variables. For example:

99% 377> show convenience
$_undo_time_max = 378
$_undo_time_min = 1
$_undo_time = 377

Available variables

$_undo_time

The current bbcount.

$_undo_time_min

The bbcount of the earliest time in execution history. This value can never get smaller, but it can get larger when event log rotation occurs and old history is discarded to make space.

$_undo_time_max

The bbcount of the latest time in execution history. that represents the end of time. Like $_undo_time_min, this value can never get smaller. Unlike $_undo_time_min, this variable only gets larger when the program is in record mode.

Example usage

The following example shows how to jump through execution history, thirty BBs at a time, printing the value of the global variable g_transactions each time we jump backward.

99% 377> define print_every_fifty
Type commands for definition of "print_every_fifty".
End with a line saying just "end".
>while $_undo_time > 50
 >ugo time -50
 >p g_transactions
 >end
>end
99% 377> print_every_fifty
[Switching to Thread 2482028.2482029]
0x00005555555553ac in eater (p=0x0) at threads.c:63
63              e = pthread_mutex_unlock(&g_mutex);
$1 = 3
0x00007ffff7e4f0f8 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
$2 = 2
0x00007ffff7e4f0f8 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
$3 = 2
0x00007ffff7e4f0f8 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
$4 = 2
0x00007ffff7f9c65e in __pthread_mutex_unlock_usercnt () from /lib/x86_64-linux-gnu/libpthread.so.0
$5 = 2
[Switching to Thread 2482028.2482030]
0x00007ffff7fd67b0 in ?? () from /lib64/ld-linux-x86-64.so.2
$6 = 1
0x00007ffff7fd7340 in ?? () from /lib64/ld-linux-x86-64.so.2
$7 = 1