What is D's "__debugbreak()" equivalent?

Steven Schveighoffer schveiguy at gmail.com
Wed Oct 27 17:08:15 UTC 2021


On 10/27/21 12:54 PM, Simon wrote:
> Microsofts C++ compiler provides the __debugbreak function, which on x86 
> emits interrupt 3, which will cause the debugger to halt. What is the 
> equivalent in D? I tried using raise(SIGINT) from core.stdc.signal, but 
> that just closes the debugger (I thought that was the same, seems like I 
> was wrong).

SIGINT is not an interrupt, it's a POSIX signal.

Inline asm maybe?  https://dlang.org/spec/iasm.html

-Steve


More information about the Digitalmars-d-learn mailing list