use the -newos toolchain even if -elf is present.
[newos.git] / docs / gdb_post_mortem.html
blobc5ebe4bc356aaea587c65f44c13d7407e69ce2f9
1 <html>
2 <head>
3 <title>The NewOS Operating System: Docs</title>
4 </head>
5 <body BGCOLOR="#FFFFFF">
7 <h1 align="center">How-to debug kernel crashes with GDB</h1>
9 <hr>
11 <hr>
13 <table border="0" width="100%" bgcolor="#E8E8E8">
14 <tr>
15 <td width="100%" height="100%" valign="top" align="left">
16 If you are hacking the Kernel and experiencing Kernel Crashes,
17 the kernel now supports some minimal remote debugging capabilities
18 to hook into GDB. Here are some simple indications.
19 </td>
20 </tr>
21 </table>
23 <hr>
25 <table border="0" width="100%" bgcolor="#E8E8E8">
26 <tr>
27 <td width="100%" height="100%" valign="top" align="left">
28 <center><h3>What you need</h3></center>
29 <ul>
30 <li> A GDB enabled machine and OS (I use FreeBSD myself, but any
31 Linux or even Windows+CygWin will do.)</li>
33 <li> A null modem cable. If you are hacking the kernel you probably
34 already have one for the serial debug output.</li>
36 <li> A kernel file with symbols. In the root makefile edit the lines
37 for GLOBAL_CFLAGS and GLOBAL_LDFLAGS and add -g to them. Rebuild the kernel.<br><br>
38 <b>*You dont need to boot off a kernel with symbols*</b><br>
39 The kernel with symbols is only required in the
40 host running GDB. However, it is important that
41 both kernels (the running one and the one in the
42 GDB host) perfectly match each other: this means
43 they must be compiled from the same source tree
44 with the same compile options (except for the -g).
46 <li> A kernel crash to analyse.</li>
47 </ul>
48 </td>
49 </tr>
50 </table>
52 <hr>
54 <table border="0" width="100%" bgcolor="#E8E8E8">
55 <tr>
56 <td width="100%" height="100%" valign="top" align="left">
57 <center><h3>How to debug</h3></center>
58 <ul>
59 <li> once the kernel has crashed, close the terminal emulator (if you are using one)
60 used for serial debug output.</li>
62 <li> launch GDB specifying the path to kernel file as argument.</li>
64 <li> in GDB type the following commands:
65 <br><br>
66 set remotebaud XXXX<br>
67 target remote YYYY<br>
68 <br>
69 XXXX is the baud rate your kernel is using for
70 serial debug output (115200 by default, unless
71 you changed it). YYYY is the device path to
72 the serial port used for debug output.<br><br>
74 Once you type the "target remote YYYY" command
75 you will be debugging your kernel. The kernel
76 debugger will remain in GDB mode until you quit
77 from GDB, at that point it will return to the
78 normal crash prompt.</li>
79 </ul>
80 </td>
81 </tr>
82 </table>
84 <hr>
86 <table border="0" width="100%" bgcolor="#E8E8E8">
87 <tr>
88 <td width="100%" height="100%" valign="top" align="left">
89 <center><h3>Notes</h3></center>
90 <ul>
91 <li>Personally I have obtained better results by using
92 57600 as serial port speed. Your mileage may vary
93 depending on your serial ports, the length of your
94 serial cable and the phase of the moon. If you feel
95 that it is sluggish try reducing the serial port
96 speed in your kernel (kernel/arch/i386/ arch_dbg_console.c)</li>
98 <li>Currently only inspecting the crash is supported,
99 you cannot single step, set breakpoints etc.</li>
101 <li>For better debugging you may want to have your
102 kernel debugged without optimizations. In the
103 GLOBAL_CFLAGS change the -O to -O0. When compiling
104 with optimizations the compiler may assign some
105 of your local variables to registers, and you
106 will not be able to inspect some values for
107 functions other than the call stack tip.</li>
109 <li>After the "target remote" command you may get an eror message similar to:
110 <br>
111 &nbsp;&nbsp;&nbsp;ptrace(PT_GETDBREGS) failed: No such process
112 <br>
113 you can safely ignore it. It's just GDB being silly.</li>
114 </ul>
115 </td>
116 </tr>
117 </table>
119 <hr>
121 <table border="0" width="100%" bgcolor="#E8E8E8">
122 <tr>
123 <td width="100%" height="100%" valign="top" align="left">
124 <center><h3>Troubleshooting</h3></center>
125 If you have troubles, before typing the "target remote" command. Type the
126 following command:<br>
127 &nbsp;&nbsp;&nbsp;set remotedebug 1<br>
128 This will enable tracing all (actually most) of the data packets exchanged
129 between GDB and the kernel. Now try to reproduce your troubles and send the
130 traces to the NewOS developer list.
131 </td>
132 </tr>
133 </table>
135 <hr>
137 <table border="0" width="100%" bgcolor="#E8E8E8">
138 <tr>
139 <td width="100%" height="100%" valign="top" align="left">
140 <center><h3>Sample debug session</h3></center>
141 &nbsp;&nbsp;&nbsp;[freston@cairo&nbsp;~/NewOS/newos]<br>
142 &nbsp;&nbsp;&nbsp;[freston@cairo&nbsp;~/NewOS/newos]&nbsp;gdb&nbsp;kernel/obj.i386/system<br>
143 &nbsp;&nbsp;&nbsp;GNU&nbsp;gdb&nbsp;4.18<br>
144 &nbsp;&nbsp;&nbsp;Copyright&nbsp;1998&nbsp;Free&nbsp;Software&nbsp;Foundation,&nbsp;Inc.<br>
145 &nbsp;&nbsp;&nbsp;GDB&nbsp;is&nbsp;free&nbsp;software,&nbsp;covered&nbsp;by&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License,&nbsp;and&nbsp;you&nbsp;are<br>
146 &nbsp;&nbsp;&nbsp;welcome&nbsp;to&nbsp;change&nbsp;it&nbsp;and/or&nbsp;distribute&nbsp;copies&nbsp;of&nbsp;it&nbsp;under&nbsp;certain&nbsp;conditions.<br>
147 &nbsp;&nbsp;&nbsp;Type&nbsp;"show&nbsp;copying"&nbsp;to&nbsp;see&nbsp;the&nbsp;conditions.<br>
148 &nbsp;&nbsp;&nbsp;There&nbsp;is&nbsp;absolutely&nbsp;no&nbsp;warranty&nbsp;for&nbsp;GDB.&nbsp;&nbsp;Type&nbsp;"show&nbsp;warranty"&nbsp;for&nbsp;details.<br>
149 &nbsp;&nbsp;&nbsp;This&nbsp;GDB&nbsp;was&nbsp;configured&nbsp;as&nbsp;"i386-unknown-freebsd"...<br>
150 &nbsp;&nbsp;&nbsp;(gdb)&nbsp;set&nbsp;remotebaud&nbsp;57600<br>
151 &nbsp;&nbsp;&nbsp;(gdb)&nbsp;target&nbsp;remote&nbsp;/dev/cuaa0<br>
152 &nbsp;&nbsp;&nbsp;Remote&nbsp;debugging&nbsp;using&nbsp;/dev/cuaa0<br>
153 &nbsp;&nbsp;&nbsp;ptrace(PT_GETDBREGS)&nbsp;failed:&nbsp;No&nbsp;such&nbsp;process<br>
154 &nbsp;&nbsp;&nbsp;0x80009132&nbsp;in&nbsp;kernel_debugger&nbsp;()&nbsp;at&nbsp;kernel/debug.c:227<br>
155 &nbsp;&nbsp;&nbsp;227&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dbg_save_registers(&(dbg_register_file[smp_get_current_cpu()][0]));<br>
156 &nbsp;&nbsp;&nbsp;(gdb)&nbsp;where<br>
157 &nbsp;&nbsp;&nbsp;#0&nbsp;&nbsp;0x80009132&nbsp;in&nbsp;kernel_debugger&nbsp;()&nbsp;at&nbsp;kernel/debug.c:227<br>
158 &nbsp;&nbsp;&nbsp;#1&nbsp;&nbsp;0x800091d5&nbsp;in&nbsp;panic&nbsp;(fmt=0x80036de0&nbsp;"Keyboard&nbsp;Requested&nbsp;Halt\n")<br>
159 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;kernel/debug.c:257<br>
160 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#2&nbsp;&nbsp;0x8002bf85&nbsp;in&nbsp;handle_keyboard_interrupt&nbsp;(data=0x0)<br>
161 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;kernel/dev/arch/i386/keyboard/keyboard.c:185<br>
162 &nbsp;&nbsp;&nbsp;#3&nbsp;&nbsp;0x80008aca&nbsp;in&nbsp;int_io_interrupt_handler&nbsp;(vector=33)&nbsp;at&nbsp;kernel/int.c:135<br>
163 &nbsp;&nbsp;&nbsp;#4&nbsp;&nbsp;0x80025981&nbsp;in&nbsp;i386_handle_trap&nbsp;(frame={gs&nbsp;=&nbsp;16,&nbsp;fs&nbsp;=&nbsp;16,&nbsp;es&nbsp;=&nbsp;16,<br>
164 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ds&nbsp;=&nbsp;2147745808,&nbsp;edi&nbsp;=&nbsp;0,&nbsp;esi&nbsp;=&nbsp;0,&nbsp;ebp&nbsp;=&nbsp;2147786692,&nbsp;esp&nbsp;=&nbsp;2147786648,<br>
165 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ebx&nbsp;=&nbsp;0,&nbsp;edx&nbsp;=&nbsp;39,&nbsp;ecx&nbsp;=&nbsp;1,&nbsp;eax&nbsp;=&nbsp;39,&nbsp;vector&nbsp;=&nbsp;33,&nbsp;error_code&nbsp;=&nbsp;0,<br>
166 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eip&nbsp;=&nbsp;2147506764,&nbsp;cs&nbsp;=&nbsp;8,&nbsp;flags&nbsp;=&nbsp;646,&nbsp;user_esp&nbsp;=&nbsp;0,&nbsp;user_ss&nbsp;=&nbsp;0})<br>
167 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;kernel/arch/i386/arch_int.c:232<br>
168 &nbsp;#5&nbsp;&nbsp;0x8002555c&nbsp;in&nbsp;int_bottom&nbsp;()<br>
169 &nbsp;#6&nbsp;&nbsp;0x0&nbsp;in&nbsp;??&nbsp;()<br>
170 &nbsp;(gdb)&nbsp;list<br>
171 &nbsp;222&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
172 &nbsp;223&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
173 &nbsp;224<br>
174 &nbsp;225&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;void&nbsp;kernel_debugger()<br>
175 &nbsp;226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>
176 &nbsp;227&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dbg_save_registers(&(dbg_register_file[smp_get_current_cpu()][0]));<br>
177 &nbsp;228<br>
178 &nbsp;229&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kernel_debugger_loop();<br>
179 &nbsp;230&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
180 &nbsp;231<br>
181 &nbsp;(gdb)&nbsp;up<br>
182 &nbsp;#1&nbsp;&nbsp;0x800091d5&nbsp;in&nbsp;panic&nbsp;(fmt=0x80036de0&nbsp;"Keyboard&nbsp;Requested&nbsp;Halt\n")<br>
183 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;kernel/debug.c:257<br>
184 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;257&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kernel_debugger();<br>
185 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(gdb)&nbsp;up<br>
186 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#2&nbsp;&nbsp;0x8002bf85&nbsp;in&nbsp;handle_keyboard_interrupt&nbsp;(data=0x0)<br>
187 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;kernel/dev/arch/i386/keyboard/keyboard.c:185<br>
188 &nbsp;185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;panic("Keyboard&nbsp;Requested&nbsp;Halt\n");<br>
189 &nbsp;(gdb)&nbsp;list<br>
190 &nbsp;180&nbsp;&nbsp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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reboot();<br>
199 &nbsp;189&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br>
200 &nbsp;(gdb)&nbsp;print&nbsp;leds<br>
201 &nbsp;$1&nbsp;=&nbsp;1<br>
202 &nbsp;(gdb)&nbsp;up<br>
203 &nbsp;#3&nbsp;&nbsp;0x80008aca&nbsp;in&nbsp;int_io_interrupt_handler&nbsp;(vector=33)&nbsp;at&nbsp;kernel/int.c:135<br>
204 &nbsp;135&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;temp_ret&nbsp;=&nbsp;io->func(io->data);<br>
205 &nbsp;(gdb)&nbsp;list<br>
206 &nbsp;130&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;struct&nbsp;io_handler&nbsp;*io;<br>
207 &nbsp;131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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&nbsp;ret&nbsp;=&nbsp;INT_RESCHEDULE;<br>
214 &nbsp;138&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;io&nbsp;=&nbsp;io->next;<br>
215 &nbsp;139&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
216 &nbsp;(gdb)&nbsp;print&nbsp;vector<br>
217 &nbsp;$2&nbsp;=&nbsp;33<br>
218 &nbsp;(gdb)&nbsp;print&nbsp;io_handlers[vector]<br>
219 &nbsp;$3&nbsp;=&nbsp;(struct&nbsp;io_handler&nbsp;*)&nbsp;0x8008fb20<br>
220 &nbsp;(gdb)&nbsp;print&nbsp;io<br>
221 &nbsp;$4&nbsp;=&nbsp;(struct&nbsp;io_handler&nbsp;*)&nbsp;0x8008fb20<br>
222 &nbsp;(gdb)&nbsp;print&nbsp;*io<br>
223 &nbsp;$5&nbsp;=&nbsp;{next&nbsp;=&nbsp;0x0,&nbsp;func&nbsp;=&nbsp;0x8002be6c&nbsp;<handle_keyboard_interrupt>,&nbsp;data&nbsp;=&nbsp;0x0}<br>
224 &nbsp;(gdb)&nbsp;print&nbsp;*io->next<br>
225 &nbsp;Cannot&nbsp;access&nbsp;memory&nbsp;at&nbsp;address&nbsp;0x0.<br>
226 &nbsp;(gdb)&nbsp;quit<br>
227 &nbsp;The&nbsp;program&nbsp;is&nbsp;running.&nbsp;&nbsp;Exit&nbsp;anyway?&nbsp;(y&nbsp;or&nbsp;n)&nbsp;y<br>
228 &nbsp;[freston@cairo&nbsp;~/NewOS/newos]<br>
229 </td>
230 </tr>
231 </table>
233 <hr>
235 <table border="1" width="100%" bgcolor="#D9D5FF">
236 <tr>
237 <td width="100%" height="49" valign="top" align="center"><small><font color="#000000">This
238 page copyright 2002 </font></small><font size="2">Manuel J. Petit
239 <!-- <br>
240 Any questions, comments, gripes, whatever:
241 <a href="mailto:geist@newos.org">geist@newos.org</a></font>
243 </td>
244 </tr>
245 </table>
247 </body>
248 </html>