소스 검색

base: break into the debugger on assertion failure if present.

legacy
Sam Hocevar sam 12 년 전
부모
커밋
ced4f7351a
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. +10
    -0
      src/lol/base/assert.h

+ 10
- 0
src/lol/base/assert.h 파일 보기

@@ -25,6 +25,15 @@ static inline void Abort()
#endif
}

/* FIXME: see http://stackoverflow.com/q/3596781/111461 for discussions
* on implementing __debugbreak() on POSIX systems. */
static inline void DebugBreak()
{
#if defined _WIN32
__debugbreak();
#endif
}

#define LOL_CALL(macro, args) macro args
#define LOL_EVAL(a) a
#define LOL_1ST(a, ...) a
@@ -106,6 +115,7 @@ static inline void Abort()
LOL_CALL(LOL_CAT(LOL_ERROR_, LOL_CALL(LOL_COUNT_TO_3, \
(__VA_ARGS__))), \
(__VA_ARGS__)); \
DebugBreak(); \
Abort(); \
}
#endif


불러오는 중...
취소
저장