dfocus
Changes the current (Process/Thread P/T) set
Format:
Changes the target of future CLI commands to this P/T set or returns the value of the current P/T set
dfocus [ p/t-set ]
Executes a command in this P/T set
dfocus p/t-set command
Arguments:
p/t-set
A set of processes and threads to be the target of subsequent CLI commands.
command
A CLI command that operates on its own local focus.
Description:
The dfocus command changes the set of processes, threads, and groups upon which a command acts. This command can change the focus for all commands that follow, or just the command that immediately follows.
The dfocus command always expects a P/T value as its first argument. This value can be either a single arena specifier or a list of arena specifiers. The default focus is d1.<, which selects the first user thread. The d (for default) indicates that each CLI command is free to use its own default width.
If you enter an optional command, the focus is set temporarily, and the CLI executes the command in the new focus. After the command executes, the CLI restores focus to its original value. The command argument can be a single command or a list.
If you use a command argument, the dfocus command returns the result of this command’s execution. If you do not enter use a command argument, the dfocus command returns the focus as a string value.
Instead of a P/T set, you can enter a P/T set expression. These expressions are described in “
Using P/T Set Operators” in Chapter 12 of the
TotalView User Guide.
Command alias:
Alias | Definition | Description |
f | dfocus | Changes the object upon which a command acts |
Examples:
dfocus g dgo
Continues the TotalView group that contains the focus process.
dfocus p3 {dhalt; dwhere}
Stops process 3 and displays backtraces for each of its threads.
dfocus 2.3
Sets the focus to thread 3 of process 2, where 2 and 3 are TotalView process and thread identifier values. The focus becomes d2.3.
dfocus 3.2
dfocus .5
Sets and then resets command focus. A focus command that includes a dot and omits the process value uses the current process. Thus, this sequence of commands changes the focus to process 3, thread 5 (d3.5).
dfocus g dstep
Steps the current group. Although the thread of interest (TOI) is determined by the current focus, this command acts on the entire group that contains that thread.
dfocus {p2 p3} {dwhere ; dgo}
Performs a backtrace on all threads in processes 2 and 3, and then tells these processes to execute.
f 2.3 {f p w; f t s; g}
Executes a backtrace (
dwhere) on all the threads in process 2, steps thread 3 in process 2 (without running any other threads in the process), and continues the process.
dfocus p1
Changes the current focus to include just those threads currently in process 1. The width is set to process. The CLI sets the prompt to p1.<.
dfocus a
Changes the current set to include all threads in all processes. After you execute this command, your prompt changes to a1.<. This command alters CLI behavior so that actions that previously operated on a thread now apply to all threads in all processes.
dfocus gW dstatus
Displays the status of all worker threads in the control group. The width is group level and the target is the workers group.
dfocus pW dstatus
Displays the status of all worker threads in the current focus process. The width is process level and the target is the workers group.
f {breakpoint(a) | watchpoint(a)} st
Shows all threads that are stopped at breakpoints or watchpoints.
f {stopped(a) - breakpoint(a)} st
Shows all stopped threads that are not stopped at breakpoints.
Chapter 12 of the
TotalView User Guide contains additional
dfocus examples.
- Related Topics