mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
move RDCBREAK() OS-implementation from inline function to macro
* It's a little messier as it's easier for the os-specific header to not define it and get confusing errors, but that's a one-time problem and having an extra function in a callstack and not showing source at the point of the RDCBREAK is annoying every time.
This commit is contained in:
@@ -94,7 +94,7 @@ bool FindDiffRange(void *a, void *b, size_t bufSize, size_t &diffStart, size_t &
|
||||
#define RDCDUMP() do { OSUtility::ForceCrash(); } while(0)
|
||||
|
||||
#if !defined(RELEASE) || defined(FORCE_DEBUGBREAK)
|
||||
#define RDCBREAK() do { if(OSUtility::DebuggerPresent()) OSUtility::DebugBreak(); else RDCDUMP(); } while(0)
|
||||
#define RDCBREAK() do { if(OSUtility::DebuggerPresent()) OS_DEBUG_BREAK(); else RDCDUMP(); } while(0)
|
||||
#else
|
||||
#define RDCBREAK() do { } while(0)
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
|
||||
#define __PRETTY_FUNCTION_SIGNATURE__ __PRETTY_FUNCTION__
|
||||
|
||||
#define OS_DEBUG_BREAK() raise(SIGTRAP)
|
||||
|
||||
#define GetEmbeddedResource(filename) string( CONCAT(CONCAT(_binary_, filename), _start) , CONCAT(CONCAT(_binary_, filename), _end) )
|
||||
|
||||
namespace OSUtility
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#define __PRETTY_FUNCTION_SIGNATURE__ __FUNCSIG__
|
||||
|
||||
#define OS_DEBUG_BREAK() __debugbreak()
|
||||
|
||||
#define GetEmbeddedResource(filename) GetEmbeddedResourceWin32( CONCAT(RESOURCE_, filename) )
|
||||
string GetEmbeddedResourceWin32(int resource);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user