Go to Glossary Go to Search Go to IBM C and C++ Compilers Help Home Page Go to IBM Software WWW Site

Monitor Expression in Storage

Select Options->Monitor Expression from the Storage monitor to enter the variable or expression you want to monitor.

The storage monitor is updated to show the requested storage address and contents. This saves you from having to scroll up and down through the monitor's storage pane if you know what storage you want to look at.

For C or C++, given the code:

int x=12;
int *y=&x;

to view the storage for x, you can enter either &x or y.

Note: If you enter the name of a variable that is not a pointer, or an expression that is not related to pointers, the debugger shows storage beginning at the address corresponding to the value of the variable or expression. This storage may not have any connection to the variable itself or to the program you are debugging. Normally you would only use variables or expressions that evaluate to an address (for example, pointers, array names, or expressions containing pointers).

Select the Enabled monitor check box if the expression you are entering evaluates to a dynamically changing address and you want the Storage monitor to show the storage for that changing address. For instance, if you enter a pointer as part of the expression, and the address contained in that pointer changes dynamically, the Storage monitor will display a different location in storage each time the pointer changes.



Supported C++ expressions