diff --git a/src/lib/debug.c b/src/lib/debug.c index c15d90432..1a3e75856 100644 --- a/src/lib/debug.c +++ b/src/lib/debug.c @@ -9,6 +9,13 @@ void notcurses_debug(notcurses* nc, FILE* debugfp){ fprintf(debugfp, "%04d off y: %3d x: %3d geom y: %3d x: %3d curs y: %3d x: %3d %s %p\n", planeidx, n->absy, n->absx, n->leny, n->lenx, n->y, n->x, n == notcurses_stdplane_const(nc) ? "std" : " ", n); + if(n->bound || n->bnext || n->blist){ + fprintf(debugfp, " bound to %p, next bound %p, bind %p\n", + n->bound, n->bnext, n->blist); + } + if(n->bound == n || n->bnext == n || n->blist == n){ + fprintf(debugfp, "WARNING: bound pointers target self\n"); + } if(n->above != prev){ fprintf(stderr, " WARNING: expected ->above %p, got %p\n", prev, n->above); }