DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using SCODB on SCO OpenServer 5

Debugger variables

Use the var and unvar commands to set special debugger variables:

   var [name initial value]                        /* Create debugger variables */
   unvar [*|variables...]                          /* 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> var ino (struct inode *)D01401A0
   debug0:2> d $ino
   ...
Variables are also useful for counting iterations in breakpoint commands:
   debug0:3> var x 0
   debug0:4> $x
   0
   debug0:5> ++$x
   1
   debug0:5> ++$x
   2
The number of variables available is a configurable parameter. To reuse variables, unset them using the unvar command:
   debug0:9> unvar x
   debug0:10> $x
   Error: Unknown variable
unvar may be given the ``*'' argument, which clears all variables currently set.
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005