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