Re: [Kgdb-bugreport] KGDBOC testing on linux-2.6.30-rc4
From: srikanth krishnakar <hidden>
Date: 2009-05-05 12:59:14
On Tue, May 5, 2009 at 5:28 PM, Jason Wessel [off-list ref]wrote:
srikanth krishnakar wrote:quoted
Hi all, Target : PowerPC, Virtex-440 Generic Serial port : Xilinx 16550 Uart ( depends on OF_PLATFORM) Further investigation of KGDBOC on PowerPC shows that kgdboc hangs at : In file : arch/powerpc/include/asm/kgdb.h *static inline void* arch_kgdb_breakpoint(*void*) { *asm*(*".long 0x7d821008"*); /* *twge r2, r2 **/ * << ---- KGDBOC Hangs here* * << ---* ----------------------------------------- Debug Log: root@10.1.2.55:~# echo g > /proc/sysrq-trigger SysRq : GDB 1------------------------>sysrq_handle_gdb Entering KGDB 1-1----------------------->kgdb_breakpoint 1-2----------------------->kgdb_breakpoint 1-3----------------------->kgdb_breakpoint 1-1----------------------->arch_kgdb_breakpoint --------------------------------------------- Any comments or suggestions ????I had used the 2.6.30-rc3 kernel with the PowerPC 604 system I have and it was working fine, but the 4xx archs are a bit different. What happens next after you execute the inline assembly is that an exception occurs, and that is the point that the kgdb entry will actually execute. IE: arch/powerpc/kernel/traps.c program_check_exception() From there kgdb should be entered and the I/O driver gets activated. You could put another printk in kgdb_handle_exception() in kernel/kgdb.c to make sure it actually gets there. Generally when the system hangs hard on an initial entry to kgdb it means there is a problem with the I/O polling driver or there is something else eating the kgdb exception and the kgdb exception handler was never fired in the first place. Jason.
Hi Jason,
Re attempted with inserting a printk in kernel/kgdb.c
kgdb_handle_exception() function but seems the kgdb exception has never
occurred !!
------------------
Debug Log:
root@10.1.2.55:~# echo g > /proc/sysrq-trigger
SysRq : GDB
1------------------------>sysrq_handle_gdb
Entering KGDB
1-1----------------------->kgdb_breakpoint
1-2----------------------->kgdb_breakpoint
1-3----------------------->kgdb_breakpoint
1-1----------------------->arch_kgdb_breakpoint
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Ignoring packet error, continuing...
-------------------
Inserted printk's in kernel kgdb.c :
int
kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs
*regs)
{
printk("1------------------------>%s\n",__FUNCTION__);
if (kgdb_reenter_check(ks)) {
-----------------------------
*Does the PowerPC uses PowerPC64 hooks ??*
as seen below from arch/powerpc/kernel/kgdb.c
/* KGDB functions to use existing PowerPC64 hooks. */
static int kgdb_debugger(struct pt_regs *regs)
{
printk("1------------------------>%s\n",__FUNCTION__);
return *kgdb_handle_exception*(0, computeSignal(TRAP(regs)), 0,
regs);
-------------------------------
Thanks For your co-operation, patience and help.
Regards
Srikanth
**********