Add Windows implementation of breakpoint
This commit is contained in:
parent
9624aff9df
commit
63cde2272b
10
debug.cpp
10
debug.cpp
@ -20,6 +20,7 @@
|
|||||||
#include "debug.hpp"
|
#include "debug.hpp"
|
||||||
#include "backtrace.hpp"
|
#include "backtrace.hpp"
|
||||||
#include "log.hpp"
|
#include "log.hpp"
|
||||||
|
#include "platform.hpp"
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -39,7 +40,13 @@ void
|
|||||||
panic (void)
|
panic (void)
|
||||||
{ panic ("NFI"); }
|
{ panic ("NFI"); }
|
||||||
|
|
||||||
|
#if defined(PLATFORM_WIN32)
|
||||||
|
#include <windows.h>
|
||||||
|
void
|
||||||
|
breakpoint (void) {
|
||||||
|
DebugBreak ();
|
||||||
|
}
|
||||||
|
#else
|
||||||
void
|
void
|
||||||
breakpoint (void) {
|
breakpoint (void) {
|
||||||
#if defined (__x86_64) || defined (__i386)
|
#if defined (__x86_64) || defined (__i386)
|
||||||
@ -48,6 +55,7 @@ breakpoint (void) {
|
|||||||
raise (SIGINT);
|
raise (SIGINT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user