diff --git a/source/lib/sysdep/ia32.cpp b/source/lib/sysdep/ia32.cpp index 508bd4552e..70dd90ced6 100755 --- a/source/lib/sysdep/ia32.cpp +++ b/source/lib/sysdep/ia32.cpp @@ -101,6 +101,12 @@ __asm } +void ia32_debug_break() +{ + __asm int 3 +} + + // // data returned by cpuid() // each function using this data must call cpuid (no-op if already called) diff --git a/source/lib/sysdep/ia32.h b/source/lib/sysdep/ia32.h index 86bd1cdc7f..b6c19d2b0b 100755 --- a/source/lib/sysdep/ia32.h +++ b/source/lib/sysdep/ia32.h @@ -39,6 +39,10 @@ extern u64 rdtsc(); extern uint _control87(uint new_cw, uint mask); +extern void ia32_debug_break(); + + + // CPU caps (128 bits) // do not change the order! (breaks cpuid()) enum CpuCap diff --git a/source/lib/sysdep/win/win.cpp b/source/lib/sysdep/win/win.cpp index 37c156b174..adfd18fdbf 100755 --- a/source/lib/sysdep/win/win.cpp +++ b/source/lib/sysdep/win/win.cpp @@ -57,6 +57,12 @@ void wdisplay_msg(const wchar_t* caption, const wchar_t* msg) } +void win_debug_break() +{ + DebugBreak(); +} + + // need to shoehorn printf-style variable params into // the OutputDebugString call. diff --git a/source/lib/sysdep/win/win.h b/source/lib/sysdep/win/win.h index 3eb4554d41..b36d7c07f1 100755 --- a/source/lib/sysdep/win/win.h +++ b/source/lib/sysdep/win/win.h @@ -19,4 +19,7 @@ #define WINAPI __stdcall #define WINAPIV __cdecl + +extern "C" void win_debug_break(); + #endif // #ifndef __WIN_H__