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