As you know, Linux doesn't have kernel debugger. So most powerful debugging tool is 'printk' for now. It's not productive and a kind of drudgery to play with it. ... Briefly. Linux kernel debugger for alpha has been finished. It's a mixture of SGI's Linux kernel debugger for Intel and David mosberger's Alpha Linux kernel debugger and some sugar on top. SGI version strongly depends on Intel CPU's features that doesn't exist in alpha. Alpha's feature for debugging is BPT instruction only. And SGI doesn't use 'int $3'(Intel's BPT) 'cause there're a lot more powerful and useful CPU features. So, SGI's interface, keyboard driver and kernel symbol manipulation functions were useful for alpha. David mosberger's version was the first kernel debugger for alpha. But It's not being used and is a remote debugger that needs another system to debug it. I excerpt a few functions from it, like next instruction prediction for single step and debugger entry etc. So now, New alpha linux kernel debugger has most the features of SGI version and a few more features. You can get into kernel debugger anytime by pressing 'Pause' key and put breakpoints, do single step, single step over, process stack trace, ps, memory dump and modify, disassemble , register dump and modify etc. MP is not supported, My main platform that I'm working on is not MP. You can find the codename of the platform somewhere in the capture. It'll be on API(www.alpha-processor.com) home page, I don't know when it would be there. Following is capture. Entering kdb due to Keyboard Entry kdb> ? Command Usage Description ---------------------------------------------------------- md Display Memory Contents mds Display Memory Symbolically mm Modify Memory Contents id Display Instructions dis Display Instructions go [] Continue Execution q [] Continue Execution rd Display Registers rm Modify Registers ef Display exception frame bt [] Stack traceback btp Display stack for process bp [] Set/Display breakpoints bl [] Display breakpoints bpa [] Set/Display global breakpoints bc Clear Breakpoint be Enable Breakpoint bd Disable Breakpoint ss [<#steps>] Single Step s [<#steps>] Single Step so [<#steps>] Single Step over (more) ssb Single step to branch/call ll ps Task Addr PID PPID CPU TSS STAT PRI Command 0x2fff4000 1 0 0 0x2fff4360 S 204 init 0x2ffd4000 2 1 0 0x2ffd4360 S 204 kflushd 0x2ffd0000 3 1 0 0x2ffd0360 S 204 kupdate 0x2ffcc000 4 1 0 0x2ffcc360 S 204 kpiod 0x2ffc8000 5 1 0 0x2ffc8360 S 204 kswapd 0x2f2cc000 230 1 0 0x2f2cc360 S 204 portmap 0x2ed60000 277 1 0 0x2ed60360 S 204 syslogd 0x2ec90000 302 1 0 0x2ec90360 S 204 atd 0x2ec70000 316 1 0 0x2ec70360 S 204 crond 0x2edac000 330 1 0 0x2edac360 S 204 inetd 0x2ebb0000 358 1 0 0x2ebb0360 S 204 gpm 0x2e88c000 373 1 0 0x2e88c360 S 204 xfs 0x2fd94000 411 1 0 0x2fd94360 S 204 login 0x2f5e8000 412 1 0 0x2f5e8360 S 204 mingetty 0x2ed68000 413 1 0 0x2ed68360 S 204 mingetty 0x2ebc8000 414 1 0 0x2ebc8360 S 204 mingetty 0x2ec4c000 415 1 0 0x2ec4c360 S 204 mingetty 0x2eb9c000 416 1 0 0x2eb9c360 S 204 mingetty 0x2e52c000 419 411 0 0x2e52c360 S 204 bash kdb> bt 0xfffffc00003292a8 schedule+0x168 (AR:0xfffffc00004a7f90) 0xfffffc0000312028 sys_idle+0x48 (AR:0xfffffc00004a7fb0) 0xfffffc0000310198 cpu_idle+0x18 (AR:0xfffffc00004a7fc0) 0xfffffc0000486aec start_kernel+0x28c (AR:0xfffffc00004a7fd0) 0xfffffc000031001c _text+0x1c (AR:0xfffffc00004a8000) RA kdb> btp 1 0xfffffc00003292f0 schedule+0x1b0 (AR:0xfffffc002fff7d30) 0xfffffc0000329064 schedule_timeout+0x44 (AR:0xfffffc002fff7d50) 0xfffffc00003542ec do_select+0xcc (AR:0xfffffc002fff7db0) 0xfffffc00003548a0 sys_select+0x3c0 (AR:0xfffffc002fff7e20) Exception frame: 0xfffffc0000310c10 entSys+0xa8 (AR:0xfffffc002fff7ec0) RA kdb> btp 419 0xfffffc00003292f0 schedule+0x1b0 (AR:0xfffffc002e52fda8) 0xfffffc0000329064 schedule_timeout+0x44 (AR:0xfffffc002e52fdc8) 0xfffffc00004132f0 read_chan+0x470 (AR:0xfffffc002e52fe28) 0xfffffc000040ded0 tty_read+0xf0 (AR:0xfffffc002e52fea8) 0xfffffc0000346060 sys_read+0x100 (AR:0xfffffc002e52fee8) Exception frame: 0xfffffc0000310c10 entSys+0xa8 (AR:0xfffffc002e52ff18) RA kdb> bp kmalloc BP #0 at 0xfffffc000033f580 (kmalloc) is enabled on cpu 0 kdb> q breakpoint #0 at 0xfffffc000033f580 kmalloc: ldah gp,32(t12) Entering kdb kdb> bt 0xfffffc000033f580 kmalloc (AR:0xfffffc00004a7c50) 0xfffffc00003a0a04 alloc_skb+0xc4 (AR:0xfffffc00004a7c50) 0xfffffc0000439f8c tulip_rx+0x1ec (AR:0xfffffc00004a7c80) 0xfffffc00004397c0 tulip_interrupt+0xe0 (AR:0xfffffc00004a7ce0) 0xfffffc0000315c34 handle_irq+0x114 (AR:0xfffffc00004a7d40) 0xfffffc00003154c4 isa_device_interrupt+0x64 (AR:0xfffffc00004a7d80) 0xfffffc0000315ef8 do_entInt+0x98 (AR:0xfffffc00004a7da0) Exception frame: 0xfffffc0000310c28 ret_from_sys_call (AR:0xfffffc00004a7db0) 0xfffffc0000331fc4 do_bottom_half+0x44 (AR:0xfffffc00004a7e98) Exception frame: 0xfffffc0000310dcc handle_bottom_half+0x14 (AR:0xfffffc00004a7eb8) Range kdb> bc 0 Breakpoint 0 at 0xfffffc000033f580 cleared kdb> bp handle_irq BP #0 at 0xfffffc0000315b20 (handle_irq) is enabled on cpu 0 kdb> q breakpoint #0 at 0xfffffc0000315b20 handle_irq: ldah gp,35(t12) Entering kdb kdb> ssb handle_irq+0x4: lda gp,-18056(gp) handle_irq+0x8: subq sp,0x40,sp handle_irq+0xc: stq s4,40(sp) handle_irq+0x10: ldq s4,-23896(gp) handle_irq+0x14: stq s1,16(sp) handle_irq+0x18: stq s2,24(sp) handle_irq+0x1c: mov a0,s1 handle_irq+0x20: stq s3,32(sp) handle_irq+0x24: mov a1,s2 handle_irq+0x28: stq ra,0(sp) handle_irq+0x2c: mov a2,s3 handle_irq+0x30: stq s0,8(sp) handle_irq+0x34: stq s5,48(sp) handle_irq+0x38: ldl t0,16(s4) handle_irq+0x3c: cmpule s1,t0,t0 handle_irq+0x40: bne t0,handle_irq+0x60 handle_irq+0x60: ldq s5,-18936(gp) handle_irq+0x64: ldq t3,-21528(gp) handle_irq+0x68: ldq t0,-12528(gp) handle_irq+0x6c: ldl t1,0(s5) handle_irq+0x70: s4addq s1,t3,t3 handle_irq+0x74: ldl t2,0(t3) handle_irq+0x78: s8addq s1,t0,t0 (more) handle_irq+0x7c: ldq s0,0(t0) handle_irq+0x80: addq t1,0x1,t1 handle_irq+0x84: addq t2,0x1,t2 handle_irq+0x88: stl t1,0(s5) handle_irq+0x8c: stl t2,0(t3) handle_irq+0x90: blt s2,handle_irq+0xd8 handle_irq+0x94: ldq t1,-28224(gp) handle_irq+0x98: mov 0x1,t0 handle_irq+0x9c: sll t0,s2,t0 handle_irq+0xa0: ldq t12,272(s4) handle_irq+0xa4: ldq a1,0(t1) handle_irq+0xa8: mov s2,a0 handle_irq+0xac: clr a2 handle_irq+0xb0: or a1,t0,a1 handle_irq+0xb4: stq a1,0(t1) handle_irq+0xb8: jsr ra,(t12),handle_irq+0xbc kdb> s SS trap at 0xfffffc00003242e0 nautilus_update_irq_hw: ldah gp,34(t12) kdb> ssb nautilus_update_irq_hw+0x4: lda gp,-11848(gp) nautilus_update_irq_hw+0x8: subq sp,0x10,sp nautilus_update_irq_hw+0xc: lda t0,256(zero) nautilus_update_irq_hw+0x10: stq ra,0(sp) nautilus_update_irq_hw+0x14: cmpule a0,0x7,a0 nautilus_update_irq_hw+0x18: or a1,t0,a1 nautilus_update_irq_hw+0x1c: bne a0,nautilus_update_irq_hw+0x30 nautilus_update_irq_hw+0x20: ldq t0,-23896(gp) nautilus_update_irq_hw+0x24: extbl a1,0x1,a0 nautilus_update_irq_hw+0x28: mov 0xa1,a1 nautilus_update_irq_hw+0x2c: br nautilus_update_irq_hw+0x3c nautilus_update_irq_hw+0x3c: ldq t12,96(t0) nautilus_update_irq_hw+0x40: jsr ra, (t12),nautilus_update_irq_hw+0x44 kdb> so SS trap at 0xfffffc0000324324 nautilus_update_irq_hw+0x44: ldah gp,34(ra) kdb> ssb nautilus_update_irq_hw+0x48: lda gp,-11916(gp) nautilus_update_irq_hw+0x4c: ldq ra,0(sp) nautilus_update_irq_hw+0x50: addq sp,0x10,sp nautilus_update_irq_hw+0x54: ret zero,(ra),0x1 kdb> s SS trap at 0xfffffc0000315bdc handle_irq+0xbc: ldah gp,35(ra) kdb> ssb handle_irq+0xc0: lda gp,-18244(gp) handle_irq+0xc4: ldq t12,280(s4) handle_irq+0xc8: mov s2,a0 handle_irq+0xcc: jsr ra,(t12),handle_irq+0xd0 kdb> s SS trap at 0xfffffc00003153a0 generic_ack_irq: ldah gp,35(t12) kdb> ssb generic_ack_irq+0x4: lda gp,-16136(gp) generic_ack_irq+0x8: subq sp,0x10,sp generic_ack_irq+0xc: cmpule a0,0xf,t0 generic_ack_irq+0x10: stq ra,0(sp) generic_ack_irq+0x14: beq t0,generic_ack_irq+0x68 generic_ack_irq+0x18: cmpule a0,0x7,t0 generic_ack_irq+0x1c: bne t0,generic_ack_irq+0x48 generic_ack_irq+0x20: ldq t0,-23896(gp) generic_ack_irq+0x24: subq a0,0x8,t1 generic_ack_irq+0x28: or t1,0xe0,a0 generic_ack_irq+0x2c: mov 0xa0,a1 generic_ack_irq+0x30: ldq t12,96(t0) generic_ack_irq+0x34: and a0,0xff,a0 generic_ack_irq+0x38: jsr ra,(t12),generic_ack_irq+0x3c kdb> so SS trap at 0xfffffc00003153dc generic_ack_irq+0x3c: ldah gp,35(ra) kdb> ssb generic_ack_irq+0x40: lda gp,-16196(gp) generic_ack_irq+0x44: mov 0x2,a0 generic_ack_irq+0x48: ldq t0,-23896(gp) generic_ack_irq+0x4c: or a0,0xe0,a0 generic_ack_irq+0x50: and a0,0xff,a0 generic_ack_irq+0x54: mov 0x20,a1 generic_ack_irq+0x58: ldq t12,96(t0) generic_ack_irq+0x5c: jsr ra,(t12),generic_ack_irq+0x60 kdb> so SS trap at 0xfffffc0000315400 generic_ack_irq+0x60: ldah gp,35(ra) kdb> ssb generic_ack_irq+0x64: lda gp,-16232(gp) generic_ack_irq+0x68: ldq ra,0(sp) generic_ack_irq+0x6c: addq sp,0x10,sp generic_ack_irq+0x70: ret zero,(ra),0x1 kdb> s SS trap at 0xfffffc0000315bf0 handle_irq+0xd0: ldah gp,35(ra) kdb> ssb handle_irq+0xd4: lda gp,-18264(gp) handle_irq+0xd8: beq s0,handle_irq+0x15c handle_irq+0xdc: ldq t0,8(s0) handle_irq+0xe0: and t0,0x2,t0 handle_irq+0xe4: beq t0,handle_irq+0x100 handle_irq+0x100: ldq a1,32(s0) handle_irq+0x104: ldq t12,0(s0) handle_irq+0x108: mov s1,a0 handle_irq+0x10c: mov s3,a2 handle_irq+0x110: jsr ra,(t12),handle_irq+0x114 kdb> s SS trap at 0xfffffc00004396e0 tulip_interrupt: ldah gp,16(t12) kdb> s SS trap at 0xfffffc00004396e4 tulip_interrupt+0x4: lda gp,32184(gp) kdb> s SS trap at 0xfffffc00004396e8 tulip_interrupt+0x8: subq sp,0x60,sp kdb> s SS trap at 0xfffffc00004396ec tulip_interrupt+0xc: ldq t0,15936(gp) kdb> s SS trap at 0xfffffc00004396f0 tulip_interrupt+0x10: stq s4,40(sp) kdb> q breakpoint #0 at 0xfffffc0000315b20 handle_irq: ldah gp,35(t12) Entering kdb kdb> bt 0xfffffc0000315b20 handle_irq (AR:0xfffffc002ffd39d8) 0xfffffc00003154c4 isa_device_interrupt+0x64 (AR:0xfffffc002ffd39d8) 0xfffffc0000315ef8 do_entInt+0x98 (AR:0xfffffc002ffd39f8) Exception frame: 0xfffffc0000310c28 ret_from_sys_call (AR:0xfffffc002ffd3a08) 0xfffffc00003e455c ide_do_request+0x3bc (AR:0xfffffc002ffd3af0) 0xfffffc00003e4a58 start_next_request+0x58 (AR:0xfffffc002ffd3b40) 0xfffffc00003e4e90 ide_intr+0x150 (AR:0xfffffc002ffd3b60) 0xfffffc0000315c34 handle_irq+0x114 (AR:0xfffffc002ffd3b90) 0xfffffc00003154c4 isa_device_interrupt+0x64 (AR:0xfffffc002ffd3bd0) 0xfffffc0000315ef8 do_entInt+0x98 (AR:0xfffffc002ffd3bf0) Exception frame: 0xfffffc0000310c28 ret_from_sys_call (AR:0xfffffc002ffd3c00) 0xfffffc0000331fc4 do_bottom_half+0x44 (AR:0xfffffc002ffd3ce8) Exception frame: 0xfffffc0000310dcc handle_bottom_half+0x14 (AR:0xfffffc002ffd3d08) Range kdb> md 0xfffffc002ffd39d8 fffffc002ffd39d8: 00315ef8 fffffc00 00579eb8 fffffc00 ?1..?�?W..?� fffffc002ffd39e8: 00583480 fffffc00 a2000000 426d1a94 .4X..?�...?.mB fffffc002ffd39f8: 00310c28 fffffc00 fc000080 ffff8801 (.1..?�...?.�� fffffc002ffd3a08: 00000007 00000000 00000000 00000000 ................ fffffc002ffd3a18: 00000000 00000000 00000303 00000000 ................ fffffc002ffd3a28: 00000003 00000000 00583480 fffffc00 .........4X..?� fffffc002ffd3a38: 00583480 fffffc00 00583480 fffffc00 .4X..?�.4X..?� fffffc002ffd3a48: 2ffd0000 fffffc00 00000000 00000000 ..?.?�........ kdb> md/l 0xfffffc002ffd39d8 fffffc002ffd39d8: fffffc0000315ef8 fffffc0000579eb8 ?1..?�?W..?� fffffc002ffd39e8: fffffc0000583480 426d1a94a2000000 .4X..?�...?.mB fffffc002ffd39f8: fffffc0000310c28 ffff8801fc000080 (.1..?�...?.�� fffffc002ffd3a08: 0000000000000007 0000000000000000 ................ fffffc002ffd3a18: 0000000000000000 0000000000000303 ................ fffffc002ffd3a28: 0000000000000003 fffffc0000583480 .........4X..?� fffffc002ffd3a38: fffffc0000583480 fffffc0000583480 .4X..?�.4X..?� fffffc002ffd3a48: fffffc002ffd0000 0000000000000000 ..?.?�........ kdb> 0xfffffc0000310c28 0xfffffc0000310c28 = 0xfffffc0000310c28 (ret_from_sys_call+0x0) kdb> q breakpoint #0 at 0xfffffc0000315b20 handle_irq: ldah gp,35(t12) Entering kdb kdb> bt 0xfffffc0000315b20 handle_irq (AR:0xfffffc002ffd3bd0) 0xfffffc00003154c4 isa_device_interrupt+0x64 (AR:0xfffffc002ffd3bd0) 0xfffffc0000315ef8 do_entInt+0x98 (AR:0xfffffc002ffd3bf0) Exception frame: 0xfffffc0000310c28 ret_from_sys_call (AR:0xfffffc002ffd3c00) 0xfffffc0000331fc4 do_bottom_half+0x44 (AR:0xfffffc002ffd3ce8) Exception frame: 0xfffffc0000310dcc handle_bottom_half+0x14 (AR:0xfffffc002ffd3d08) Range kdb> ss SS trap at 0xfffffc0000315b24 handle_irq+0x4: lda gp,-18056(gp) kdb> rd r0 = 0x0000000000000004 r1 = 0xfffffd01f8000000 r2 = 0xffffffffffffff0b r3 = 0x0000000000000000 r4 = 0xfffffc000056d6a0 r5 = 0xfffffc0000d0f818 r6 = 0xfffffc002e4ef060 r7 = 0xfffffc0000549004 r8 = 0xfffffc002ffd0000 r16 = 0x000000000000000b r17 = 0x000000000000000b r18 = 0xfffffc002ffd3c00 r19 = 0x0000000000000000 r20 = 0x0000000000000002 r21 = 0x0000000000000001 r22 = 0xfffffc0000579cf0 r23 = 0xfffffc00005485d0 r24 = 0x0000000000000000 r25 = 0x0000000000000050 r26 = 0xfffffc00003154c4 r27 = 0xfffffc0000315b20 r28 = 0x0000000000000000 ps = 0x0000000000000004 pc = 0xfffffc0000315b24 gp = 0xfffffc0000545b20 ®s = 0xfffffc002ffd3ae8 kdb> ss SS trap at 0xfffffc0000315b28 handle_irq+0x8: subq sp,0x40,sp kdb> rd r0 = 0x0000000000000007 r1 = 0xfffffc00004a8adc r2 = 0xffffffffffdd4a18 r3 = 0x0000000000000029 r4 = 0xfffffc0000315eb0 r5 = 0x00000000000a7373 r6 = 0xfffffc0000505e28 r7 = 0x3d45444f4d444900 r8 = 0xfffffc002ffd0000 r16 = 0x0000000000000008 r17 = 0xffffffffffffffff r18 = 0xfffffc002ffd3680 r19 = 0xfffffc002ffd3ae8 r20 = 0x00000000000000a0 r21 = 0x0000000000000000 r22 = 0xfffffc0000506281 r23 = 0xfffffc0000505e28 r24 = 0xfffffc0000505e28 r25 = 0x0000000000000010 r26 = 0xfffffc0000315ec0 r27 = 0xfffffc0000315e60 r28 = 0xfffffc0000548650 ps = 0x0000000000000005 pc = 0xfffffc0000315b28 gp = 0xfffffc0000541498 ®s = 0xfffffc002ffd3588 kdb> q Sent via Deja.com http://www.deja.com/ Before you buy.