annotate scripts/os9.gdb @ 3210:6353bb024571

Created makefile and defsfile for NoCan RAMMER module driver and descriptor Updated rammer.asm in the NoCan driver folder to build the NoCan version of the Driver Updated r0.asm file to create the 6MB version of the descriptor. The makefile creates a disk image with two sets of the required drivers for the 6309 and 6809's in their respective module folders. /NITROS9/6309_L2/MODULES/RBF for the 6309 files and /NITROS9/6809_L2/MODULES/RBF for the 6809 files. This will make it easier for doing a dsave from this disk image into a normal distro disk image so people have these drivers ready for when new memory upgrades allow compatible usage of the NoCan registers.
author David Ladd <drencor-xeen@users.sourceforge.net>
date Wed, 20 Dec 2017 15:15:49 -0600
parents e3e858889ab6
children 11d87afc644a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2955
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
1 # gdb scripts for NitrOS-9 (or OS-9)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
2 # Copyright 2014 Tormod Volden
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
3
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
4
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
5 define hook-stop
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
6 printf "S=%04x X=%04x Y=%04x U=%04x A=%02x B=%02x CC=%02x PC=%04x ", $s, $x, $y, $u, $a, $b, $cc , $pc
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
7 os9_mwhere
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
8 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
9
3046
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
10 document hook-stop
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
11 Pretty-print of registers on every halt,
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
12 and updates external source code window.
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
13 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
14
2955
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
15 define os9_mname
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
16 set $mname = (char*)$arg0 + *((int*)$arg0 + 2)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
17 while 1
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
18 if (*$mname < 0x80)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
19 printf "%c", *$mname
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
20 else
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
21 printf "%c", *$mname-0x80
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
22 loop_break
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
23 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
24 set $mname += 1
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
25 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
26 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
27
3046
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
28 document os9_mname
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
29 Print name of module at given address
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
30 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
31
2955
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
32 define os9_mident
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
33 set $m = (int*)$arg0
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
34 set $msize = *($m + 1)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
35 set $mtype = *((char*) $m + 6)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
36 set $mexec = *(int*)((char*) $m + 9)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
37 printf "%04x %4x %2X ", $m, $msize, $mtype
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
38 os9_mname $m
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
39 if ($mtype & 0xf)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
40 printf "\t[exec %04x] ", (char*)$m + $mexec
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
41 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
42 printf "\n"
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
43 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
44
3046
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
45 document os9_mident
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
46 Print details of module at given address.
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
47 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
48
2955
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
49 define os9_mdir
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
50 printf "addr size ty name\n"
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
51 set $mt = 0x300
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
52 while ($mt < 0x400)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
53 if ((int*)*$mt)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
54 os9_mident (int*)*$mt
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
55 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
56 set $mt += 4
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
57 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
58 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
59
3046
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
60 document os9_mdir
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
61 List all modules registered in module directory.
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
62 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
63
2955
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
64 define os9_mwhich
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
65 set $pc_reg = $arg0
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
66 set $mt = 0x300
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
67 while ($mt < 0x400)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
68 if ((int*)*$mt)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
69 set $mstart = (int*)*$mt
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
70 set $mend = (char*)$mstart + *($mstart + 1)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
71 if ($pc_reg >= $mstart && $pc_reg < $mend)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
72 loop_break
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
73 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
74 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
75 set $mt += 4
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
76 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
77 if ($mt == 0x400)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
78 set $mstart = 0
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
79 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
80 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
81
3046
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
82 document os9_mwhich
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
83 (internal) Finds module at given address, sets $mstart quietly.
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
84 end
2955
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
85
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
86 define os9_mwhere
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
87 if ($argc == 1)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
88 set $pc_reg = $arg0
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
89 else
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
90 set $pc_reg = $pc
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
91 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
92 os9_mwhich $pc_reg
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
93 if ($mstart)
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
94 printf "inside "
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
95 os9_mname $mstart
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
96 printf "\n"
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
97 eval "!gvim --remote %02X%02X%02X.crc && gvim --remote-send \":set cursorline<CR>\" && gvim --remote-send \"/^%04X<CR>\"", *((char*)$mend-3), *((char*)$mend-2), *((char*)$mend-1), (char*)$pc_reg - (char*)$mstart
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
98 else
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
99 printf "no module\n"
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
100 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
101 end
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
102
3046
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
103 document os9_mwhere
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
104 Look up source code line for given address.
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
105 Requires assembly list files named by CRC in current directory
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
106 and "gvim" to display listing and highlight line.
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
107 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
108
2955
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
109 define b9
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
110 os9_mwhich $pc
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
111 eval "hbreak *0x%x", (int)$mstart + $arg0
a0b770fab355 Add scripts/os9.gdb and list2crc.pl for gdb debugging
Tormod Volden <debian.tormod@gmail.com>
parents:
diff changeset
112 end
3046
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
113
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
114 document b9
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
115 Set breakpoint in current module, at given offset.
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
116 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
117
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
118 define ss
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
119 set $steps = 0
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
120 if (*$pc == 0x103f)
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
121 set $steps = 3
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
122 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
123 if (*(char*)$pc == 0x8d)
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
124 set $steps = 2
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
125 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
126 if (*(char*)$pc == 0x17)
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
127 set $steps = 3
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
128 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
129 if ($steps != 0)
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
130 thbreak *($pc + $steps)
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
131 cont
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
132 else
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
133 stepi
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
134 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
135 end
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
136
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
137 document ss
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
138 Single step, but skips OS-9 SWI, bsr and lbsr.
e3e858889ab6 scripts/os9.gdb: Add "smart" single step command
Tormod Volden <debian.tormod@gmail.com>
parents: 2955
diff changeset
139 end