In This Book

 

print

x =

y + z

Assigns the value of y + z to x (using C syntax).

 

 

 

 

Displays the result in the debugger output area.

 

set x = y

+ z

Assigns the value of y + z to x (using C syntax).

 

 

 

 

Does not display the result in the debugger

 

 

 

 

output area.

 

declare int idx

Creates the temporary variable idx of type int

 

 

 

 

(using C syntax).

 

list

declares

Show all user-de￿ned (temporary) variables.

 

args

 

 

Show the values of arguments of the current

4

 

 

 

routine

The next sections giv e you some idea of the the versatility and ￿exibilit y of these commands. They describe how to use debugger commands to examine arrays, pointers, linked lists, and bu￿ers.

The online command reference gives more examples and describes all the options for each command.

Examining Arrays

To print an entire array, enter the print command and specify the array name without a subscript. For example, suppose the array list is declared as follows:

static int list[5] = {3,4,2,0,5};

The following command prints the array list:

print list

\\parray\list: (array)

\\parray\list[0]: 3

\\parray\list[1]: 4

\\parray\list[2]: 2

\\parray\list[3]: 0

\\parray\list[4]: 5

Viewing and Manipulating Target Program Data 4-5