Improve WINPR_ASSERT, log backtrace
#include <winpr/winpr.h>
#include <winpr/wtypes.h>
#include <winpr/wlog.h>
+#include <winpr/debug.h>
#if defined(WITH_VERBOSE_WINPR_ASSERT) && (WITH_VERBOSE_WINPR_ASSERT != 0)
#define WINPR_ASSERT(cond) \
{ \
if (!(cond)) \
{ \
- WLog_FATAL("com.freerdp.winpr.assert", "%s [%s:%s:%" PRIuz "]", #cond, __FILE__, \
- __FUNCTION__, __LINE__); \
+ const char* tag = "com.freerdp.winpr.assert"; \
+ WLog_FATAL(tag, "%s [%s:%s:%" PRIuz "]", #cond, __FILE__, __FUNCTION__, __LINE__); \
+ winpr_log_backtrace(tag, WLOG_FATAL, 20); \
abort(); \
} \
} while (0)
