Only reason I can think of is that conditional breakpoints in the debugger can be much slower than compiling that same condition right into the debuggee.
The only reason is that many still don't learn how to use debuggers, people write blog posts about language featuritis, rewrite X in Y, and then keep using debuggers as if stuck in the 1960's.
grandparent is not advocating making it unconditional, but just adding the nop instruction to the __asm part.
Inserting an unconditional debug trap into a shipping, production executable, is a complete nonstarter. The program will receive a signal that is fatal, if unhandled.
flohofwoe|1 year ago
pjmlp|1 year ago
pjmlp|1 year ago
kazinator|1 year ago
Inserting an unconditional debug trap into a shipping, production executable, is a complete nonstarter. The program will receive a signal that is fatal, if unhandled.
mgaunard|1 year ago