Skip to content

Commit

Permalink
headers: Use the right windows specific arm instruction for __debugbr…
Browse files Browse the repository at this point in the history
…eak()

The udf arm instruction has a platform specific meaning; on Windows
udf #0xfe is mapped to an exception with STATUS_BREAKPOINT. (The
previous instruction form does stop execution in a debugger, but
continuing might not be possible, but with udf #0xfe it is possible
to continue after stopping.)

Signed-off-by: Martin Storsjö <martin@martin.st>
  • Loading branch information
mstorsjo committed Jun 22, 2021
1 parent d1ab958 commit 38c9f03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mingw-w64-headers/crt/_mingw.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ __MINGW_INTRIN_INLINE void __cdecl __debugbreak(void)
#if defined(__i386__) || defined(__x86_64__)
__asm__ __volatile__("int {$}3":);
#elif defined(__arm__)
__asm__ __volatile__("udf #1");
__asm__ __volatile__("udf #0xfe");
#elif defined(__aarch64__)
__asm__ __volatile__("brk #0xf000");
#else
Expand Down

0 comments on commit 38c9f03

Please sign in to comment.