/[projet1]/public/pc/tools/osdk/main/Osdk/_final_/documentation/doc_debugger.htm
Defence Force logotype

Contents of /public/pc/tools/osdk/main/Osdk/_final_/documentation/doc_debugger.htm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1002 - (show annotations)
Sun Dec 8 10:50:26 2013 UTC (5 years, 11 months ago) by dbug
File MIME type: text/html
File size: 7388 byte(s)
Resynchronized my own changes to the OSDK with what was in the depot.
From now on I will continue the changes directly with the depot version, and try to update more regularly.
The reason I had this big change is that I had two computers with local changes done in demo parties when working on demos, where I did the fixes to handle Euphoric and Oricutron, plus new tools, modified tools, etc... giant mess.
I do not guarantee that what is on the depot is bug free, but it's the version I'm using right now (My OSDK var points to the public\pc\tools\osdk\main\Osdk\_final_ folder.
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
3 <HTML lang=fr dir=ltr>
4 <HEAD>
5 <meta name="robots" content="noindex">
6 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
7 <title>OSDK - Debugger</title>
8 <link href="documentation.css" rel="stylesheet" type="text/css">
9 </HEAD>
10
11 <BODY>
12
13 <hr>
14 <A href="documentation.htm"><img src="arrow_back.gif"></A>
15 <img src="pics/osdk_logo_small.png">
16 <hr>
17
18 <h1>Debugger</h1>
19
20 <table width="100%">
21
22 <tr>
23 <td colspan="2">
24 <p id=chapter>Description</p>
25
26 <p>The debugger is an integral part of the <A href="doc_emulator.htm">emulator</A>, and can be used to trace what
27 the program is doing. Both Euphoric and Oricutron have a built in debugger, unfortunately they have different keyboard shortcuts so please make sure you use the correct ones :)
28 </p>
29 </td>
30 </tr>
31
32
33 <tr>
34 <td>
35 <p id=chapter>Euphoric</p>
36 </td>
37
38 <td>
39 <p id=chapter>Oricutron</p>
40 </td>
41 </tr>
42
43
44 <tr>
45 <td valign="top">
46 <p>To access Euphoric's debugger you need to press the F11 key. This will show you this screen:
47 </p>
48
49 <center>
50 <img src="pics/euphoric_debugging.gif">
51 </center>
52
53 <p>Pressing F11 again will leave the debugger.
54 </p>
55 </td>
56
57 <td valign="top">
58 <p>To access Oricutron's debugger you need to press the F2 key. This will show you this screen:
59 </p>
60
61 <center>
62 <img src="pics/oricutron_debugging.gif">
63 </center>
64
65 <p>In the monitor, number arguments are decimal by default, or prefixed with $ for
66 hex or % for binary. Pretty much everything is output in hex.
67 </p>
68
69 <p>In most places where you can enter a number or address, you can pass a CPU or
70 VIA register. (VIA registers are prefixed with V, e.g. VDDRA). Anywhere you can
71 pass an address, you can also use a symbol.
72 </p>
73
74 </td>
75 </tr>
76
77
78 <tr>
79 <td colspan="2">
80 <p id=chapter>Commands</p>
81 </td>
82 </tr>
83
84
85 <tr>
86 <td valign="top">
87 <p>To use Euphoric's debugger, you need to know some keys:
88 </p>
89
90 <ul>
91 <li><b>F2:</b> step by step tracing (enter in JSR)</li>
92 <li><b>F3:</b> step by step tracing (do not enter in subroutines)</li>
93 <li><b>F4:</b> show Oric screen (can crash...)</li>
94 <li><b>F5:</b> execute up to breakpoint address</li>
95 <li><b>F6:</b> reset</li>
96 <li><b>F7:</b> nmi</li>
97 <li><b>F10:</b> exit Euphoric</li>
98 <li><b>F11:</b> enter/leave from the debugger</li>
99 <li><b>F12:</b> abort execution (during F3 or F5)</li>
100 <li><b>UP & DOWN arrows:</b> scroll zero page window</li>
101 <li><b>PAGE UP & PAGE DOWN:</b> scroll the memory window</li>
102 <li><b>A xxxx:</b> assemble code</li>
103 <li><b>B xxxx:</b> set a breakpoint</li>
104 <li><b>D xxxx:</b> set the memory window adress</li>
105 <li><b>E xxxx:</b> edit a value in memory</li>
106 <li><b>F xxxx:</b> fill memory with a single value</li>
107 <li><b>M xxxx:</b> copy a block of memory</li>
108 <li><b>U xxxx:</b> disassemble code</li>
109 <li><b>P:</b> set PC</li>
110 <li><b>R:</b> change Register. Type register to change (A,X,Y,S,P), or type N,V,B,D,I,Z,C to change a flag.</li>
111 </ul>
112 </td>
113
114 <td valign="top">
115 <p>To use Oricutron's debugger, you need to know some keys:
116 </p>
117
118 <ul>
119 <li><b>F2:</b> Return to the emulator</li>
120 <li><b>F3:</b> Toggle console/debug output/memwatch</li>
121 <li><b>F4:</b> Toggle VIA/AY information</li>
122 <li><b>F9:</b> Reset cycle count</li>
123 <li><b>F10:</b> Step over code</li>
124 <li><b>F11:</b> Step over code without tracing into subroutines.</li>
125 <li><b>F12:</b> Skip instruction</li>
126 </ul>
127
128 <p>You also have some more advanced commands:
129 </p>
130
131 <ul>
132 <li>? - Help</li>
133 <li>a <addr> - Assemble</li>
134 <li>bc <bp id> - Clear breakpoint</li>
135 <li>bcm <bp id> - Clear mem breakpoint</li>
136 <li>bl - List breakpoints</li>
137 <li>blm - List mem breakpoints</li>
138 <li>bs <addr> - Set breakpoint</li>
139 <li>bsm <addr> [rwc] - Set mem breakpoint</li>
140 <li>bz - Zap breakpoints</li>
141 <li>bzm - Zap mem breakpoints</li>
142 <li>d <addr> - Disassemble</li>
143 <li>df <addr> <end> <file>- Disassemble to file</li>
144 <li>m <addr> - Dump memory</li>
145 <li>mm <addr> <value> - Modify memory</li>
146 <li>mw <addr> - Memory watch at addr</li>
147 <li>nl <file> - Load snapshot</li>
148 <li>ns <file> - Save snapshot</li>
149 <li>r <reg> <val> - Set <reg> to <val></li>
150 <li>q, x or qm - Quit monitor</li>
151 <li>qe - Quit emulator</li>
152 <li>sa <name> <addr> - Add or move user symbol</li>
153 <li>sk <name> - Kill user symbol</li>
154 <li>sc - Symbols not case-sensitive</li>
155 <li>sC - Symbols case-sensitive</li>
156 <li>sl <file> - Load user symbols</li>
157 <li>sx <file> - Export user symbols</li>
158 <li>sz - Zap user symbols</li>
159 <li>wm <addr> <len> <file>- Write mem to disk</li>
160 </ul>
161 </td>
162
163 </tr>
164
165
166 <tr>
167 <td colspan="2">
168 <p id=chapter>Advanced features</p>
169 </td>
170 </tr>
171
172
173 <tr>
174 <td valign="top">
175
176 <p>Euphoric's debugger has been slightly improved (there's a small assembler now) and made more consistent with existing PC debuggers (like debug :-). Here are the commands:
177
178 <ul>
179 <li><b>A:</b> Assembler</li>
180 <li><b>B:</b> set Breakpoint address</li>
181 <li><b>D:</b> Dump memory</li>
182 <li><b>E:</b> Enter hex data</li>
183 <li><b>F:</b> Fill memory block with a single value</li>
184 <li><b>M:</b> Move memory block</li>
185 <li><b>P:</b> set PC</li>
186 <li><b>R:</b> change Register. Type register to change (A,X,Y,S,P), or type N,V,B,D,I,Z,C to change a flag.</li>
187 <li><b>U:</b> Unassembler</li>
188 </ul>
189
190 </p>
191
192 </td>
193
194 <td valign="top">
195 <p>Oricutron supports two types of breakpoints. "Normal" breakpoints trigger when the CPU
196 is about to execute an instruction at the breakpoint address. "Memory" breakpoints
197 trigger when the breakpoint address is accessed or modified.
198 </p>
199
200 <p>There are three ways a memory breakpoint can be triggered; when the CPU is about
201 to read the address (r), and the CPU is about to write the address (w), or after the
202 value at the address changes for any reason (c).
203 </p>
204
205 <p>You specify which ways you'd like the breakpoint to trigger when you set the memory
206 breakpoint:
207 </p>
208
209 <ul>
210 <li>bsm r $0c00 <-- Break when the CPU is about to read from $0c00</li>
211 <li>bsm rw $0c00 <-- Break when the CPU is about to access $0c00</li>
212 <li>bsm c $0c00 <-- Break after then contents of $0c00 change</li>
213 <li>bsm rwc $0c00 <-- Break just before the CPU accesses $0c00, or just after it changes for any reason.</li>
214 </ul>
215
216 </td>
217 </tr>
218
219 <tr>
220 <td colspan="2">
221 <p id=chapter>Symbols</p>
222
223 <p>Since the assemblers are compatible with both Euphoric and Oricutron's symbol formats, you should see all the symbols defined in your program directly while debugging.
224 </p>
225 </td>
226 </tr>
227
228 </table>
229
230
231
232
233 <hr>
234 <A href="documentation.htm"><img src="arrow_back.gif"></A>
235 <img src="pics/osdk_logo_small.png">
236 <hr>
237
238 </BODY>
239 </HTML>
240
241

  ViewVC Help
Powered by ViewVC 1.1.26