1*4391d5e9Schristos# @(#)gdb.script 8.5 (Berkeley) 5/4/96 2*4391d5e9Schristos 3*4391d5e9Schristos# display the VI screen map 4*4391d5e9Schristos# usage dmap(sp) 5*4391d5e9Schristosdefine dmap 6*4391d5e9Schristos set $h = ((VI_PRIVATE *)$arg0->vi_private)->h_smap 7*4391d5e9Schristos set $t = ((VI_PRIVATE *)$arg0->vi_private)->t_smap 8*4391d5e9Schristos while ($h <= $t) 9*4391d5e9Schristos printf "lno: %2d; soff %d coff %d ", \ 10*4391d5e9Schristos (int)$h->lno, (int)$h->soff, (int)$h->coff 11*4391d5e9Schristos if ($h->c_ecsize == 0) 12*4391d5e9Schristos printf "flushed\n" 13*4391d5e9Schristos else 14*4391d5e9Schristos printf "\n\tsboff %d; scoff %d\n", \ 15*4391d5e9Schristos (int)$h->c_sboff, (int)$h->c_scoff 16*4391d5e9Schristos printf "\teboff %d; eclen %d; ecsize %d\n", \ 17*4391d5e9Schristos (int)$h->c_eboff, (int)$h->c_eclen, \ 18*4391d5e9Schristos (int)$h->c_ecsize 19*4391d5e9Schristos end 20*4391d5e9Schristos set $h = $h + 1 21*4391d5e9Schristos end 22*4391d5e9Schristosend 23*4391d5e9Schristos 24*4391d5e9Schristos# display the tail of the VI screen map 25*4391d5e9Schristosdefine tmap 26*4391d5e9Schristos set $h = ((VI_PRIVATE *)$arg0->vi_private)->h_smap 27*4391d5e9Schristos set $t = ((VI_PRIVATE *)$arg0->vi_private)->t_smap 28*4391d5e9Schristos while ($t >= $h) 29*4391d5e9Schristos printf "lno: %2d; soff %d coff %d ", \ 30*4391d5e9Schristos (int)$t->lno, (int)$t->soff, (int)$t->coff 31*4391d5e9Schristos if ($t->c_ecsize == 0) 32*4391d5e9Schristos printf "flushed\n" 33*4391d5e9Schristos else 34*4391d5e9Schristos printf "\n\tsboff %d; scoff %d\n", \ 35*4391d5e9Schristos (int)$t->c_sboff, (int)$t->c_scoff 36*4391d5e9Schristos printf "\teboff %d; eclen %d; ecsize %d\n", \ 37*4391d5e9Schristos (int)$t->c_eboff, (int)$t->c_eclen, \ 38*4391d5e9Schristos (int)$t->c_ecsize 39*4391d5e9Schristos end 40*4391d5e9Schristos set $t = $t - 1 41*4391d5e9Schristos end 42*4391d5e9Schristosend 43*4391d5e9Schristos 44*4391d5e9Schristos# display the private structures 45*4391d5e9Schristosdefine clp 46*4391d5e9Schristos print *((CL_PRIVATE *)sp->gp->cl_private) 47*4391d5e9Schristosend 48*4391d5e9Schristosdefine vip 49*4391d5e9Schristos print *((VI_PRIVATE *)sp->vi_private) 50*4391d5e9Schristosend 51*4391d5e9Schristosdefine exp 52*4391d5e9Schristos print *((EX_PRIVATE *)sp->ex_private) 53*4391d5e9Schristosend 54*4391d5e9Schristos 55*4391d5e9Schristos# display the marks 56*4391d5e9Schristosdefine markp 57*4391d5e9Schristos set $h = sp->ep->marks.next 58*4391d5e9Schristos set $t = &sp->ep->marks 59*4391d5e9Schristos while ($h != 0 && $h != $t) 60*4391d5e9Schristos printf "key %c lno: %d cno: %d flags: %x\n", \ 61*4391d5e9Schristos ((MARK *)$h)->name, ((MARK *)$h)->lno, \ 62*4391d5e9Schristos ((MARK *)$h)->cno, ((MARK *)$h)->flags 63*4391d5e9Schristos set $h = ((MARK *)$h)->next 64*4391d5e9Schristos end 65*4391d5e9Schristosend 66*4391d5e9Schristos 67*4391d5e9Schristos# display the tags 68*4391d5e9Schristosdefine tagp 69*4391d5e9Schristos set $h = sp->taghdr.next 70*4391d5e9Schristos set $t = &sp->taghdr 71*4391d5e9Schristos while ($h != 0 && $h != $t) 72*4391d5e9Schristos printf "tag: %s lno %d cno %d\n", ((TAG *)$h)->frp->fname, \ 73*4391d5e9Schristos ((TAG *)$h)->lno, ((TAG *)$h)->cno 74*4391d5e9Schristos set $h= ((TAG *)$h)->next 75*4391d5e9Schristos end 76*4391d5e9Schristosend 77