Print block content and backtrace in PANIC_EXTRA
authorXiao Jia <stfairy@gmail.com>
Fri, 18 Sep 2015 01:22:23 +0000 (18:22 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 8 Oct 2015 14:35:55 +0000 (10:35 -0400)
Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/ns/qio.c

index 8e469ee..28c2455 100644 (file)
 #include <smp.h>
 #include <ip.h>
 
-#define PANIC_EXTRA(b)                                                          \
-{                                                                              \
-       if ((b)->extra_len)                                                        \
-               panic("%s doesn't handle extra_data", __FUNCTION__);               \
+#define PANIC_EXTRA(b)                                                 \
+{                                                                      \
+       if ((b)->extra_len) {                                           \
+               printblock(b);                                          \
+               backtrace();                                            \
+               panic("%s doesn't handle extra_data", __FUNCTION__);    \
+       }                                                               \
 }
 
 static uint32_t padblockcnt;