srikanth krishnakar wrote:
> Hi Jason,
>
> Re attempted with inserting a printk in kernel/kgdb.c kgdb_handle_exception()
> function but seems the kgdb exception has never occurred !!
>
> Does the PowerPC uses PowerPC64 hooks ??
>
>
I am not sure what you mean by this. The hook points for catching the
exceptions are in arch/powerpc/kernel/traps.c, this file is common for
64/32.
I have some completely experimental code in my version which implements
kdb on top of kgdb but for the purpose of demonstration, you can see the
call chain I am talking about:
----- A trace back of what it looks like from inside kgdb -----
# echo g > /proc/sysrq-trigger
SysRq : GDB
Entering kdb (current=0xc88835d0, pid 854) due to Keyboard Entry
KDB>bt
Stack traceback for pid 854
0xc88835d0 854 843 1 0 R 0xc88837f0 *sh
Call Trace:
[c896bb90] [c0008a00] show_stack+0x3c/0x160 (unreliable)
[c896bbc0] [c0145d88] kdb_bt1+0xc0/0x10c
[c896bbf0] [c0145f64] kdb_bt+0x190/0x384
[c896bc80] [c0142a10] kdb_parse+0x16c/0x6e8
[c896bcd0] [c0143b54] kdb_main_loop+0x404/0x974
[c896bd30] [c0053d48] kgdb_handle_exception+0x3bc/0x714
[c896bda0] [c0012d04] kgdb_handle_breakpoint+0x4c/0x8c
[c896bdb0] [c00105bc] program_check_exception+0x478/0x5b8
[c896bde0] [c00126f8] ret_from_except_full+0x0/0x4c
--- Exception: 700 at kgdb_breakpoint+0x10/0x24
LR = __handle_sysrq+0x98/0x168
[c896bed0] [c0182038] write_sysrq_trigger+0x74/0x90
[c896bee0] [c00c6b80] proc_reg_write+0x4c/0x70
[c896bef0] [c0086438] vfs_write+0xc4/0x16c
[c896bf10] [c0086950] sys_write+0x4c/0x90
[c896bf40] [c00120ac] ret_from_syscall+0x0/0x38
--- Exception: c01 at 0xff1331c
LR = 0xfec1f24
KDB>
-----------------------------------------------------------------
If you never made it into kgdb_handle_exception() you can also
instrument the traps.c - program_check_exception and the
arch/powerpc/kernel/kgdb.c - kgdb_handle_breakpoint().
I would guess there is something wrong with the architecture support for
your board, the exception setup, or the macro that detects user vs
kernel mode for the exception. The trace that I cut and pasted was from
a powerpc 604 system against the 2.6.30-rc4 kernel.
Jason.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport