# 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% 234,515> show convenience
$_undo_time_max = 234567$_undo_time_min = 1
$_undo_time = 234515  ## 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. ###$_undo_time_max¶

The bbcount of the latest time in execution history. 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 program is in record mode.

## Example usage¶

The following example shows how to jump through execution history, ten BBs at a time, printing out the value at the top of the stack each time we jump backward.

99% 234,515> define rsp_every_ten
Type commands for definition of "rsp_every_ten".
End with a line saying just "end".
>while $_undo_time <$_undo_time_max - 10
>ugo time +10
>x \$rsp
>end
>end
99% 234,515> rsp_every_ten
778     printf_fp.c: No such file or directory.
0x7fffffffd7f0: 0x00000000
142     mul.c: No such file or directory.
0x7fffffffd760: 0x0000000b
907     printf_fp.c: No such file or directory.
0x7fffffffd7f0: 0x00000000
957     in printf_fp.c
0x7fffffffd7c0: 0xf7e4f6a0
954     in printf_fp.c
0x7fffffffd7c0: 0xf7e4f6a0