notcurses_debug: show binding information #656

pull/677/head
nick black 4 years ago
parent a863daf4f6
commit 9d9caf28cd
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -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);
}

Loading…
Cancel
Save