P/T Set Expressions

At times, you do not want all of one kind of group or process to be in the focus set. The CLI lets you use the following three operators to manage your P/T sets:

|

Creates a union; that is, all members of the sets.

-

Creates a difference; that is, all members of the first set that are not also members of a second set.

&

Creates an intersection; that is, all members of the first set that are also members of the second set.

For example, here is how you would create a union of two P/T sets:

p3 | L2 

A set operator only operates upon two sets. You can, however, apply these operations repeatedly. For example:

p2 | p3 & L2 

This statement creates a union between p2 and p3, and then creates an intersection between the union and L2.

The CLI associates sets from left to right. You can change this order by using parentheses. For example:

p2 | (p3 & pL2) 

Typically, these three operators are used with the following P/T set functions:

breakpoint()

Returns a list of all threads that are stopped at a breakpoint.

error()

Returns a list of all threads stopped due to an error.

existent()

Returns a list of all threads.

held()

Returns a list of all threads that are held.

nonexistent()

Returns a list of all processes that have exited or which, while loaded, have not yet been created.

running()

Returns a list of all running threads.

stopped()

Returns a list of all stopped threads.

unheld()

Returns a list of all threads that are not held.

watchpoint()

Returns a list of all threads that are stopped at a watchpoint.

The argument that all of these operators use is a P/T set. You specify this set in the same that a P/T set is specified for the dfocus command. For example, watchpoint(L) returns all threads in the current lockstep group.

The following examples should clarify how these operators and functions are used. The P/T set that is the argument to these operators is a (all).

f {breakpoint(a) | watchpoint(a)} dstatus

Shows all threads that stopped at breakpoints and watchpoints. The a argument is the standard P/T set indicator for "all".

f { stopped(a) - breakpoint(a) } dstatus

Shows all stopped threads that are not stopped at breakpoints.

f { g.3 - p6 } duntil 577

Runs thread 3 along with all other processes in the group to line 577. However, do not run anything in process 6.

f { ($PTSET) & p123 }

Uses just process 123 within the current P/T set.

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