dwhere
Displays the current execution location and call stack
Format:
Displays locations in the call stack
dwhere [ -level level-num ] [ num-levels ] [ -args ] [ -locals ] [ -registers ]
[ -noshow_pc ][ -noshow_fp ][ -show_image ]
Displays all locations in the call stack
dwhere -all [ -args ] [ -locals ] [-registers ]
[ -noshow_pc ][ -noshow_fp ][ -show_image ]
Arguments:
-level level-num
Sets the level at which dwhere starts displaying information.
num-levels
Restricts output to this number of levels of the call stack. By default, all levels are shown.
-args
Displays argument names and values in addition to program location information. By default, the arguments are not shown.
-locals
Displays each frame’s local variables. By default, the local variable information is not shown.
-noshow_pc
Does not show the PC. By default, the PC value is shown.
-noshow_fp
Does not show the FP. By default, the FP value is shown.
-registers
Displays each frame’s registers. By default, the register information is not shown.
-show_image
Shows the executable name as well as the file name. By default, dwhere displays the associated image information if the source line cannot be found.
-all
Shows all levels of the call stack. This is the default.
Description:
The dwhere command prints the current execution locations and the call stacks—or sequences of procedure calls—that led to that point. The CLI shows information for threads in the current focus, with the default being to show information at the thread level.
Arguments control the amount of command output in two ways:
The
num-levels argument determines how many levels of the call stacks are displayed, counting from the uppermost (most recent) level. Without this argument, the CLI shows all levels in the call stack, which is the default.
The
-a option displays procedure argument names and values for each stack level.
A dwhere command with no arguments or options displays the call stacks for all threads in the target set.
The
MAX_LEVELS variable contains the default maximum number of levels displayed when you do not use the
num-levels argument.
Output is generated for each thread in the target focus. The output is printed directly to the console.
Command alias:
Alias | Definition | Description |
w | dwhere | Displays the current location in the call stack |
Examples:
dwhere
Displays the call stacks for all threads in the current focus.
dfocus 2.1 dwhere 1
Displays just the most recent level of the call stack corresponding to thread 1 in process 2. This shows just the immediate execution location of a thread or threads.
f p1.< w 5
Displays the most recent five levels of the call stacks for all threads involved in process 1. If the depth of any call stack is less than five levels, all of its levels are shown.
This command is a slightly more complicated way of saying f p1 w 5 because specifying a process width tells the dwhere command to ignore the thread indicator.
w 1 -a
Displays the current execution locations (one level only) of threads in the current focus, together with the names and values of any arguments that were passed into the current process.
- Related Topics