mirror of
https://github.com/Z3Prover/z3
synced 2025-06-23 06:13:40 +00:00
Invoke debugger if VERIFY fails in debug mode
This commit is contained in:
parent
1f640b96c9
commit
20ab0bc13a
1 changed files with 2 additions and 0 deletions
|
@ -97,6 +97,7 @@ bool is_debug_enabled(const char * tag);
|
||||||
|
|
||||||
#define VERIFY(_x_) if (!(_x_)) { \
|
#define VERIFY(_x_) if (!(_x_)) { \
|
||||||
notify_assertion_violation(__FILE__, __LINE__, "Failed to verify: " #_x_ "\n"); \
|
notify_assertion_violation(__FILE__, __LINE__, "Failed to verify: " #_x_ "\n"); \
|
||||||
|
DEBUG_CODE({ INVOKE_DEBUGGER(); }); \
|
||||||
exit(ERR_UNREACHABLE); \
|
exit(ERR_UNREACHABLE); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,6 +105,7 @@ bool is_debug_enabled(const char * tag);
|
||||||
if (!((LHS) == (RHS))) { \
|
if (!((LHS) == (RHS))) { \
|
||||||
notify_assertion_violation(__FILE__, __LINE__, "Failed to verify: " #LHS " == " #RHS "\n"); \
|
notify_assertion_violation(__FILE__, __LINE__, "Failed to verify: " #LHS " == " #RHS "\n"); \
|
||||||
std::cerr << "LHS value: " << (LHS) << "\nRHS value: " << (RHS) << "\n"; \
|
std::cerr << "LHS value: " << (LHS) << "\nRHS value: " << (RHS) << "\n"; \
|
||||||
|
DEBUG_CODE({ INVOKE_DEBUGGER(); }); \
|
||||||
exit(ERR_UNREACHABLE); \
|
exit(ERR_UNREACHABLE); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue