The test subcommand can be used in conjunction with the bt subcommand to break at a specified address when a condition becomes true. This is done by including the test subcommand in a script that is executed when a trace point set by the bt command is hit. When included in a script, the test command evaluates the specified condition, and if true causes a break.
test cond
Aliases: [
The conditional test requires two operands and a single operator. Values that can be used as operands in a test subcommand include symbols, hexadecimal values, and hexadecimal expressions. Comparison operators that are supported include: ==, !=, >=, <=, >, and <. Additionally, the bitwise operators ^ (exclusive OR), & (AND), and | (OR) are supported. When bitwise operators are used, any non-zero result is considered to be true.
KDB(0)> bt open "[ @sysinfo >= 3d ]" stop on open() if condition true KDB(0)> e exit debugger ... Enter kdb [ @sysinfo >= 3d ] KDB(1)> bt display current active trace break points 0: .open+000000 (sid:00000000) trace {hit: 1} {script: [ @sysinfo >= 3d ]} KDB(1)> dw sysinfo 1 print sysinfo value sysinfo+000000: 0000004A