dfocus

Changes the current Process/Thread set

Format:

Changes the target of future CLI commands to this 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. This set defines the target upon which the CLI commands that follow will act. You can also use a P/T set filter as one or more of the elements in this list.

command

A CLI command, which when it executes, operates upon its own local focus.

Description:

The dfocus command changes the set of processes, threads, and groups upon which a command will act. 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 either be 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 command in the new focus. After 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, dfocus returns the result of the command. If you do not enter a command, dfocus returns the focus as a string value.

Note:   Instead of a P/T set, you can type a P/T set expression. These expressions are described in P/T Set Expressions.

Command alias:

You may find the following alias useful:

Alias
Definition
Meaning
f
{dfocus}
Changes object upon which a command acts.

Examples:

dfocus g dgo

Continues the TotalView group containing 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 the "2" and the "3" are TotalView's process and thread identifier values. The focus is set to d2.3.

dfocus 3.2

dfocus .5

Sets, then resets command focus. A focus command that includes a dot and omits the process value tells the CLI to use 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. Note that while the thread of interest is determined by the current focus, the command acts on the entire group containing 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. When you execute this command, you will notice that your prompt changes to a1.<. This command alters the CLI's 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.

You will find many other dfocus examples in "Groups, Processes, and Threads".

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0