The dv command stands for display variables. It’s easy to memorize.

The reality, though, is in the trenches you won’t use the standard format of dv because it doesn’t give you enough (or much) information.

 

Here is the way I use this command:

 

dv /i /t /V

 

/i Causes the display to specify the kind of variable: local, global, parameter, function or unknown.

/t Causes the display to include the data type for each local variable.

/V (uppercase) Causes the display to include the virtual memory address or register location of each local variable and the address of the local variable relative to the relevant register.

Let me show you the difference.

dv

 

 

 

dv /i /t /V

 

 

 

Cool, huh? Now, look at what you can do using this command:

!for_each_frame

This extension executes a debugger command one time for each frame in the stack of the current thread.
Combining both commands gives you all variables for each frame.

!for_each_frame dv /i /t /V

Example:

 

 

 

 

Attention: To see the variables you need private symbols.

 

Tip: kpM does the job, too. See Special Commands tag for more.

Here you can see scripts that use the dv command.

 

Technorati Profile