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% 351> show convenience
$_undo_time_max = 352
$_undo_time_min = 1
$_undo_time = 351
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,
forty BBs at a time, printing the value of the global variable
g_transactions
each time we jump backward.
99% 351> define print_every_forty
Type commands for definition of "print_every_forty".
End with a line saying just "end".
>while $_undo_time > 40
>ugo time -40
>p g_transactions
>end
>end
99% 351> print_every_forty
[Switching to Thread 1895224.1895225]
0x00005555555550d0 in pthread_cond_timedwait@plt ()
$1 = 3
malloc_init_state (av=0x7fffe8000030) at ./malloc/malloc.c:1963
1963 ./malloc/malloc.c: No such file or directory.
$2 = 2
malloc_init_state (av=0x7fffe8000030) at ./malloc/malloc.c:1963
1963 in ./malloc/malloc.c
$3 = 2
malloc_init_state (av=0x7fffe8000030) at ./malloc/malloc.c:1963
1963 in ./malloc/malloc.c
$4 = 2
0x00007ffff7e5f912 in _int_new_arena (size=640) at ./malloc/arena.c:744
744 ./malloc/arena.c: No such file or directory.
$5 = 2
0x0000555555555110 in pthread_mutex_lock@plt ()
$6 = 2
[Switching to Thread 1895224.1895226]
___pthread_cond_signal (cond=0x555555558120 <g_condition>) at ./nptl/pthread_cond_signal.c:84
84 ./nptl/pthread_cond_signal.c: No such file or directory.
$7 = 1
_dl_fixup (l=0x7ffff7ffe2e0, reloc_arg=7) at ./elf/dl-runtime.c:109
109 ./elf/dl-runtime.c: No such file or directory.
$8 = 1