Skip to content

Commit

Permalink
ASSERT(): abort() on failure to assist debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
nelhage committed Aug 2, 2012
1 parent a33118c commit eb69575
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bemu.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
if(DEBUG >= lev) \ if(DEBUG >= lev) \
printf("%s:%d: " fmt "\n", __FILE__, __LINE__, ## __VA_ARGS__); \ printf("%s:%d: " fmt "\n", __FILE__, __LINE__, ## __VA_ARGS__); \
} while (0) } while (0)
#define ASSERT(x) if(!(x)) {LOG("FAILED ASSERT : %s", #x); exit(1);} #define ASSERT(x) if(!(x)) {LOG("FAILED ASSERT : %s", #x); abort();}
#else #else
#define LOG_(lev, fmt, ...) #define LOG_(lev, fmt, ...)
#define ASSERT(x) #define ASSERT(x)
Expand Down

0 comments on commit eb69575

Please sign in to comment.