queue: Log 'last' ptr in addition to 'head'
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 19 Aug 2015 12:53:23 +0000 (20:53 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 20 Aug 2015 02:15:21 +0000 (10:15 +0800)
sys/sys/queue.h

index e13ed26..f3a6db0 100644 (file)
@@ -482,8 +482,10 @@ struct {                                                           \
 } while (0)
 
 #define        QMD_TAILQ_CHECK_TAIL(head, field) do {                          \
-       if (*(head)->tqh_last != NULL)                                  \
-               panic("Bad tailq NEXT(%p->tqh_last) != NULL", (head));  \
+       if (*(head)->tqh_last != NULL) {                                \
+               panic("Bad tailq NEXT(%p->tqh_last) != NULL, last %p",  \
+                   (head), *(head)->tqh_last);                         \
+       }                                                               \
 } while (0)
 
 #define        QMD_TAILQ_CHECK_NEXT(elm, field) do {                           \