|
|
Use the var and unvar commands to set special debugger variables:
var [name initial value] /* Create debugger variables */ unvar [*|variable...] /* Remove debugger variables */When debugging, certain values come up time and time again, and re-entering the value each time it is needed can be tedious and gives great opportunity for error.
Use the var command to create a variable with an initial value and type:
debug0:1>Variables are also useful for counting iterations in breakpoint commands:var ino (struct inode *)D01401A0debug0:2>d $ino...
debug0:3>The number of variables available is a configurable parameter. To reuse variables, unset them using the unvar command:var x 0debug0:4>$x0 debug0:5>++$x1 debug0:5>++$x2
debug0:9>unvar may be given the ``unvar xdebug0:10>$xError: Unknown variable
'' argument,
which clears all variables currently set.