[mpp_log]: add mpp_abort on debug mode

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@269 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-09-14 21:50:46 +00:00
parent c842339aaa
commit ced8fe0ca0

View File

@@ -75,6 +75,12 @@ extern RK_U32 mpp_debug;
* 24~31 bit: information print format * 24~31 bit: information print format
*/ */
#ifdef __DEBUG
#define mpp_abort() abort()
#else
#define mpp_abort()
#endif
#define MPP_STRINGS(x) MPP_TO_STRING(x) #define MPP_STRINGS(x) MPP_TO_STRING(x)
#define MPP_TO_STRING(x) #x #define MPP_TO_STRING(x) #x
@@ -82,7 +88,7 @@ extern RK_U32 mpp_debug;
if (!(cond)) { \ if (!(cond)) { \
mpp_err("Assertion %s failed at %s:%d\n", \ mpp_err("Assertion %s failed at %s:%d\n", \
MPP_STRINGS(cond), __FILE__, __LINE__); \ MPP_STRINGS(cond), __FILE__, __LINE__); \
abort(); \ mpp_abort(); \
} \ } \
} while (0) } while (0)
@@ -102,5 +108,4 @@ void __mpp_dbg(RK_U32 debug, RK_U32 flag, const char *tag, const char *fmt, cons
} }
#endif #endif
#endif /*__MPP_LOG_H__*/ #endif /*__MPP_LOG_H__*/