I want to set a condition on a `catch syscall`, e.g.: break whenever write is called with a given string to stdout http://stackoverflow.com/questions/8235436/how-can-i-monitor-whats-being-put-into-the-standard-out-buffer-and-break-when-a catch syscall write condition 2 $rdi == 1 && strcmp((char *)$rsi, "a\n") == 0 The problem is that I wasn't able to automate getting the breakpoint number, `2` in this example. I currently need to manually read the number from stdout at creation time, or `info breakpoints`. With break, I can just use `break WHERE if COND`, which does not depend on the explicit breakpoint number. If it is not currently possible, would you consider a patch that adds `if` to `catch syscall`? Other possibilities include: - make condition target the last `catch` by default, much like commands - store the ID of the last set catchpoint in a magic convenience var
Could you try the "$bpnum" convenience variable?
:-)