Conditional probe points

To make probe (break or trace) points conditional, you add an expression predicate to the probe point.

For example:
(sdb) b CountOneLine o 0 p lines==1
    Set + 0 Breakpoint CountOneLine o 0
    predicate:eval(lines==1) stopped:false
(sdb)

In this example, the expression specified lines==1u becomes a predicate that is evaluated every time that a tuple arrives at the specified port. If the expression evaluates to true, the breakpoint suspends execution. If the expression evaluates to false, the breakpoint does not suspend execution. In this example, the breakpoint suspends whenever the tuple field lines is equal to 1. In addition to the tuple attributes, the following meta-attributes (starting with character $) are available:






Name Type Value
$probePointType rstring ‘‘Breakpoint'' or ‘‘Tracepoint''
$operationName rstring Operator name, for example:
‘‘CountAllLines''
$portType uint32 0 (for inputs), 1 (for outputs)
$portIndex uint32 port index
$isTuple boolean true (for tuples),
false (for punctuation)
$isPunctuation boolean false (for tuples),
true (for punctuation)
Currently, sdb cannot handle probe point expressions that refer to nested tuple attributes. For example, an attempt to reference wcs.chars fails:
(sdb) b CountOneLine o 0 p wcs.chars<10
ERROR: CDISP0355E Predicate expression 'wcs.chars<10' cannot be evaluated.
Breakpoint not defined because of error in predicate
(sdb)