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