From owner-kdb@oss.sgi.com Mon Jul 3 23:47:22 2000 Received: by oss.sgi.com id ; Mon, 3 Jul 2000 23:47:13 -0700 Received: from mta6.snfc21.pbi.net ([206.13.28.240]:34466 "EHLO mta6.snfc21.pbi.net") by oss.sgi.com with ESMTP id ; Mon, 3 Jul 2000 23:46:54 -0700 Received: from hereuare.com ([63.194.82.174]) by mta6.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0FX5007IHURTJW@mta6.snfc21.pbi.net> for kdb@oss.sgi.com; Mon, 3 Jul 2000 23:45:29 -0700 (PDT) Date: Mon, 03 Jul 2000 23:43:21 -0700 From: Clark Dong Subject: Loadable KDB Modules To: KDB Mail List Message-id: <39618788.C69F8323@hereuare.com> MIME-version: 1.0 X-Mailer: Mozilla 4.73 [en] (Win98; U) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Folks, I recently found out that kdb has this wonderful flexibility to be extended with loadable debug modules. Having been a past fan of adb and built a library of cryptic scripts, I can appreciate how much time these debuger modules can save. Now if only there is a library of these useful commands... Does anyone have written any useful kdb commands that they care to share? Perhaps we can pull it all together in a central depository. You know, kind like an open source thing? -cd From owner-kdb@oss.sgi.com Tue Jul 4 00:08:12 2000 Received: by oss.sgi.com id ; Tue, 4 Jul 2000 00:07:53 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:56694 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 4 Jul 2000 00:07:24 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via SMTP id AAA06635 for ; Tue, 4 Jul 2000 00:12:56 -0700 (PDT) mail_from (kaos@kao2.melbourne.sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA01857 for ; Tue, 4 Jul 2000 17:06:17 +1000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: KDB Mail List Subject: Re: Loadable KDB Modules In-reply-to: Your message of "Mon, 03 Jul 2000 23:43:21 MST." <39618788.C69F8323@hereuare.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Jul 2000 17:06:16 +1000 Message-ID: <3681.962694376@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Mon, 03 Jul 2000 23:43:21 -0700, Clark Dong wrote: >Does anyone have written any useful kdb commands that they care to >share? Perhaps we can pull it all together in a central depository. >You know, kind like an open source thing? http://oss.sgi.com/projects/kdb/download/modules/ has been setup to hold useful kdb modules, at the moment the only file is README. Please mail sources to this list or mail a URL where larger sources can be found. I will copy them to oss.sgi.com. From owner-kdb@oss.sgi.com Thu Jul 6 09:59:09 2000 Received: by oss.sgi.com id ; Thu, 6 Jul 2000 09:58:49 -0700 Received: from magic.adaptec.com ([208.236.45.80]:34041 "EHLO magic.adaptec.com") by oss.sgi.com with ESMTP id ; Thu, 6 Jul 2000 09:58:37 -0700 Received: from kingdom.adaptec.com (kingdom.adaptec.com [162.62.50.10]) by magic.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id JAA15818 for ; Thu, 6 Jul 2000 09:58:42 -0700 (PDT) Received: from aimexc01.corp.adaptec.com ([162.62.62.41]) by kingdom.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id JAA28745 for ; Thu, 6 Jul 2000 09:58:41 -0700 (PDT) Received: by aimexc01.corp.adaptec.com with Internet Mail Service (5.5.2650.21) id <3MX4G61G>; Thu, 6 Jul 2000 09:58:41 -0700 Message-ID: From: "Boerner, Brian" To: "'kdb@oss.sgi.com'" Subject: Online Man Pages Date: Thu, 6 Jul 2000 09:54:34 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing I've been unsuccessful at getting the man pages provided to display. Does anyone have these online in html format? -bmb- Brian M. Boerner System Software Developer Adaptec, Inc. Nashua, NH 03060 (603) 579-4625 From owner-kdb@oss.sgi.com Thu Jul 6 10:41:38 2000 Received: by oss.sgi.com id ; Thu, 6 Jul 2000 10:41:19 -0700 Received: from Cantor.suse.de ([194.112.123.193]:52230 "HELO Cantor.suse.de") by oss.sgi.com with SMTP id ; Thu, 6 Jul 2000 10:41:06 -0700 Received: from Hermes.suse.de (Hermes.suse.de [194.112.123.136]) by Cantor.suse.de (Postfix) with ESMTP id 5CD141E126; Thu, 6 Jul 2000 19:41:14 +0200 (MEST) Received: from gruyere.muc.suse.de (unknown [10.23.1.2]) by Hermes.suse.de (Postfix) with ESMTP id 2B0EE10A026; Thu, 6 Jul 2000 19:41:14 +0200 (MEST) Received: by gruyere.muc.suse.de (Postfix, from userid 14446) id C7D0A2F300; Thu, 6 Jul 2000 19:41:11 +0200 (MEST) Date: Thu, 6 Jul 2000 19:41:11 +0200 From: "Andi Kleen" To: "Boerner, Brian" Cc: "'kdb@oss.sgi.com'" Subject: Re: Online Man Pages Message-ID: <20000706194111.A24122@gruyere.muc.suse.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from Brian_Boerner@ntc.adaptec.com on Thu, Jul 06, 2000 at 09:54:34AM -0700 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, Jul 06, 2000 at 09:54:34AM -0700, Boerner, Brian wrote: > I've been unsuccessful at getting the man pages provided to display. Does > anyone have these online in html format? Try `grog name` -Tascii | less -Andi From owner-kdb@oss.sgi.com Thu Jul 6 10:54:58 2000 Received: by oss.sgi.com id ; Thu, 6 Jul 2000 10:54:38 -0700 Received: from tourguide.nanobiz.com ([208.176.9.173]:40966 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Thu, 6 Jul 2000 10:54:20 -0700 Received: from pendragon.eng.nanobiz.com (IDENT:root@pendragon [192.168.1.155]) by nanobiz.com (8.9.3/8.9.3) with ESMTP id KAA08779; Thu, 6 Jul 2000 10:54:24 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Thu, 6 Jul 2000 10:49:05 -0700 Message-Id: <200007061749.KAA01531@pendragon.eng.nanobiz.com> Subject: Re: Online Man Pages To: Brian_Boerner@ntc.adaptec.com (Boerner Brian) Date: Thu, 6 Jul 2000 10:49:05 -0700 (PDT) Cc: kdb@oss.sgi.com ('kdb@oss.sgi.com') In-Reply-To: from "Boerner, Brian" at Jul 06, 2000 09:54:34 AM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing > > I've been unsuccessful at getting the man pages provided to display. Does > anyone have these online in html format? > > -bmb- try: $ nroff -man < manpage | col -b | more to print: $ groff -man < manpage |lpr or $ groff -man < manpage > /tmp/manpage.ps $ gv /tmp/manpage.ps scott > > > Brian M. Boerner > System Software Developer > Adaptec, Inc. > Nashua, NH 03060 > (603) 579-4625 > From owner-kdb@oss.sgi.com Thu Jul 6 16:15:42 2000 Received: by oss.sgi.com id ; Thu, 6 Jul 2000 16:15:32 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:36370 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Thu, 6 Jul 2000 16:15:15 -0700 Received: (qmail 15465 invoked by uid 502); 6 Jul 2000 23:15:13 -0000 Received: (qmail 15453 invoked from network); 6 Jul 2000 23:15:11 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 6 Jul 2000 23:15:11 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Boerner, Brian" cc: "'kdb@oss.sgi.com'" Subject: Re: Online Man Pages In-reply-to: Your message of "Thu, 06 Jul 2000 09:54:34 MST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 07 Jul 2000 09:15:10 +1000 Message-ID: <3750.962925310@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, 6 Jul 2000 09:54:34 -0700 , "Boerner, Brian" wrote: >I've been unsuccessful at getting the man pages provided to display. Does >anyone have these online in html format? "man Documentation/kdb/kdb.mm". The man command recognises that any name containing '/' is to be treated as a man page instead of searching $MANPATH. From owner-kdb@oss.sgi.com Fri Jul 7 01:24:29 2000 Received: by oss.sgi.com id ; Fri, 7 Jul 2000 01:24:20 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:43333 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Fri, 7 Jul 2000 01:24:10 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via SMTP id BAA22951; Fri, 7 Jul 2000 01:19:16 -0700 (PDT) mail_from (kaos@kao2.melbourne.sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id SAA23725; Fri, 7 Jul 2000 18:23:00 +1000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: kdb@oss.sgi.com, linux-xfs@oss.sgi.com Subject: kdb v1.3 patch against 2.4.0-test3-pre5 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 07 Jul 2000 18:23:00 +1000 Message-ID: <21369.962958180@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing 2.4.0-test3-pre5 has changed enough to need a new kdb patch. ftp://oss.sgi.com/projects/kdb/download/ix86/kdb-v1.3-2.4.0-test3-pre5.gz From owner-kdb@oss.sgi.com Sun Jul 9 21:27:44 2000 Received: by oss.sgi.com id ; Sun, 9 Jul 2000 21:27:24 -0700 Received: from inet-tsb.toshiba.co.jp ([202.33.96.40]:26064 "EHLO inet-tsb.toshiba.co.jp") by oss.sgi.com with ESMTP id ; Sun, 9 Jul 2000 21:27:11 -0700 Received: from tis2.tis.toshiba.co.jp (tis2 [133.199.160.66]) by inet-tsb.toshiba.co.jp (3.7W:TOSHIBA-ISC-2000030918) with ESMTP id NAA07986 for ; Mon, 10 Jul 2000 13:27:02 +0900 (JST) Received: from mx.toshiba.co.jp by tis2.tis.toshiba.co.jp (8.8.4+2.7Wbeta4/3.3W9-95082317) id NAA24540; Mon, 10 Jul 2000 13:27:01 +0900 (JST) Received: from ilab-master.ilab.toshiba.co.jp by toshiba.co.jp (8.7.1+2.6Wbeta4/3.3W9-TOSHIBA-GLOBAL SERVER) id NAA26344; Mon, 10 Jul 2000 13:26:52 +0900 (JST) Received: from godbird.ap.ilab.toshiba.co.jp by ilab-master.ilab.toshiba.co.jp (8.6.11+2.5Wb2/3.3W9-ilab2.5) with ESMTP id NAA02399; Mon, 10 Jul 2000 13:26:52 +0900 Received: from skyline.ap.ilab.toshiba.co.jp by godbird.ap.ilab.toshiba.co.jp (8.8.8/3.6W-ap1.5) with SMTP id NAA04296; Mon, 10 Jul 2000 13:29:27 +0900 (JST) Message-ID: <001501bfea26$c8d01480$951364c9@ap.ilab.toshiba.co.jp> From: "Koji Yamamoto" To: Cc: "Koji Yamamoto" Subject: [Q]kdb_v0.6-2.2.13 compile probrem Date: Mon, 10 Jul 2000 13:24:48 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Hello. I use TurboLinux 6.0( kernel version 2.2.13-10 ) and I tried to compile kernel. But I received this message and failed to compile kernel. -- make[3]: Entering directory `/usr/src/linux-2.2.13/drivers/block' gcc -V2.7.2.3 -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototype s -O2 -pipe -fno-strength-reduce -m386 -DCPU=386 -DEXPORT_SYMTAB -c xor.c xor.c: In function `xor_block_pII_mmx': xor.c:586: fixed or forbidden register was spilled. This may be due to a compiler bug or to impossible asm statements or clauses. cpp: output pipe has been closed -- Can anyone tell my what should I do? Thanks in advance. -- Koji Yamamoto( yamamoto@ap.ilab.toshiba.co.jp ) From owner-kdb@oss.sgi.com Sun Jul 9 22:18:35 2000 Received: by oss.sgi.com id ; Sun, 9 Jul 2000 22:18:15 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:15208 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Sun, 9 Jul 2000 22:17:47 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via SMTP id WAA21904 for ; Sun, 9 Jul 2000 22:12:52 -0700 (PDT) mail_from (kaos@kao2.melbourne.sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id PAA07921; Mon, 10 Jul 2000 15:15:19 +1000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Koji Yamamoto" cc: kdb@oss.sgi.com Subject: Re: [Q]kdb_v0.6-2.2.13 compile probrem In-reply-to: Your message of "Mon, 10 Jul 2000 13:24:48 +0900." <001501bfea26$c8d01480$951364c9@ap.ilab.toshiba.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 10 Jul 2000 15:15:18 +1000 Message-ID: <12224.963206118@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Mon, 10 Jul 2000 13:24:48 +0900, "Koji Yamamoto" wrote: >Hello. I use TurboLinux 6.0( kernel version 2.2.13-10 ) and >I tried to compile kernel. >But I received this message and failed to compile kernel. >-- >make[3]: Entering directory `/usr/src/linux-2.2.13/drivers/block' >gcc -V2.7.2.3 -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototype >s >-O2 -pipe -fno-strength-reduce -m386 -DCPU=386 -DEXPORT_SYMTAB -c xor.c >xor.c: In function `xor_block_pII_mmx': >xor.c:586: fixed or forbidden register was spilled. >This may be due to a compiler bug or to impossible asm >statements or clauses. >cpp: output pipe has been closed This problem is in a source file that has nothing to do with kdb. I think you have something confused, drivers/block/xor.c is not in any 2.2 kernel, it was only added in 2.3.99-pre8. If your 2.2.13 kernel really does have xor.c then TurboLinux must have back ported it to 2.2.13, ask TurboLinux about this problem. Otherwise it looks like you have mixed 2.2 and 2.3. kernel source, cleanup and try again. kdb v0.6 is for 2.2. kernels, kdb v1.3 is for 2.4.test kernels. From owner-kdb@oss.sgi.com Tue Jul 11 17:54:55 2000 Received: by oss.sgi.com id ; Tue, 11 Jul 2000 17:54:36 -0700 Received: from baal.visi.com ([209.98.98.3]:49129 "EHLO mail.visi.com") by oss.sgi.com with ESMTP id ; Tue, 11 Jul 2000 17:54:26 -0700 Received: from mail.ziga.com (host02.ziga.visi.com [209.98.212.98]) by mail.visi.com (8.8.8/8.7.5) with ESMTP id JAA23857 for ; Tue, 11 Jul 2000 09:38:18 -0500 (CDT) Posted-Date: Tue, 11 Jul 2000 09:38:18 -0500 (CDT) Received: from roundtable.int.ziga.com (roundtable.int.ziga.com [10.1.2.23]) by mail.ziga.com (8.9.3/8.9.1) with ESMTP id JAA56058 for ; Tue, 11 Jul 2000 09:52:14 -0500 (CDT) Received: from wookie (wookie.int.ziga.com [10.1.2.38]) by roundtable.int.ziga.com (8.9.3/8.9.1) with SMTP id JAA17875 for ; Tue, 11 Jul 2000 09:50:46 -0500 (CDT) From: "Tim Ethen" To: Subject: re: hang with kdb on 2.2.14 Date: Tue, 11 Jul 2000 09:36:38 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing I am also running into this problem. I am running the 2.2.14 kernel (Redhat 6.2) and hit this problem when I press the 'break' key. This is my first attempt at patching the kernel and re-building, so there is a strong possibility for operator error. Any ideas or suggestions are appreciated. Thanks, Tim ---------------------------- Tim Ethen Ziga 1000 Boone Ave. N. Suite 200 Mineapolis, MN 55427 (612)540-0042 x208 chewey@ziga.com >I tried the 2.213 patch on a 2.2.14 kernel (mandrake 7.0) an every time i >call kdb , i have the prompt but on every cmd i have a hang after the message >: > >Unable to handle kernel NULL pointer deference at virtual adress 000000ff > >curent -> tss.cr3=00101000 , %cr3=00101000 >*xpde = 00000000 > >Is anybody working on the 2.2.14 with KDB > >Thanks > >-- >Roland Dubouloz BULL OMNIS >BULL SA mailto:Roland.Dubouloz@bull.net >1,Rue de Provence Phone :+33 (0)4 76 29 77 87 >BP 208 Bullcom : 229-7787 >38432 Echirolles CEDEX Office : A1-052 >France Fax : +33 (0)4 76 29 70 02 From owner-kdb@oss.sgi.com Wed Jul 12 16:44:58 2000 Received: by oss.sgi.com id ; Wed, 12 Jul 2000 16:44:48 -0700 Received: from thalia.fm.intel.com ([132.233.247.11]:21770 "EHLO thalia.fm.intel.com") by oss.sgi.com with ESMTP id ; Wed, 12 Jul 2000 16:44:39 -0700 Received: from SMTP (fmsmsxvs01-1.fm.intel.com [132.233.42.201]) by thalia.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.30 2000/06/08 18:25:35 dmccart Exp $) with SMTP id XAA20905 for ; Wed, 12 Jul 2000 23:45:42 GMT Received: from fmsmsx27.FM.INTEL.COM ([132.233.48.27]) by 132.233.48.201 (Norton AntiVirus for Internet Email Gateways 1.0) ; Wed, 12 Jul 2000 23:44:47 0000 (GMT) Received: by fmsmsx27.fm.intel.com with Internet Mail Service (5.5.2650.21) id <34SWYR1W>; Wed, 12 Jul 2000 16:44:46 -0700 Message-ID: From: "Dunlap, Randy" To: kdb@oss.sgi.com Subject: kdb questions Date: Wed, 12 Jul 2000 16:44:43 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Hi, With kdb (i386), are there ways to 1) read a physical memory address or 2) read from an io port? 1) If a driver (being developed/debugged) had mapped the physical memory address to a virtual address, and you knew that address, you could read that memory. 2) For an IO port, if the driver read it to a register then you could look at the register with kbd. But what if you are testing a driver and the driver dies, but not the kernel. You could cat /proc/pci to get the device's physical memory address and read that with kbd, if kdb could read such addresses. IO register access could be useful after a device and/or driver is dead also, to help determine why the device died. Thanks, ~Randhy From owner-kdb@oss.sgi.com Wed Jul 12 16:53:19 2000 Received: by oss.sgi.com id ; Wed, 12 Jul 2000 16:53:09 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:21301 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Wed, 12 Jul 2000 16:52:57 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via SMTP id QAA01674 for ; Wed, 12 Jul 2000 16:58:37 -0700 (PDT) mail_from (kaos@kao2.melbourne.sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA02876; Thu, 13 Jul 2000 09:51:42 +1000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Dunlap, Randy" cc: kdb@oss.sgi.com Subject: Re: kdb questions In-reply-to: Your message of "Wed, 12 Jul 2000 16:44:43 MST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 13 Jul 2000 09:51:42 +1000 Message-ID: <1015.963445902@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Wed, 12 Jul 2000 16:44:43 -0700, "Dunlap, Randy" wrote: >With kdb (i386), are there ways to >1) read a physical memory address or >2) read from an io port? There are no builtin commands to do this, mainly because each bit of hardware has different rules about when ports can be read, e.g. write A to port X before you can read B from port Y. Also kdb disables all interrupts which makes it difficult to do any I/O. My current optinion is that this problem is best dealt with by the writing your own little kdb module to provide the hardware specific commands for the driver being debugged. From owner-kdb@oss.sgi.com Wed Jul 12 18:15:09 2000 Received: by oss.sgi.com id ; Wed, 12 Jul 2000 18:14:49 -0700 Received: from tourguide.nanobiz.com ([208.176.9.173]:59403 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Wed, 12 Jul 2000 18:14:30 -0700 Received: from pendragon.eng.nanobiz.com (IDENT:root@pendragon [192.168.1.155]) by nanobiz.com (8.9.3/8.9.3) with ESMTP id SAA26635; Wed, 12 Jul 2000 18:14:33 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Wed, 12 Jul 2000 18:09:28 -0700 Message-Id: <200007130109.SAA05844@pendragon.eng.nanobiz.com> Subject: Re: kdb questions To: kaos@melbourne.sgi.com (Keith Owens) Date: Wed, 12 Jul 2000 18:09:28 -0700 (PDT) Cc: randy.dunlap@intel.com (Dunlap Randy), kdb@oss.sgi.com In-Reply-To: <1015.963445902@kao2.melbourne.sgi.com> from "Keith Owens" at Jul 13, 2000 09:51:42 AM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing > > On Wed, 12 Jul 2000 16:44:43 -0700, > "Dunlap, Randy" wrote: > >With kdb (i386), are there ways to > >1) read a physical memory address or > >2) read from an io port? > > There are no builtin commands to do this, mainly because each bit of > hardware has different rules about when ports can be read, e.g. write A > to port X before you can read B from port Y. Also kdb disables all > interrupts which makes it difficult to do any I/O. My current optinion > is that this problem is best dealt with by the writing your own little > kdb module to provide the hardware specific commands for the driver > being debugged. > Hi Randy, One can always examine a physical memory address with 'md' by adding _PAGE_OFFSET (normally 0xc0000000) to the physical address. Of course if there are side effects from the read (i.e. consuming FIFO bytes, etc.) there may be subsequent difficulties in the driver which owns the hardware. (if the kernel is ever modified such that there is no longer a one-to-one mapping between KVA and PA spaces then new commands, mdp and mmp should be implemented to access the Physical address space). I one prototyped a command to read I/O ports. I just never got around to including it in the base kdb, but I don't see any reason why it shouldn't be. I'll try to dig it up one of these evenings. (mdi [] - memory display, I/O address space) The interrupt issue is a bit of a red herring, as one can simply poll for completion when using kdb, if you are using mdi/mmi to play with the I/O ports. scott From owner-kdb@oss.sgi.com Thu Jul 13 00:22:21 2000 Received: by oss.sgi.com id ; Thu, 13 Jul 2000 00:22:11 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:14419 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Thu, 13 Jul 2000 00:22:00 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via SMTP id AAA09577 for ; Thu, 13 Jul 2000 00:27:40 -0700 (PDT) mail_from (kaos@kao2.melbourne.sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA05754; Thu, 13 Jul 2000 17:20:47 +1000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Tim Ethen" cc: kdb@oss.sgi.com Subject: Re: hang with kdb on 2.2.14 In-reply-to: Your message of "Tue, 11 Jul 2000 09:36:38 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 13 Jul 2000 17:20:46 +1000 Message-ID: <8597.963472846@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Tue, 11 Jul 2000 09:36:38 -0500, "Tim Ethen" wrote: >I am also running into this problem. I am running the 2.2.14 kernel (Redhat >6.2) and hit >this problem when I press the 'break' key. Due to lack of resources, kdb for 2.2 kernels is not being worked on. All of our efforts are on kernel 2.[34]. Unless you absolutely have to work on 2.2 kernels, I suggest you test on a 2.[34] kernel. If anybody wants to back port the kdb v1.3 changes from kernel 2.[34] to 2.2, feel free. From owner-kdb@oss.sgi.com Fri Jul 14 02:31:59 2000 Received: by oss.sgi.com id ; Fri, 14 Jul 2000 02:31:50 -0700 Received: from pop.gmx.net ([194.221.183.20]:45520 "HELO mail.gmx.net") by oss.sgi.com with SMTP id ; Fri, 14 Jul 2000 02:31:32 -0700 Received: (qmail 12738 invoked by uid 0); 14 Jul 2000 09:31:34 -0000 Received: from unknown (HELO gmx.net) (194.42.179.5) by mail.gmx.net with SMTP; 14 Jul 2000 09:31:34 -0000 Message-ID: <396EDDFD.448C5227@gmx.net> Date: Fri, 14 Jul 2000 11:31:41 +0200 From: Daniel Krippner Organization: 3S-Smart Software Solutions GmbH X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.15-4mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: kdb@oss.sgi.com Subject: kdb-installation Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Hi there. I have a question concerning the installation of kdb; I use a Mandrake 2.2.15 kernel and kdb version 0.6_2.2.13 when i try to patch my source tree, i get a lot of 'can't find file to patch', for example -------------------------- |diff -Naur linux2.2-pure/kern/mm/vmalloc.c linux2.2-kdb/kern/mm/vmalloc.c |--- linux2.2-pure/kern/mm/vmalloc.c Tue Nov 30 15:58:43 1999 |+++ linux2.2-kdb/kern/mm/vmalloc.c Mon Nov 29 15:29:06 1999 -------------------------- so, what do I do? Why do I not have those paths/files? what goes in them? What is the way to handle this? cu Daniel -- Daniel.Krippner@gmx.net Student of Communication Engineering/Computer Networking Furtwangen University of Applied Sciences From owner-kdb@oss.sgi.com Fri Jul 14 04:50:01 2000 Received: by oss.sgi.com id ; Fri, 14 Jul 2000 04:49:51 -0700 Received: from orzan.fi.udc.es ([193.144.60.19]:17660 "EHLO orzan.fi.udc.es") by oss.sgi.com with ESMTP id ; Fri, 14 Jul 2000 04:49:33 -0700 Received: from serpe.mitica (quintela@vexeta.dc.fi.udc.es [193.144.51.32]) by orzan.fi.udc.es (8.9.3/8.9.1) with SMTP id NAA03296; Fri, 14 Jul 2000 13:49:23 +0200 (MET DST) Received: by serpe.mitica (sSMTP sendmail emulation); Fri, 14 Jul 2000 13:49:23 +0200 To: Daniel Krippner Cc: kdb@oss.sgi.com Subject: Re: kdb-installation References: <396EDDFD.448C5227@gmx.net> X-Url: http://carpanta.dc.fi.udc.es/~quintela From: "Juan J. Quintela" In-Reply-To: Daniel Krippner's message of "Fri, 14 Jul 2000 11:31:41 +0200" Date: 14 Jul 2000 13:49:23 +0200 Message-ID: Lines: 30 User-Agent: Gnus/5.0806 (Gnus v5.8.6) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing >>>>> "daniel" == Daniel Krippner writes: daniel> Hi there. daniel> I have a question concerning the installation of kdb; I use a Mandrake daniel> 2.2.15 kernel and kdb version 0.6_2.2.13 daniel> when i try to patch my source tree, i get a lot of 'can't find file to daniel> patch', daniel> for example daniel> -------------------------- daniel> |diff -Naur linux2.2-pure/kern/mm/vmalloc.c daniel> linux2.2-kdb/kern/mm/vmalloc.c daniel> |--- linux2.2-pure/kern/mm/vmalloc.c Tue Nov 30 15:58:43 1999 daniel> |+++ linux2.2-kdb/kern/mm/vmalloc.c Mon Nov 29 15:29:06 1999 daniel> -------------------------- daniel> so, what do I do? Why do I not have those paths/files? what goes in daniel> them? What is the way to handle this? daniel> cu daniel> Daniel cd /usr/src/linux/ (or the dir where you have your sources) patch -p1 < [name of the patch] Later, Juan. -- In theory, practice and theory are the same, but in practice they are different -- Larry McVoy From owner-kdb@oss.sgi.com Sun Jul 16 20:11:33 2000 Received: by oss.sgi.com id ; Sun, 16 Jul 2000 20:11:13 -0700 Received: from ns1.falconstor.com.tw ([211.75.17.117]:12278 "EHLO ns.falconstor.com.tw") by oss.sgi.com with ESMTP id ; Sun, 16 Jul 2000 20:10:35 -0700 Received: from hclai (h1-81.falconstor.com.tw [172.30.1.81]) by ns.falconstor.com.tw (8.10.1/8.9.3) with SMTP id e6H3FK306310 for ; Mon, 17 Jul 2000 11:15:20 +0800 Message-ID: <00b901bfef9d$1382b3e0$51011eac@falconstor.net.tw> From: "Hung-Chang Lai" To: Subject: help Date: Mon, 17 Jul 2000 11:14:10 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing How can I enter kdb after I recompile kernel and set up serial console? And I want to use kdb to trace some modules. my kdb version is kdb-v0.6-2.2.13 Thanks. From owner-kdb@oss.sgi.com Sun Jul 16 20:53:24 2000 Received: by oss.sgi.com id ; Sun, 16 Jul 2000 20:53:14 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:25158 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Sun, 16 Jul 2000 20:52:54 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via SMTP id UAA07825 for ; Sun, 16 Jul 2000 20:58:04 -0700 (PDT) mail_from (kaos@kao2.melbourne.sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id NAA26901; Mon, 17 Jul 2000 13:51:06 +1000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Hung-Chang Lai" cc: kdb@oss.sgi.com Subject: Re: help In-reply-to: Your message of "Mon, 17 Jul 2000 11:14:10 +0800." <00b901bfef9d$1382b3e0$51011eac@falconstor.net.tw> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 17 Jul 2000 13:51:06 +1000 Message-ID: <2211.963805866@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Mon, 17 Jul 2000 11:14:10 +0800, "Hung-Chang Lai" wrote: >How can I enter kdb after I recompile kernel and set up serial console? Control-A on the serial console. >And I want to use kdb to trace some modules. See the ss (singlestep) command. Note that kdb v0.6 and 2.2 kernels is not being supported at the moment, all our efforts are directed at kdb v1.3 and 2.[34] kernels. From owner-kdb@oss.sgi.com Mon Jul 17 10:14:41 2000 Received: by oss.sgi.com id ; Mon, 17 Jul 2000 10:14:31 -0700 Received: from tourguide.nanobiz.com ([208.176.9.173]:20485 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Mon, 17 Jul 2000 10:14:05 -0700 Received: from pendragon.eng.nanobiz.com (IDENT:root@pendragon [192.168.1.155]) by nanobiz.com (8.9.3/8.9.3) with ESMTP id KAA07765; Mon, 17 Jul 2000 10:13:38 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Mon, 17 Jul 2000 10:09:24 -0700 Message-Id: <200007171709.KAA16977@pendragon.eng.nanobiz.com> Subject: Re: help To: kaos@melbourne.sgi.com (Keith Owens) Date: Mon, 17 Jul 2000 10:09:24 -0700 (PDT) Cc: hclai@falconstor.com.tw (Hung-Chang Lai), kdb@oss.sgi.com In-Reply-To: <2211.963805866@kao2.melbourne.sgi.com> from "Keith Owens" at Jul 17, 2000 01:51:06 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing > > On Mon, 17 Jul 2000 11:14:10 +0800, > "Hung-Chang Lai" wrote: > >How can I enter kdb after I recompile kernel and set up serial console? > > Control-A on the serial console. Note that Control-A will only cause entry to the kernel debugger after the serial port has been opened for the first time (e.g. by getty); prior to that, you must use the 'kdb' flag on the LILO line and set breakpoints at appropriate points in the startup code. > > >And I want to use kdb to trace some modules. > > See the ss (singlestep) command. Note that kdb v0.6 and 2.2 kernels is > not being supported at the moment, all our efforts are directed at kdb > v1.3 and 2.[34] kernels. Note also that many module symbols will not be available to kdb as they aren't exported by the module loader commands. scott > From owner-kdb@oss.sgi.com Tue Jul 18 06:47:36 2000 Received: by oss.sgi.com id ; Tue, 18 Jul 2000 06:47:27 -0700 Received: from magic.adaptec.com ([208.236.45.80]:8695 "EHLO magic.adaptec.com") by oss.sgi.com with ESMTP id ; Tue, 18 Jul 2000 06:46:57 -0700 Received: from kingdom.adaptec.com (kingdom.adaptec.com [162.62.50.10]) by magic.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id GAA14206 for ; Tue, 18 Jul 2000 06:46:20 -0700 (PDT) Received: from aimexc01.corp.adaptec.com ([162.62.62.41]) by kingdom.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id GAA15533 for ; Tue, 18 Jul 2000 06:46:20 -0700 (PDT) Received: by aimexc01.corp.adaptec.com with Internet Mail Service (5.5.2650.21) id <38XC1SGS>; Tue, 18 Jul 2000 06:46:18 -0700 Message-ID: From: "Boerner, Brian" To: "'kdb@oss.sgi.com'" Subject: Debugging Spinlocks on SMP via KDB Date: Tue, 18 Jul 2000 06:41:49 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Howdy folks.. I'm trying to debug a spinlock problem using kdb v0.6-2.2.13. Here is a basic summary of the problem. When my driver is compiled as part of the resident kernel (i.e. not a module) on an SMP box, the same CPU comes along and tries to acquire a lock it already has. I, of course, panic the system. My question is more or less a theory question. Is it possible to use kdb to look at a given thread at the time the system panics? It is my hopes that I can squirrel away the thread of the process that has the lock and the thread of the process trying to acquire the lock and look at them in parallel to determine the conditions under which this is happening. I'm fairly new to kernel level debuggers and any help would be greatly appreciated. Brian M. Boerner System Software Developer Adaptec, Inc. Nashua, NH 03060 (603) 579-4625 From owner-kdb@oss.sgi.com Tue Jul 18 09:37:56 2000 Received: by oss.sgi.com id ; Tue, 18 Jul 2000 09:37:46 -0700 Received: from tourguide.nanobiz.com ([208.176.9.173]:56838 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Tue, 18 Jul 2000 09:37:16 -0700 Received: from pendragon.eng.nanobiz.com (IDENT:root@pendragon [192.168.1.155]) by nanobiz.com (8.9.3/8.9.3) with ESMTP id JAA13338; Tue, 18 Jul 2000 09:36:49 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Tue, 18 Jul 2000 09:32:45 -0700 Message-Id: <200007181632.JAA23405@pendragon.eng.nanobiz.com> Subject: Re: Debugging Spinlocks on SMP via KDB To: Brian_Boerner@ntc.adaptec.com (Boerner, Brian) Date: Tue, 18 Jul 2000 09:32:45 -0700 (PDT) Cc: kdb@oss.sgi.com ('kdb@oss.sgi.com') In-Reply-To: from "Boerner, Brian" at Jul 18, 2000 06:41:49 AM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing > > Howdy folks.. > > I'm trying to debug a spinlock problem using kdb v0.6-2.2.13. Here is a > basic summary of the problem. > > When my driver is compiled as part of the resident kernel (i.e. not a > module) on an SMP box, the same > CPU comes along and tries to acquire a lock it already has. I, of course, > panic the system. My question > is more or less a theory question. If this is a bohr bug (as opposed to a heisenbug), i.e. the bug is reproducible 100% of the time, you can set a breakpoint on the spinlock spin code (i.e. after it has been determined that the caller must spin) and examine the saved state (the thread which owns the lock). You will be able to acquire stack tracebacks for all involved threads, albeit module symbols may be incomplete. You must use the breakpoint if the spin lock disables interrupts because you will otherwise be unable to enter the kernel debugger, unless your hardware exposes an NMI button. scott > > Is it possible to use kdb to look at a given thread at the time the system > panics? > It is my hopes that I can squirrel away the thread of the process that has > the lock > and the thread of the process trying to acquire the lock and look at them in > parallel > to determine the conditions under which this is happening. > > I'm fairly new to kernel level debuggers and any help would be greatly > appreciated. > > Brian M. Boerner > System Software Developer > Adaptec, Inc. > Nashua, NH 03060 > (603) 579-4625 > From owner-kdb@oss.sgi.com Tue Jul 18 09:44:46 2000 Received: by oss.sgi.com id ; Tue, 18 Jul 2000 09:44:37 -0700 Received: from magic.adaptec.com ([208.236.45.80]:5265 "EHLO magic.adaptec.com") by oss.sgi.com with ESMTP id ; Tue, 18 Jul 2000 09:44:18 -0700 Received: from kingdom.adaptec.com (kingdom.adaptec.com [162.62.50.10]) by magic.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id JAA03346; Tue, 18 Jul 2000 09:43:08 -0700 (PDT) Received: from aimexc01.corp.adaptec.com ([162.62.62.41]) by kingdom.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id JAA22087; Tue, 18 Jul 2000 09:43:07 -0700 (PDT) Received: by aimexc01.corp.adaptec.com with Internet Mail Service (5.5.2650.21) id <38XC14RT>; Tue, 18 Jul 2000 09:43:05 -0700 Message-ID: From: "Boerner, Brian" To: "'Scott Lurndal'" Cc: "'kdb@oss.sgi.com'" Subject: RE: Debugging Spinlocks on SMP via KDB Date: Tue, 18 Jul 2000 09:38:36 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Ahh, so, kdb is keyed off of threads not pids or proc entries. That's really helpful, the only problem being, setting a break point every time the spinlock code is called, slows it down so much that we never see the panic. We thought that if the debugger is keyed off of thread ids, then we can grab that somehow and simply add it to the spinlock structure. Saving the state of the thread that has the lock and the thread that wants the lock. -bmb- > -----Original Message----- > From: Scott Lurndal [mailto:slurn@nanobiz.com] > Sent: Tuesday, July 18, 2000 12:33 PM > To: Boerner, Brian > Cc: kdb@oss.sgi.com > Subject: Re: Debugging Spinlocks on SMP via KDB > > > > > > Howdy folks.. > > > > I'm trying to debug a spinlock problem using kdb > v0.6-2.2.13. Here is a > > basic summary of the problem. > > > > When my driver is compiled as part of the resident kernel > (i.e. not a > > module) on an SMP box, the same > > CPU comes along and tries to acquire a lock it already has. > I, of course, > > panic the system. My question > > is more or less a theory question. > > If this is a bohr bug (as opposed to a heisenbug), i.e. the bug is > reproducible 100% of the time, you can set a breakpoint on > the spinlock > spin code (i.e. after it has been determined that the caller > must spin) > and examine the saved state (the thread which owns the lock). > You will > be able to acquire stack tracebacks for all involved threads, albeit > module symbols may be incomplete. > > You must use the breakpoint if the spin lock disables > interrupts because > you will otherwise be unable to enter the kernel debugger, unless your > hardware exposes an NMI button. > > scott > > > > Is it possible to use kdb to look at a given thread at the > time the system > > panics? > > It is my hopes that I can squirrel away the thread of the > process that has > > the lock > > and the thread of the process trying to acquire the lock > and look at them in > > parallel > > to determine the conditions under which this is happening. > > > > I'm fairly new to kernel level debuggers and any help would > be greatly > > appreciated. > > > > Brian M. Boerner > > System Software Developer > > Adaptec, Inc. > > Nashua, NH 03060 > > (603) 579-4625 > > > From owner-kdb@oss.sgi.com Tue Jul 18 12:08:27 2000 Received: by oss.sgi.com id ; Tue, 18 Jul 2000 12:08:17 -0700 Received: from tourguide.nanobiz.com ([208.176.9.173]:21252 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Tue, 18 Jul 2000 12:07:53 -0700 Received: from pendragon.eng.nanobiz.com (IDENT:root@pendragon [192.168.1.155]) by nanobiz.com (8.9.3/8.9.3) with ESMTP id MAA01246; Tue, 18 Jul 2000 12:07:19 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Tue, 18 Jul 2000 10:23:27 -0700 Message-Id: <200007181723.KAA23484@pendragon.eng.nanobiz.com> Subject: Re: Debugging Spinlocks on SMP via KDB To: Brian_Boerner@ntc.adaptec.com (Boerner, Brian) Date: Tue, 18 Jul 2000 10:23:27 -0700 (PDT) Cc: slurn@nanobiz.com ('Scott Lurndal'), kdb@oss.sgi.com ('kdb@oss.sgi.com') In-Reply-To: from "Boerner, Brian" at Jul 18, 2000 09:38:36 AM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing > > Ahh, so, kdb is keyed off of threads not pids or proc entries. linux doesn't have threads. Every schedulable entity has a pid and a proc entry. Note that bottom half processing happens in the context of an arbitrary process, likewise interrupt handling. > > That's really helpful, the only problem being, setting a break > point every time the spinlock code is called, slows it down so > much that we never see the panic. We thought that if the A breakpoint which is never hit will not cause any slowdown. In this case, you must craft the breakpoint such that it only triggers when the condition of interest (i.e. a long-term waiter on a spin-lock) occurs. One could set the breakpoint within the spinlock code rather than at the beginning of the spinlock code. This will require disassembling the spinlock to determine where it is appropriate to set the breakpoint. This way, the breakpoint only triggers if you must actually spin. With a bit of work, you can even modify the spin lock to spin in two places, once for short term and if that length of spin isn't sufficient, it will branch to long-term spin code which you can set a breakpoint on. This way only long-term (infinite?) spins will trigger the breakpoint. You may want to modify the spin lock code anyway to save the value of 'current' for the thread/process which acquires the spinlock, and modify the unlock code to reset the saved value. Note that the value must be protected by the spinlock itself. You could do this without the debugger, assuming your system isn't deadlocking because of the recursive acquisition, by remembering current and _return_address for each call to spin_lock and spin_unlock. In fact, if it is simply a recursive spinlock acquisition, you can simply enter the debugger when the 'current' value of the process which is acquiring the lock is the same as the current value of the process which owns the lock. see 'KDB_ENTER()' macro in kdb.h. This would require some trivial modifications to the spin_lock and spin_unlock code, which may perturb the timing enough to mask the problem :-(. Note that in v0.6 KDB_ENTER() will be a no-op if interrupts are disabled. scott > debugger is keyed off of thread ids, then we can grab that somehow > and simply add it to the spinlock structure. Saving the state of > the thread that has the lock and the thread that wants the lock. > > -bmb- > > > > -----Original Message----- > > From: Scott Lurndal [mailto:slurn@nanobiz.com] > > Sent: Tuesday, July 18, 2000 12:33 PM > > To: Boerner, Brian > > Cc: kdb@oss.sgi.com > > Subject: Re: Debugging Spinlocks on SMP via KDB > > > > > > > > > > Howdy folks.. > > > > > > I'm trying to debug a spinlock problem using kdb > > v0.6-2.2.13. Here is a > > > basic summary of the problem. > > > > > > When my driver is compiled as part of the resident kernel > > (i.e. not a > > > module) on an SMP box, the same > > > CPU comes along and tries to acquire a lock it already has. > > I, of course, > > > panic the system. My question > > > is more or less a theory question. > > > > If this is a bohr bug (as opposed to a heisenbug), i.e. the bug is > > reproducible 100% of the time, you can set a breakpoint on > > the spinlock > > spin code (i.e. after it has been determined that the caller > > must spin) > > and examine the saved state (the thread which owns the lock). > > You will > > be able to acquire stack tracebacks for all involved threads, albeit > > module symbols may be incomplete. > > > > You must use the breakpoint if the spin lock disables > > interrupts because > > you will otherwise be unable to enter the kernel debugger, unless your > > hardware exposes an NMI button. > > > > scott > > > > > > Is it possible to use kdb to look at a given thread at the > > time the system > > > panics? > > > It is my hopes that I can squirrel away the thread of the > > process that has > > > the lock > > > and the thread of the process trying to acquire the lock > > and look at them in > > > parallel > > > to determine the conditions under which this is happening. > > > > > > I'm fairly new to kernel level debuggers and any help would > > be greatly > > > appreciated. > > > > > > Brian M. Boerner > > > System Software Developer > > > Adaptec, Inc. > > > Nashua, NH 03060 > > > (603) 579-4625 > > > > > > From owner-kdb@oss.sgi.com Sun Jul 23 20:19:06 2000 Received: by oss.sgi.com id ; Sun, 23 Jul 2000 20:18:56 -0700 Received: from orzan.fi.udc.es ([193.144.60.19]:43770 "EHLO orzan.fi.udc.es") by oss.sgi.com with ESMTP id ; Sun, 23 Jul 2000 20:18:32 -0700 Received: from serpe.mitica (quintela@vexeta.dc.fi.udc.es [193.144.51.32]) by orzan.fi.udc.es (8.9.3/8.9.1) with SMTP id FAA02243; Mon, 24 Jul 2000 05:18:05 +0200 (MET DST) Received: by serpe.mitica (sSMTP sendmail emulation); Mon, 24 Jul 2000 05:18:05 +0200 To: kdb@oss.sgi.com Subject: PATCH: KDB support without CONFIG_VT X-Url: http://carpanta.dc.fi.udc.es/~quintela From: "Juan J. Quintela" Date: 24 Jul 2000 05:18:05 +0200 Message-ID: Lines: 56 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Hi This patch makes KDB compile indeed if CONFIG_VT is not defined in .config. That is quite useful for people that have headless machines and only compile the console driver to be able to use kdb. Later, Juan. diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude base/arch/i386/kdb/kdba_io.c working/arch/i386/kdb/kdba_io.c --- base/arch/i386/kdb/kdba_io.c Sun Jul 23 22:07:05 2000 +++ working/arch/i386/kdb/kdba_io.c Mon Jul 24 05:06:07 2000 @@ -90,6 +90,7 @@ #endif } +#if defined(CONFIG_SERIAL_CONSOLE) /* Check if there is a byte ready at the serial port */ static int get_serial_char(void) { @@ -118,7 +119,9 @@ } return -1; } +#endif +#if defined(CONFIG_VT) /* * Check if the keyboard controller has a keypress for us. * Some parts (Enter Release, LED change) are still blocking polled here, @@ -268,6 +271,7 @@ return keychar & 0xff; } +#endif #ifdef KDB_BLINK_LED @@ -291,8 +295,12 @@ typedef int (*get_char_func)(void); static get_char_func poll_funcs[] = { +#if defined(CONFIG_VT) get_kbd_char, +#endif +#if defined(CONFIG_SERIAL_CONSOLE) get_serial_char, +#endif #ifdef KDB_BLINK_LED blink_led, #endif -- In theory, practice and theory are the same, but in practice they are different -- Larry McVoy From owner-kdb@oss.sgi.com Mon Jul 24 15:11:42 2000 Received: by oss.sgi.com id ; Mon, 24 Jul 2000 15:11:32 -0700 Received: from msg.ucsf.edu ([128.218.69.41]:39193 "EHLO msg.ucsf.edu") by oss.sgi.com with ESMTP id ; Mon, 24 Jul 2000 15:11:07 -0700 Received: from msg.ucsf.edu (IDENT:mello@grumpy.ucsf.edu [128.218.69.105]) by msg.ucsf.edu (8.9.3/8.9.3) with ESMTP id PAA1295122 for ; Mon, 24 Jul 2000 15:10:44 -0700 (PDT) Message-ID: <397CB193.D8016B6F@msg.ucsf.edu> Date: Mon, 24 Jul 2000 14:13:55 -0700 From: Mel Jones X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.2.13 i686) X-Accept-Language: en MIME-Version: 1.0 To: kdb@oss.sgi.com Subject: patch failure installing kdb Content-Type: multipart/mixed; boundary="------------F9F4ECD47CF3933EFBFB135D" Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing This is a multi-part message in MIME format. --------------F9F4ECD47CF3933EFBFB135D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi: I'm probably doing something very stupid but I can't get the patch to run on my system. I have attached the output that I get. I am running RH6.2 (2.2.13) on a clone. I download the patch, gunzip it change to /usr/src/linux and run patch as described on KDB v1.2 project page. What am I doing wrong... thanks mel jones, UCSF --------------F9F4ECD47CF3933EFBFB135D Content-Type: text/plain; charset=us-ascii; name="errmsg" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="errmsg" [mello@grumpy linux]# patch -p1; Mon, 24 Jul 2000 15:19:22 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:42252 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Mon, 24 Jul 2000 15:19:00 -0700 Received: (qmail 12275 invoked by uid 502); 24 Jul 2000 22:18:32 -0000 Received: (qmail 12263 invoked from network); 24 Jul 2000 22:18:30 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 24 Jul 2000 22:18:29 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: Mel Jones cc: kdb@oss.sgi.com Subject: Re: patch failure installing kdb In-reply-to: Your message of "Mon, 24 Jul 2000 14:13:55 MST." <397CB193.D8016B6F@msg.ucsf.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 25 Jul 2000 08:18:28 +1000 Message-ID: <13494.964477108@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Mon, 24 Jul 2000 14:13:55 -0700, Mel Jones wrote: >I'm probably doing something very stupid but I can't get the patch to >run on my system. I have attached the output that I get. I am running >RH6.2 (2.2.13) on a clone. I download the patch, gunzip it change to >/usr/src/linux and run patch as described on KDB v1.2 project page. > >What am I doing wrong... Nothing, the project page says use "patch -p1" but for some reason the patch you are using needs "patch -p2". I will edit the patch to make it -p1 compliant, in the meantime use -p2. From owner-kdb@oss.sgi.com Tue Jul 25 06:24:47 2000 Received: by oss.sgi.com id ; Tue, 25 Jul 2000 06:24:28 -0700 Received: from [159.226.38.2] ([159.226.38.2]:24844 "EHLO mail.cti.com.cn") by oss.sgi.com with ESMTP id ; Tue, 25 Jul 2000 06:23:57 -0700 Received: from pc51 ([200.121.2.51]) by mail.cti.com.cn (8.7.5/8.7.3) with SMTP id VAA00940 for ; Tue, 25 Jul 2000 21:20:50 +0800 Message-ID: <002701bff63b$223a1b40$330279c8@pc51> From: "lhyang" To: Subject: about how to debug module? Date: Tue, 25 Jul 2000 21:20:41 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0024_01BFF67E.2FBD23A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing This is a multi-part message in MIME format. ------=_NextPart_000_0024_01BFF67E.2FBD23A0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: base64 SGkgYWxsLA0KICAgIEkgaGF2ZSBzdWNjZWVkZWQgaW4gaW5zdGFsbGluZyBrZGIsdGhlbiBJIHdh bnQgdG8gZGVidWcgYSBtb2R1bGUsDQpidXQgSSBjYW4ndCBzZXQgYnJlYWtwb2ludCBpbiBtb2R1 bGUncyBzb3VyY2UgY29kZSxpLmUuIHdoZW4gSSBwcmVzcyBQYXVzZSBrZXksIHJ1biBpbiANCmtk Yj4NCg0KSSBjYW4ndCBsb2FkIG15IG1vZHVsZSB0byBzZXQgYnJlYWtwb2ludCwgYW5kICBJIGNh bid0IHJ1biBpbnNtb2QgeHh4Lm8gdG9vLA0Kd2hvIGNhbiBoZWxwIG1lIHRvIHNvbHZlIHRoZSBw cm9ibGVtLg0KDQp0aGFua3MgaW4gYWR2YW5jZS4NCg0KQlJzLA0KICAgICAgICAgICAgLUppbQ0K ICAgIA0KICAgICAgICANCg0K ------=_NextPart_000_0024_01BFF67E.2FBD23A0 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PXdp bmRvd3MtMTI1MiIgaHR0cC1lcXVpdj1Db250ZW50LVR5cGU+DQo8TUVUQSBjb250ZW50PSJNU0hU TUwgNS4wMC4yMDE0LjIxMCIgbmFtZT1HRU5FUkFUT1I+DQo8U1RZTEU+PC9TVFlMRT4NCjwvSEVB RD4NCjxCT0RZIGJnQ29sb3I9I2ZmZmZmZj4NCjxESVY+SGkgYWxsLDwvRElWPg0KPERJVj4mbmJz cDsmbmJzcDsmbmJzcDsgSSBoYXZlIHN1Y2NlZWRlZCBpbiBpbnN0YWxsaW5nIGtkYix0aGVuIEkg d2FudCB0byBkZWJ1ZyANCmEgbW9kdWxlLDwvRElWPg0KPERJVj5idXQgSSBjYW4ndCBzZXQgYnJl YWtwb2ludCBpbiBtb2R1bGUncyBzb3VyY2UgY29kZSxpLmUuIHdoZW4gSSBwcmVzcyBQYXVzZSAN CmtleSwgcnVuIGluIDwvRElWPg0KPERJVj5rZGImZ3Q7PC9ESVY+DQo8RElWPiZuYnNwOzwvRElW Pg0KPERJVj5JIGNhbid0IGxvYWQgbXkgbW9kdWxlIHRvIHNldCBicmVha3BvaW50LCBhbmQmbmJz cDsgSSBjYW4ndCBydW4gaW5zbW9kIA0KeHh4Lm8gdG9vLDwvRElWPg0KPERJVj53aG8gY2FuIGhl bHAgbWUgdG8gc29sdmUgdGhlIHByb2JsZW0uPC9ESVY+DQo8RElWPiZuYnNwOzwvRElWPg0KPERJ Vj50aGFua3MgaW4gYWR2YW5jZS48L0RJVj4NCjxESVY+Jm5ic3A7PC9ESVY+DQo8RElWPkJScyw8 L0RJVj4NCjxESVY+Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5i c3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7IA0KLUppbTwvRElWPg0KPERJVj48Rk9OVCBzaXplPTQ+Jm5i c3A7Jm5ic3A7Jm5ic3A7IDwvRk9OVD48L0RJVj4NCjxESVY+Jm5ic3A7Jm5ic3A7Jm5ic3A7ICZu YnNwOyZuYnNwOyZuYnNwOyA8L0RJVj4NCjxESVY+Jm5ic3A7PC9ESVY+PC9CT0RZPjwvSFRNTD4N Cg== ------=_NextPart_000_0024_01BFF67E.2FBD23A0-- From owner-kdb@oss.sgi.com Tue Jul 25 15:00:30 2000 Received: by oss.sgi.com id ; Tue, 25 Jul 2000 15:00:20 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:1285 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Tue, 25 Jul 2000 15:00:07 -0700 Received: (qmail 22040 invoked by uid 502); 25 Jul 2000 21:59:38 -0000 Received: (qmail 22028 invoked from network); 25 Jul 2000 21:59:36 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 25 Jul 2000 21:59:36 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "lhyang" cc: kdb@oss.sgi.com Subject: Re: about how to debug module? In-reply-to: Your message of "Tue, 25 Jul 2000 21:20:41 +0800." <002701bff63b$223a1b40$330279c8@pc51> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 Jul 2000 07:59:35 +1000 Message-ID: <6132.964562375@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Tue, 25 Jul 2000 21:20:41 +0800, "lhyang" wrote: > I have succeeded in installing kdb,then I want to debug a module, >but I can't set breakpoint in module's source code,i.e. when I press Pause key, run in >kdb> > >I can't load my module to set breakpoint, and I can't run insmod xxx.o too, >who can help me to solve the problem. Please do *not* send messages to mailing lists in base64 encoding or HTML, it makes it difficult to reply. You might find the option you need under Tools Options Send set Mail send for Plain text Which version of kdb have you installed and on which kernel? kdb v0.x for 2.2 kernels has limited support for symbols in modules, kdb v1.3 for 2.[34] kernels is much better. There are no plans to upgrade kdb v0.x for 2.2 kernels, all our work is on 2.[34] kernels. In either case you have to load the module before entering kdb. The kernel is stopped when kdb is in control. You cannot do any disk I/O while kdb is running so you cannot load any modules. From owner-kdb@oss.sgi.com Tue Jul 25 20:05:00 2000 Received: by oss.sgi.com id ; Tue, 25 Jul 2000 20:04:50 -0700 Received: from [159.226.38.2] ([159.226.38.2]:20028 "EHLO mail.cti.com.cn") convert rfc822-to-8bit by oss.sgi.com with ESMTP id ; Tue, 25 Jul 2000 20:04:10 -0700 Received: from pc51 ([200.121.2.51]) by mail.cti.com.cn (8.7.5/8.7.3) with SMTP id LAA05251; Wed, 26 Jul 2000 11:00:57 +0800 Message-ID: <001a01bff6ad$acde7b20$330279c8@pc51> From: "lhyang" To: "Keith Owens" Cc: References: <6132.964562375@ocs3.ocs-net> Subject: how to debug a module when kernel-2.2.12 running? Date: Wed, 26 Jul 2000 11:00:24 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Hi Keith, At present, I am programming a module about device driver, and I want to debug the module, after using two famous debugger tools, I find that they all can debug kernel code, but no method to debug a module, or maybe what I said makes a mistake, in a word, I expect some help. below is the two tools 1.kdb-v0.6 from oss.sgi.com no method to set breakpoint to a module, though press Pause key to run kdb, so when running insmod xxx.o, I can't use it. 2. IKD(Intergrated Kernel Debugger), 2.2.12-ikd from e-mind.com by running xkgdb in linux/scripts directory, create xkdebug devive file and module and kgdb process, but it can't load kernel symbols and module symbols simultaneously, though can set breakpoint to module, but can't debug the module at load module by insmod xxx.o. maybe what I have done exists error, any opinion is appreciated. thanks in advance. BRs, -Jim From owner-kdb@oss.sgi.com Tue Jul 25 20:46:01 2000 Received: by oss.sgi.com id ; Tue, 25 Jul 2000 20:45:51 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:59471 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 25 Jul 2000 20:45:12 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via SMTP id UAA12061 for ; Tue, 25 Jul 2000 20:37:13 -0700 (PDT) mail_from (kaos@kao2.melbourne.sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id NAA28356; Wed, 26 Jul 2000 13:43:23 +1000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "lhyang" cc: kdb@oss.sgi.com Subject: Re: how to debug a module when kernel-2.2.12 running? In-reply-to: Your message of "Wed, 26 Jul 2000 11:00:24 +0800." <001a01bff6ad$acde7b20$330279c8@pc51> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 Jul 2000 13:43:23 +1000 Message-ID: <3127.964583003@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Wed, 26 Jul 2000 11:00:24 +0800, "lhyang" wrote: > At present, I am programming a module about device driver, and I want to debug the module, >after using two famous debugger tools, I find that they all can debug kernel code, but no method to debug a module, >or maybe what I said makes a mistake, in a word, I expect some help. > >below is the two tools >1.kdb-v0.6 from oss.sgi.com >no method to set breakpoint to a module, though press Pause key to run kdb, so when running insmod xxx.o, I can't use it. If you want to debug the loading process for a module, the easiest way is to put the breakpoint in sys_init_module(). Towards the end of that function there is this chunk of code /* Initialize the module. */ mod->flags |= MOD_INITIALIZING; atomic_set(&mod->uc.usecount,1); if (mod->init && mod->init() != 0) { atomic_set(&mod->uc.usecount,0); mod->flags &= ~MOD_INITIALIZING; error = -EBUSY; goto err0; } You need to set the breakpoint on the call to mod->init(). It is easy enough to find, objdump -S kernel/module.o and look for "call *%edx" in sys_init_module(), there should only be one. When your breakpoint triggers at that call instruction, your module has been loaded but not yet executed. You should be then able to set breakpoints in your module. Or you can #include in your module and stick KDB_ENTER(); statements where you want to get control. >2. IKD(Intergrated Kernel Debugger), 2.2.12-ikd from e-mind.com >by running xkgdb in linux/scripts directory, create xkdebug devive file and module and kgdb process, >but it can't load kernel symbols and module symbols simultaneously, though can set breakpoint to module, >but can't debug the module at load module by insmod xxx.o. The problem is in gdb, older versions of gdb stuffed up symbol handling in modules. This should have been fixed in current versions of gdb and recent versions of IKD should support module debugging. The main problem with xkgdb is that you have to have a working kernel to use it, if you lockup with interrupts disabled then xkdb is not much help. BTW, the latest IKD is not on e-mind, Andrea now ships it in ftp://ftp.**.kernel.org/pub/linux/kernel/people/andrea/ikd ^^ replace '**' with nearest country code.