RE: [PATCH] Updated built-in kernel debugger for 2.2.[34] kernel

Dunlap, Randy (randy.dunlap@intel.com)
Mon, 17 May 1999 16:52:42 -0700


I've been trying/using the built-in kernel debugger off and on
for 2-3 weeks now. On my system (Dell OptiPlex GX1p, Pentium III),
all of the commands work as expected except for "go". The "go"
command seems to leave the keyboard controller in an unknown
(and improper) state. I should be back to a shell prompt, but
the (PS/2-style) keyboard is dead. I detect a beep upon
kdb returning back to normal system mode (don't know if it's
coming from the shell [bash] or the keyboard driver).

I've tried a few things, like having kdb not exit its keyboard
command reader function until it sees both a make and a break
for the Enter key: no change.

And like sending a KBD_CMD_ENABLE to the keyboard controller
upon exiting kdb_getscancode() [which reads keyboard commands/options]:
no change.

If you have used kdb and had this probably, did you find a solution/
correction for it? If you are familiar with drivers/char/pc_keyb.c
et al, could you look over kdb's kdb_getscancode() function in
kdb_io.c for correctness? Or are there known problems with some
newer hardware?

Thanks for suggestions...
Randy

> -----Original Message-----
> From: slurn@griffin.engr.sgi.com [mailto:slurn@griffin.engr.sgi.com]
> Sent: Tuesday, April 20, 1999 10:53 PM
> To: linux-kernel@vger.rutgers.edu
> Subject: [PATCH] Updated built-in kernel debugger for 2.2.[34] kernels
>
>
>
> Version v0.4 of the built-in kernel debugger for linux
> is now available.
>
> http://reality.sgi.com/slurn_engr/
>
> --
>
> This release of the kernel debugger is compatible with
> 2.2.3 and 2.2.4 releases of linux (I haven't tried with
> 2.2.[56] yet, but don't anticipate problems).
>
> This release contains the following new features:
>
> * kdb input and output can be redirected to a
> serial port.
> * loadable kdb command modules now fully supported and
> and example command module is provided which symbolically
> displays a vm_area_struct.
> * A command to follow linked lists 'll' is introduced.
> * kdb will now validate all addresses prior to use.
>
>
> As always, comments and bug reports may be sent to
> slurn@engr.sgi.com
>
> scott
>
> ----------- [example using the 'll' and 'vm'
> commands]------------------------
>
> # cd modules
> # insmod kdbm_vm.o
> # Entering kdb on processor 0 due to PAUSE
> kdb> ps
> Task Addr Pid Parent cpu lcpu Tss Command
> 0xc03de000 0000000001 0000000000 0000 0000 0xc03de2d4 init
> 0xc0090000 0000000002 0000000001 0000 0000 0xc00902d4 kflushd
> 0xc000e000 0000000003 0000000001 0000 0000 0xc000e2d4 kpiod
> 0xc000c000 0000000004 0000000001 0000 0000 0xc000c2d4 kswapd
> 0xc7de2000 0000000056 0000000001 0000 0000 0xc7de22d4 kerneld
> 0xc7d3a000 0000000179 0000000001 0000 0000 0xc7d3a2d4 syslogd
> 0xc7a7e000 0000000188 0000000001 0000 0000 0xc7a7e2d4 klogd
> 0xc7a04000 0000000199 0000000001 0000 0000 0xc7a042d4 atd
> 0xc7b84000 0000000210 0000000001 0000 0000 0xc7b842d4 crond
> 0xc79d6000 0000000221 0000000001 0000 0000 0xc79d62d4 portmap
> 0xc798e000 0000000232 0000000001 0000 0000 0xc798e2d4 snmpd
> 0xc7904000 0000000244 0000000001 0000 0000 0xc79042d4 inetd
> 0xc78fc000 0000000255 0000000001 0000 0000 0xc78fc2d4 lpd
> 0xc77ec000 0000000270 0000000001 0000 0000 0xc77ec2d4 sendmail
> 0xc77b8000 0000000282 0000000001 0000 0000 0xc77b82d4 gpm
> 0xc7716000 0000000300 0000000001 0000 0000 0xc77162d4 smbd
> 0xc7ee2000 0000000322 0000000001 0000 0000 0xc7ee22d4 mingetty
> 0xc7d6e000 0000000323 0000000001 0000 0000 0xc7d6e2d4 login
> 0xc778c000 0000000324 0000000001 0000 0000 0xc778c2d4 mingetty
> 0xc78b6000 0000000325 0000000001 0000 0000 0xc78b62d4 mingetty
> 0xc77e8000 0000000326 0000000001 0000 0000 0xc77e82d4 mingetty
> 0xc7708000 0000000327 0000000001 0000 0000 0xc77082d4 mingetty
> 0xc770e000 0000000328 0000000001 0000 0000 0xc770e2d4 mingetty
> 0xc76b0000 0000000330 0000000001 0000 0000 0xc76b02d4 update
> 0xc7592000 0000000331 0000000323 0000 0000 0xc75922d4 ksh
> 0xc7546000 0000000338 0000000331 0000 0000 0xc75462d4 su
> 0xc74dc000 0000000339 0000000338 0000 0000 0xc74dc2d4 ksh
> kdb> md 0xc74dc2d4
> c74dc2d4: 00000000 c74de000 00000018 00000000 .....`MG........
> c74dc2e4: 00000000 00000000 00000000 074de000 .............`M.
> c74dc2f4: c01123ff 00000000 00000000 00000000 #.@............
> c74dc304: 00000000 00000000 c74dded0 00000000 ........P^MG....
> [omitted]
> c74dc474: 00000000 00000000 00000000 00000000 ................
> c74dc484: 00000000 c7c15d00 c77b0900 c026fbe0 .....]AG..{G`{&@
> c74dc494: 00000000 c76c2000 00000000 00000000 ..... lG........
> c74dc4a4: 00000000 00000000 00000000 c74dc4ac ............,DMG
> kdb> md 0xc026fbe0
> c026fbe0: c0262b60 00000000 c7594940 c74de000 @HYG....@IYG.`MG
> [omitted]
> kdb> md 0xc0262b60
> c0262b60: c0266660 08048000 0804c000 c7bec360 `f&@.....@..`C>G
> kdb> ll c0262b60 12 md
> c0262b60: c0266660 08048000 0804c000 c7bec360 `f&@.....@..`C>G
> c7bec360: c0266660 0804c000 0804d000 c7becb20 `f&@.@...P.. K>G
> c7becb20: c0266660 0804d000 08050000 c7bec3a0 `f&@.P...... C>G
> c7bec3a0: c0266660 40000000 40009000 c7bec420 `f&@...@...@ D>G
> c7bec420: c0266660 40009000 4000b000 c7bec4a0 `f&@...@.0.@ D>G
> c7bec4a0: c0266660 4000b000 40010000 c7bec8e0 `f&@.0.@...@`H>G
> c7bec8e0: c0266660 40010000 400a1000 c7becbe0 `f&@...@...@`K>G
> c7becbe0: c0266660 400a1000 400a8000 c7becc60 `f&@...@...@`L>G
> c7becc60: c0266660 400a8000 400b4000 c7952300 `f&@...@.@.@.#.G
> c7952300: c0266660 400b5000 400bc000 c79521c0 `f&@.P.@.@.@@!.G
> c79521c0: c0266660 400bc000 400bd000 c7bec6e0 `f&@.@.@.P.@`F>G
> c7bec6e0: c0266660 bffff000 c0000000 00000000 `f&@.p?...@....
> kdb> ll c0262b60 12 vm
> struct vm_area_struct at 0xc0262b60 for 56 bytes
> vm_start = 0x8048000 vm_end = 0x804c000
> page_prot = 0x25 avl_height = 2244 vm_offset = 0x0
> flags: READ EXEC MAYREAD MAYWRITE MAYEXEC DENYWRITE EXECUTABLE
> struct vm_area_struct at 0xc7bec360 for 56 bytes
> vm_start = 0x804c000 vm_end = 0x804d000
> page_prot = 0x25 avl_height = -31808 vm_offset = 0x3000
> flags: READ WRITE MAYREAD MAYWRITE MAYEXEC DENYWRITE EXECUTABLE
> struct vm_area_struct at 0xc7becb20 for 56 bytes
> vm_start = 0x804d000 vm_end = 0x8050000
> page_prot = 0x25 avl_height = -28664 vm_offset = 0x0
> flags: READ WRITE EXEC MAYREAD MAYWRITE MAYEXEC
> struct vm_area_struct at 0xc7bec3a0 for 56 bytes
> vm_start = 0x40000000 vm_end = 0x40009000
> page_prot = 0x25 avl_height = 30126 vm_offset = 0x0
> flags: READ EXEC MAYREAD MAYWRITE MAYEXEC DENYWRITE
> struct vm_area_struct at 0xc7bec420 for 56 bytes
> vm_start = 0x40009000 vm_end = 0x4000b000
> page_prot = 0x25 avl_height = 30126 vm_offset = 0x8000
> flags: READ WRITE MAYREAD MAYWRITE MAYEXEC DENYWRITE
> struct vm_area_struct at 0xc7bec4a0 for 56 bytes
> vm_start = 0x4000b000 vm_end = 0x40010000
> page_prot = 0x25 avl_height = 26853 vm_offset = 0x0
> flags: READ MAYREAD MAYWRITE MAYEXEC
> struct vm_area_struct at 0xc7bec8e0 for 56 bytes
> vm_start = 0x40010000 vm_end = 0x400a1000
> page_prot = 0x25 avl_height = 2244 vm_offset = 0x0
> flags: READ EXEC MAYREAD MAYWRITE MAYEXEC
> struct vm_area_struct at 0xc7becbe0 for 56 bytes
> vm_start = 0x400a1000 vm_end = 0x400a8000
> page_prot = 0x25 avl_height = 30126 vm_offset = 0x90000
> flags: READ WRITE MAYREAD MAYWRITE MAYEXEC
> struct vm_area_struct at 0xc7becc60 for 56 bytes
> vm_start = 0x400a8000 vm_end = 0x400b4000
> page_prot = 0x25 avl_height = 2244 vm_offset = 0x0
> flags: READ WRITE MAYREAD MAYWRITE MAYEXEC
> struct vm_area_struct at 0xc7952300 for 56 bytes
> vm_start = 0x400b5000 vm_end = 0x400bc000
> page_prot = 0x25 avl_height = 30126 vm_offset = 0x0
> flags: READ EXEC MAYREAD MAYWRITE MAYEXEC
> struct vm_area_struct at 0xc79521c0 for 56 bytes
> vm_start = 0x400bc000 vm_end = 0x400bd000
> page_prot = 0x25 avl_height = -16344 vm_offset = 0x6000
> flags: READ WRITE MAYREAD MAYWRITE MAYEXEC
> struct vm_area_struct at 0xc7bec6e0 for 56 bytes
> vm_start = 0xbffff000 vm_end = 0xc0000000
> page_prot = 0x25 avl_height = 2244 vm_offset = 0x0
> flags: READ WRITE EXEC MAYREAD MAYWRITE MAYEXEC GROWSDOWN
> kdb> go
> # ...
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/