DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using the UDK

Printing Variables and Expressions

Please read debug(1) or use the debug

   help expr
internal command for specific information about debug expressions.

dbx command debug command Description Notes
assign variable=expression set [-p proc_list] [-v] debug_or_user_var [=] expr [,expr...]
set [-p proc_list] [-v] language_expression
Assign the value of an expression to a variable. Debug's set can be used to evaluate any language expression, typically and assignment.
assign register=expression
assign eax=6
print %eax=(void *)6 Assign the value of an expression to a register. The type casting is required; otherwise debug returns a warning which is not otherwise suppressible.
assign memloc=expression
assign 0x8049478=5
print *(int *)0x8049478=5 Assign the value of an expression to a memory location. The type casting is required; otherwise debug returns a warning which is not otherwise suppressible.
dump [procedure] [> filename] functions [-s] [-p proc_list] [-o object] [-f filename] [pattern]
symbols [-p proc_list] [-o object] [-n filename] [-dfgltuv] [pattern]
Print the names and values of variables in a procedure. Debug's functions and symbols commands can provide information to match dbx's dump command and more.
print expression [, expression ...] print [-p proc_list] [-f format] [-v] expr, ... Print the expression. The -f format option to debug's print command allows the user to use a "C" style format output of the expression, e.g. print -f "0x%x\n" main
whatis expression whatis [-p proc_list] expr Print the declaration of the expression. Debug's whatis command provides all known information about the expression.
which identifier N/A Print the full qualification of the given identifier. Unavailable cross reference information required for this command.

up [count]
down [count]
set %frame = frame_number Move the current frame up / down the stack. Debug's %frame variable contains the current frame number. By setting this variable a user can traverse the stack. These can be aliased with: <P>alias up set %frame = %frame + 1
alias down set %frame = %frame - 1
where identifier stack [-p proc_list] [-f frame] [-c count] [-a address ] [ -s stack ] Print the list of the active procedures and functions. Debug's stack command offers more functionality that dbx's where command.
whereis identifier N/A Print the full qualification of all the symbols whose name matches the given identifier. Unavailable cross reference information required for this command.
dbxref [-i][-o file][options][files] N/A Generate the cross-reference file for dbx's xref, whatis and whereis commands.  
xref identifier N/A Print a cross-reference for the given symbol. Unavailable cross reference information required for this command.


Next topic: Accessing source files
Previous topic: Execution and Tracing Commands

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004