diff --git a/include/util.h b/include/util.h index c7dc8df92..9de72cd01 100644 --- a/include/util.h +++ b/include/util.h @@ -90,8 +90,12 @@ extern void printk(const char *format, ...); #ifdef CR_NOGLIBC #define BUG_ON_HANDLER(condition) \ do { \ - if ((condition)) \ + if ((condition)) { \ + write_string("BUG at " __FILE__ ": "); \ + write_num(__LINE__); \ + write_string("\n"); \ *(unsigned long *)NULL = 0xdead0000 + __LINE__; \ + } \ } while (0) #else # define BUG_ON_HANDLER(condition) \ diff --git a/restorer.c b/restorer.c index 8b39b7283..e481cbdae 100644 --- a/restorer.c +++ b/restorer.c @@ -12,11 +12,11 @@ #include "compiler.h" #include "types.h" #include "syscall.h" +#include "restorer-log.h" #include "util.h" #include "image.h" #include "crtools.h" -#include "restorer-log.h" #include "lock.h" #include "restorer.h"