mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
st/oxr: Switch logger to using XRT_DEBUGBREAK
This commit is contained in:
parent
b7b27cc5a0
commit
611febab5a
|
@ -16,10 +16,6 @@
|
||||||
#include "oxr_objects.h"
|
#include "oxr_objects.h"
|
||||||
#include "oxr_logger.h"
|
#include "oxr_logger.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
// needed for __debugbreak()
|
|
||||||
#include <intrin.h>
|
|
||||||
#endif // _MSC_VER
|
|
||||||
|
|
||||||
DEBUG_GET_ONCE_BOOL_OPTION(entrypoints, "OXR_DEBUG_ENTRYPOINTS", false)
|
DEBUG_GET_ONCE_BOOL_OPTION(entrypoints, "OXR_DEBUG_ENTRYPOINTS", false)
|
||||||
DEBUG_GET_ONCE_BOOL_OPTION(break_on_error, "OXR_BREAK_ON_ERROR", false)
|
DEBUG_GET_ONCE_BOOL_OPTION(break_on_error, "OXR_BREAK_ON_ERROR", false)
|
||||||
|
@ -98,12 +94,8 @@ oxr_error(struct oxr_logger *logger, XrResult result, const char *fmt, ...)
|
||||||
|
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
if (debug_get_bool_option_break_on_error()) {
|
if (debug_get_bool_option_break_on_error()) {
|
||||||
/// Trigger a debugger breakpoint.
|
/// Trigger a debugger breakpoint.
|
||||||
#ifdef _MSC_VER
|
XRT_DEBUGBREAK();
|
||||||
__debugbreak();
|
|
||||||
#else
|
|
||||||
__builtin_trap();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in a new issue