3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 00:26:38 +00:00

Invoke debugger if VERIFY fails in debug mode

This commit is contained in:
Jakob Rath 2023-08-16 09:36:28 +02:00
parent 1f640b96c9
commit 20ab0bc13a

View file

@ -97,6 +97,7 @@ bool is_debug_enabled(const char * tag);
#define VERIFY(_x_) if (!(_x_)) { \
notify_assertion_violation(__FILE__, __LINE__, "Failed to verify: " #_x_ "\n"); \
DEBUG_CODE({ INVOKE_DEBUGGER(); }); \
exit(ERR_UNREACHABLE); \
}
@ -104,6 +105,7 @@ bool is_debug_enabled(const char * tag);
if (!((LHS) == (RHS))) { \
notify_assertion_violation(__FILE__, __LINE__, "Failed to verify: " #LHS " == " #RHS "\n"); \
std::cerr << "LHS value: " << (LHS) << "\nRHS value: " << (RHS) << "\n"; \
DEBUG_CODE({ INVOKE_DEBUGGER(); }); \
exit(ERR_UNREACHABLE); \
}