|
|
|
@ -253,12 +253,19 @@ namespace ImStb |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// Debug Tools
|
|
|
|
|
// Use 'Metrics->Tools->Item Picker' to break into the call-stack of a specific item.
|
|
|
|
|
// Use 'Metrics/Debugger->Tools->Item Picker' to break into the call-stack of a specific item.
|
|
|
|
|
// This will call IM_DEBUG_BREAK() which you may redefine yourself. See https://github.com/scottt/debugbreak for more reference.
|
|
|
|
|
#ifndef IM_DEBUG_BREAK |
|
|
|
|
#if defined(__clang__) |
|
|
|
|
#define IM_DEBUG_BREAK() __builtin_debugtrap() |
|
|
|
|
#elif defined (_MSC_VER) |
|
|
|
|
#if defined (_MSC_VER) |
|
|
|
|
#define IM_DEBUG_BREAK() __debugbreak() |
|
|
|
|
#elif defined(__clang__) |
|
|
|
|
#define IM_DEBUG_BREAK() __builtin_debugtrap() |
|
|
|
|
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) |
|
|
|
|
#define IM_DEBUG_BREAK() __asm__ volatile("int $0x03") |
|
|
|
|
#elif defined(__GNUC__) && defined(__thumb__) |
|
|
|
|
#define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xde01") |
|
|
|
|
#elif defined(__GNUC__) defined(__arm__) && !defined(__thumb__) |
|
|
|
|
#define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xe7f001f0"); |
|
|
|
|
#else |
|
|
|
|
#define IM_DEBUG_BREAK() IM_ASSERT(0) // It is expected that you define IM_DEBUG_BREAK() into something that will break nicely in a debugger!
|
|
|
|
|
#endif |
|
|
|
|