0
|
1 b expr
|
|
2 b aexpr
|
|
3 b mexpr
|
|
4 b term
|
6
|
5
|
|
6 define regs
|
|
7 printf "pc =%08x lr =%08x r0 =%08x r1 =%08x r3= %08x r4= %08x\n",$pc,$lr,$r0,$r1,$r3,$r4
|
|
8 printf "r10=%08x r11=%08x r12=%08x r13=%08x r14=%08x r15=%08x\n",$r10,$r11,$r12,$r13,$r14,$r15
|
|
9 end
|
|
10 define fregs
|
|
11 printf "f1=%g f2=%g f3=%g f4=%g f5=%g f6=%g\n",$f1,$f2,$f3,$f4,$f5,$f6
|
|
12 printf "f10=%g f11=%g f12=%g f13=%g f14=%g f15=%g\n",$f10,$f11,$f12,$f13,$f14,$f15
|
|
13 end
|
|
14 define allreg
|
|
15 printf "pc =%08x lr =%08x r0 =%08x r1 =%08x r3= %08x r4= %08x\n",$pc,$lr,$r0,$r1,$r3,$r4
|
|
16 printf "r5=%08x r6=%08x r7=%08x r8=%08x r9=%08x\n",$r5,$r6,$r7,$r8,$r9
|
|
17 printf "r10=%08x r11=%08x r12=%08x r13=%08x r14=%08x r15=%08x\n",$r10,$r11,$r12,$r13,$r14,$r15
|
|
18 printf "r16=%08x r17=%08x r18=%08x r19=%08x r20=%08x r21=%08x\n",$r10,$r11,$r12,$r13,$r14,$r15
|
|
19 printf "f1=%g f2=%g f3=%g f4=%g f5=%g f6=%g\n",$f1,$f2,$f3,$f4,$f5,$f6
|
|
20 printf "f10=%g f11=%g f12=%g f13=%g f14=%g f15=%g\n",$f10,$f11,$f12,$f13,$f14,$f15
|
|
21 printf "f20=%g f21=%g f22=%g f23=%g f24=%g f25=%g\n",$f20,$f21,$f22,$f23,$f24,$f25
|
|
22 end
|
|
23 define sh
|
|
24 regs
|
|
25 x/20i $pc-36
|
|
26 end
|
|
27 define si
|
|
28 stepi
|
|
29 regs
|
|
30 x/1i $pc
|
|
31 end
|
|
32 define ni
|
|
33 nexti
|
|
34 regs
|
|
35 x/1i $pc
|
|
36 end
|
|
37 # b errmsg
|
|
38 tb main
|