Using SoftBench Debugger
Examining and Changing Data in Your Program
For example, if you declare a pointer as int *numptr, then selecting Print* ( ) with numptr in the "()" input box prints the integer pointed to by numptr. You can also Print ( ) the expression *numptr.
Printing Hex or String ValuesSoftBench Debugger knows the type of the variables you print, and usually prints them in a usable form. However, it cannot tell if an integer should be printed in decimal or hexadecimal, nor can it tell if you want a "char *" value to be printed as a character or a string.
You can specify the print format by choosing one of the selections under "Show: Data Value → Print Format". Refer to online help for information on printing strings and character arrays.
If you frequently need to print hex or string values, you can define a button to do it on the front panel. See “Customizing User Buttons” on page 228.
You can also use
1.Type an assignment statement in the "()" input box.
2.Select Print ( ).
For example, the assignment "n = 12" sets the value of n to 12. The assignment statement must be legal in the current scope. That is, n must be a declared numeric data type.
You can also call functions that modify their arguments.
For more information on the syntax of variables and expressions, see “Using Debugger Variables” on page 183 or “Specifying Variables” on page 178.
Using Debugger VariablesDDE supports
declare int *tptr
Chapter 7 | 183 |