Hi all,<br><br><font size="1">Target : PowerPC, Virtex-440 Generic </font><br><font size="1">Serial port : Xilinx 16550 Uart ( depends on OF_PLATFORM</font>)<br><br>Further investigation of KGDBOC on PowerPC shows that kgdboc hangs at :<br>
<br>In file : <span style="background-color: rgb(204, 204, 204);">arch/powerpc/include/asm/kgdb.h</span><br><br><b><span style="color: rgb(0, 153, 0);">static inline void</span></b> arch_kgdb_breakpoint(<b><span style="color: rgb(0, 102, 0);">void</span></b>)<br>
{<br>        <b style="color: rgb(255, 153, 0);">asm</b>(<b><span style="color: rgb(153, 51, 153);">&quot;.long 0x7d821008&quot;</span></b>); /* <b><span style="color: rgb(51, 153, 153);">twge r2, r2 </span></b>*/     <b style="color: rgb(255, 0, 0);"> &lt;&lt; ---- KGDBOC Hangs here</b> <b style="color: rgb(255, 0, 0);"> &lt;&lt; ---</b><br>
<br><br>-----------------------------------------<br><span style="background-color: rgb(204, 204, 204);">Debug Log:</span><br style="background-color: rgb(204, 204, 204);"><br><span style="color: rgb(51, 51, 51);">root@10.1.2.55:~# echo g &gt; /proc/sysrq-trigger                                                     </span><br style="color: rgb(51, 51, 51);">
<span style="color: rgb(51, 51, 51);">SysRq : GDB                                                                                          </span><br style="color: rgb(51, 51, 51);"><span style="color: rgb(51, 51, 51);">1------------------------&gt;sysrq_handle_gdb                                                           </span><br style="color: rgb(51, 51, 51);">
<span style="color: rgb(51, 51, 51);">Entering KGDB                                    </span><br style="color: rgb(51, 51, 51);"><span style="color: rgb(51, 51, 51);">1-1-----------------------&gt;kgdb_breakpoint       </span><br style="color: rgb(51, 51, 51);">
<span style="color: rgb(51, 51, 51);">1-2-----------------------&gt;kgdb_breakpoint       </span><br style="color: rgb(51, 51, 51);"><span style="color: rgb(51, 51, 51);">1-3-----------------------&gt;kgdb_breakpoint       </span><br style="color: rgb(51, 51, 51);">
<span style="color: rgb(51, 51, 51);">1-1-----------------------&gt;arch_kgdb_breakpoint  </span><br><br>---------------------------------------------<br><br><br>Any comments or suggestions ????<br><br>-Srikanth<br>----------<br>
<br><div class="gmail_quote">On Mon, May 4, 2009 at 8:12 PM, Bruce Ashfield <span dir="ltr">&lt;<a href="mailto:bruce.ashfield@gmail.com">bruce.ashfield@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Mon, May 4, 2009 at 9:13 AM, srikanth krishnakar<br>
&lt;<a href="mailto:skrishnakar@gmail.com">skrishnakar@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I need help in kgdboc  testing on PowerPC target.<br>
<br>
</div>Have you tried contacting the maintainer ? (I noticed that Jason<br>
wasn&#39;t cc&#39;d), just in case it isn&#39;t simply a use case problem and<br>
might be related to KGDB internals.<br>
<br>
KGDB<br>
P:      Jason Wessel<br>
M:      <a href="mailto:jason.wessel@windriver.com">jason.wessel@windriver.com</a><br>
<br>
I&#39;ve tested KGDBOC up to the 2.6.29 kernel and it worked fine<br>
on a series of 85xx boards. I haven&#39;t had a chance on 2.6.30-rcX<br>
yet, so something may have changed.<br>
<div><div></div><div class="h5"><br>
&gt;<br>
&gt; Linux Kernel: 2.6.30-rc4<br>
&gt; KGDB method : KGDBOC<br>
&gt; Arch: PowerPC<br>
&gt;<br>
&gt; Note: Attached is the kernel config  used.<br>
&gt;<br>
&gt; Has anyone tested KGDBOC for Serial 8250, and the serial port has dependency<br>
&gt; on OF_PLATFORM driver ?<br>
&gt;<br>
&gt; Here are the kernel config options:<br>
&gt;<br>
&gt; Device Drivers  ---&gt;<br>
&gt;            Character devices  ---&gt;<br>
&gt;                           Serial drivers  ---&gt;<br>
&gt;                                                      &lt;*&gt; 8250/16550 and<br>
&gt; compatible serial support<br>
&gt;                                                      [*]   Console on<br>
&gt; 8250/16550 and compatible serial port<br>
&gt;                                                      (4) Number of<br>
&gt; 8250/16550 serial ports to register at runtime<br>
&gt;                                                      [ ] Extended 8250/16550<br>
&gt; serial driver options<br>
&gt;                                                      *** Non-8250 serial<br>
&gt; port support ***<br>
&gt;                                                      &lt;*&gt; Xilinx uartlite<br>
&gt; serial port support<br>
&gt;                                                      [*]   Support for<br>
&gt; console on Xilinx uartlite serial port<br>
&gt;                                                      &lt; &gt; Digi International<br>
&gt; NEO PCI Support<br>
&gt;                                                      &lt;*&gt; Serial port on Open<br>
&gt; Firmware platform bus<br>
&gt;                                                      &lt; &gt; NWP serial port<br>
&gt; driver<br>
&gt;<br>
&gt; Kernel hacking  ---&gt;<br>
&gt;            -*- Magic SysRq key<br>
&gt;                             [*] Kernel debugging<br>
&gt;                             [*] KGDB: kernel debugging with remote gdb  ---&gt;<br>
&gt;                             --- KGDB: kernel debugging with remote<br>
&gt; gdb<br>
&gt;                            &lt;*&gt; KGDB: use kgdb over the serial console<br>
&gt;<br>
&gt;<br>
&gt; ----------------------------------------------<br>
&gt; In the process :<br>
&gt;<br>
&gt;     On the target side :<br>
&gt;<br>
&gt;                              ...............<br>
&gt;                              Serial: 8250/16550 driver, 4 ports, IRQ sharing<br>
&gt; disabled<br>
&gt;                              83e00000.serial: ttyS0 at MMIO 0x83e01003 (irq<br>
&gt; = 16) is a<br>
&gt; 16550A<br>
&gt;                              console [ttyS0]<br>
&gt; enabled<br>
&gt;                              kgdb: Registered I/O driver kgdboc.<br>
&gt;                              .................<br>
&gt;<br>
&gt;                             root@10.161.2.35:~# echo g &gt; /proc/sysrq-trigger<br>
&gt;                             SysRq : GDB<br>
&gt;                             Entering KGDB<br>
&gt;<br>
&gt;<br>
&gt;   On host side :<br>
&gt;<br>
&gt;                            [root@srikant linux-2.6]# powerpc-linux-gnu-gdb<br>
&gt; vmlinux-puru<br>
&gt;                            GNU gdb G++ 4.3-150) 6.8.50.20081022-cvs<br>
&gt;                            Copyright (C) 2008 Free Software Foundation, Inc.<br>
&gt;                            License GPLv3+: GNU GPL version 3 or later<br>
&gt; &lt;<a href="http://gnu.org/licenses/gpl.html" target="_blank">http://gnu.org/licenses/gpl.html</a>&gt;<br>
&gt;                            This is free software: you are free to change and<br>
&gt; redistribute it.<br>
&gt;                            There is NO WARRANTY, to the extent permitted by<br>
&gt; law.  Type &quot;show copying&quot;<br>
&gt;                            and &quot;show warranty&quot; for details.<br>
&gt;                            This GDB was configured as<br>
&gt; &quot;--host=i686-pc-linux-gnu --target=powerpc-linux-gnu&quot;.<br>
&gt;                            For bug reporting instructions, please see:<br>
&gt;                           (gdb) set remotebaud 9600<br>
&gt;                           (gdb) target remote /dev/ttyS0<br>
&gt;                            Remote debugging using /dev/ttyS0<br>
&gt;                           Ignoring packet error, continuing...<br>
&gt;                           warning: unrecognized item &quot;timeout&quot; in<br>
&gt; &quot;qSupported&quot; response<br>
&gt;                           Ignoring packet error, continuing...<br>
&gt;                           Ignoring packet error, continuing...<br>
&gt;                           Ignoring packet error, continuing...<br>
&gt;                           Ignoring packet error, continuing...<br>
&gt;                           Ignoring packet error, continuing...<br>
&gt;                           Malformed response to offset query, timeout<br>
<br>
</div></div>I&#39;m wondering if there is a GDB protocol mismatch and your<br>
version of GDB is sending packets that KGDB can&#39;t handle.<br>
I&#39;m no where near an expert on GDB&#39;s protocol and won&#39;t know<br>
if I&#39;m seeing the same thing until I try 2.6.30-rc<br>
<br>
Bruce<br>
<div class="im"><br>
&gt;<br>
&gt; Can anybody comment on the steps followed in the process of testing or<br>
&gt; something is missing with respect to of_serial.c for powerpc architecture.<br>
&gt; Seems the target has never responded for gdb requests !!!<br>
&gt;<br>
&gt;<br>
&gt; Regards<br>
&gt; Srikanth<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div>&gt; _______________________________________________<br>
&gt; Linuxppc-dev mailing list<br>
&gt; <a href="mailto:Linuxppc-dev@ozlabs.org">Linuxppc-dev@ozlabs.org</a><br>
&gt; <a href="https://ozlabs.org/mailman/listinfo/linuxppc-dev" target="_blank">https://ozlabs.org/mailman/listinfo/linuxppc-dev</a><br>
&gt;<br>
<font color="#888888"><br>
<br>
<br>
--<br>
&quot;Thou shalt not follow the NULL pointer, for chaos and madness await<br>
thee at its end&quot;<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>&quot;The Good You Do, The Best You GET&quot;<br><br>Regards<br>Srikanth Krishnakar<br>**********************<br>