From owner-kdb@oss.sgi.com Mon Sep 4 12:27:18 2000 Received: by oss.sgi.com id ; Mon, 4 Sep 2000 12:27:09 -0700 Received: from csa.iisc.ernet.in ([144.16.67.8]:9736 "EHLO csa.iisc.ernet.in") by oss.sgi.com with ESMTP id ; Mon, 4 Sep 2000 12:26:39 -0700 Received: from osiris.csa.iisc.ernet.in (osiris.csa.iisc.ernet.in [144.16.67.12]) by csa.iisc.ernet.in (8.9.3/8.9.3) with ESMTP id AAA22958 for ; Tue, 5 Sep 2000 00:55:15 +0530 Received: from localhost by osiris.csa.iisc.ernet.in (8.9.3/8.9.3) with SMTP id AAA27528 for ; Tue, 5 Sep 2000 00:55:50 +0530 (IST) X-Authentication-Warning: osiris.csa.iisc.ernet.in: venkip owned process doing -bs Date: Tue, 5 Sep 2000 00:55:48 +0530 (IST) From: Venkatesh Pallipadi To: kdb@oss.sgi.com Subject: debugging a module Message-ID: 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 all, I have some problems with a module I am developing on linux 2.2.12 . Now I want to set some breakpoints and debug the program. I have used kdb on the kernel. But I don't know how can I use kdb to debug a module added using insmod. Can anyone help me on this... Thanks in advance, -Venkatesh From owner-kdb@oss.sgi.com Mon Sep 4 12:56:39 2000 Received: by oss.sgi.com id ; Mon, 4 Sep 2000 12:56:28 -0700 Received: from [212.150.53.130] ([212.150.53.130]:43530 "EHLO marcellos.corky.net") by oss.sgi.com with ESMTP id ; Mon, 4 Sep 2000 12:56:00 -0700 Received: (from marc@localhost) by marcellos.corky.net (8.9.3/8.8.7) id WAA10172 for kdb@oss.sgi.com; Mon, 4 Sep 2000 22:55:16 +0300 Date: Mon, 4 Sep 2000 22:55:16 +0300 From: Marc Esipovich To: kdb@oss.sgi.com Subject: Re: debugging a module Message-ID: <20000904225516.A10134@marcellos.corky.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Hi, > I have some problems with a module I am developing on linux 2.2.12 . > Now I want to set some breakpoints and debug the program. I have used kdb > on the kernel. But I don't know how can I use kdb to debug a module added > using insmod. You use kdb on a kernel module exactly the same way you would use it on the live kernel, when the module is loaded, you can use kdb to break on any function in your module which has its symbol exported. You can also put an 'int 3' instruction exactly where you need to break, use something like the following macro: #define DEBUGBREAK __asm__ __volatile__ ("int3"); bye, Marc. -- marc @ corky.net fingerprint = D1F0 5689 967F B87A 98EB C64D 256A D6BF 80DE 6D3C /"\ \ / ASCII Ribbon Campaign X Against HTML Mail / \ From owner-kdb@oss.sgi.com Mon Sep 4 16:23:10 2000 Received: by oss.sgi.com id ; Mon, 4 Sep 2000 16:23:00 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:29499 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Mon, 4 Sep 2000 16:22:30 -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 QAA15427 for ; Mon, 4 Sep 2000 16:14:10 -0700 (PDT) mail_from (kaos@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 KAA28544; Tue, 5 Sep 2000 10:20:28 +1100 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: Venkatesh Pallipadi cc: kdb@oss.sgi.com Subject: Re: debugging a module In-reply-to: Your message of "Tue, 05 Sep 2000 00:55:48 +0530." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 05 Sep 2000 10:20:28 +1100 Message-ID: <3522.968109628@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Tue, 5 Sep 2000 00:55:48 +0530 (IST), Venkatesh Pallipadi wrote: > I have some problems with a module I am developing on linux 2.2.12 . >Now I want to set some breakpoints and debug the program. I have used kdb >on the kernel. But I don't know how can I use kdb to debug a module added >using insmod. kdb v0.6 (the only one available for 2.2 kernels) has limited support for module debugging, in particular it has a very restricted symbol table. kdb v1.3 (for 2.4 kernels) has much better support for modules. SGI has no plans to back port the kdb v1.3 code to 2.2 kernels due to our resource constraints. Of course if somebody wants to backport kdb v1.3 to 2.2 kernels we would be glad to help. From owner-kdb@oss.sgi.com Wed Sep 6 10:56:08 2000 Received: by oss.sgi.com id ; Wed, 6 Sep 2000 10:55:48 -0700 Received: from mail2.megatrends.com ([155.229.80.11]:61194 "EHLO mail2.megatrends.com") by oss.sgi.com with ESMTP id ; Wed, 6 Sep 2000 10:55:35 -0700 Received: by ATL_MS1 with Internet Mail Service (5.5.2448.0) id ; Wed, 6 Sep 2000 13:51:43 -0400 Message-ID: <1355693A51C0D211B55A00105ACCFE6401579223@ATL_MS1> From: Eric Moore To: kdb@oss.sgi.com Subject: BP Question Date: Wed, 6 Sep 2000 13:51:37 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Hi I'm using kdb with the 2.2.16 kernel. I applied the kdb-v0.6-2.2.13.gz patch. Currently this supports only 4 breakpoints. Is there a way to increase this? Regards, Eric Moore Senior Software Engineer IDE Raid American Megatrends, Inc. 770-246-8600 Extension(7218) From owner-kdb@oss.sgi.com Wed Sep 6 12:29:28 2000 Received: by oss.sgi.com id ; Wed, 6 Sep 2000 12:29:19 -0700 Received: from farmer8.nanobiz.com ([208.176.9.172]:15370 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Wed, 6 Sep 2000 12:29:01 -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 MAA29044; Wed, 6 Sep 2000 12:27:38 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Wed, 6 Sep 2000 12:24:43 -0700 Message-Id: <200009061924.MAA21913@pendragon.eng.nanobiz.com> Subject: Re: BP Question To: Ericmoore@ami.com (Eric Moore) Date: Wed, 6 Sep 2000 12:24:43 -0700 (PDT) Cc: kdb@oss.sgi.com In-Reply-To: <1355693A51C0D211B55A00105ACCFE6401579223@ATL_MS1> from "Eric Moore" at Sep 06, 2000 01:51:37 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 > > Hi > > I'm using kdb with the 2.2.16 kernel. I applied the kdb-v0.6-2.2.13.gz > patch. > > Currently this supports only 4 breakpoints. Is there a way to increase this? You can have (if I recall correctly) up to 32 breakpoints - only 4 of which may be enabled at any one time. You can use 'be' and 'bd' commands to enable and disable breakpoints as needed. 2.4 kernel KDB allows more by using the 'int 03' instruction for breakpoints. scott > > Regards, > > Eric Moore > Senior Software Engineer > IDE Raid > American Megatrends, Inc. > 770-246-8600 Extension(7218) > From owner-kdb@oss.sgi.com Thu Sep 7 06:41:56 2000 Received: by oss.sgi.com id ; Thu, 7 Sep 2000 06:41:37 -0700 Received: from thalia.fm.intel.com ([132.233.247.11]:13584 "EHLO thalia.fm.intel.com") by oss.sgi.com with ESMTP id ; Thu, 7 Sep 2000 06:41:29 -0700 Received: from SMTP (fmsmsxvs04-1.fm.intel.com [132.233.42.204]) by thalia.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.31 2000/08/22 00:15:13 dmccart Exp $) with SMTP id NAA11625 for ; Thu, 7 Sep 2000 13:42:19 GMT Received: from fmsmsx26.fm.intel.com ([132.233.48.26]) by 132.233.48.204 (Norton AntiVirus for Internet Email Gateways 1.0) ; Thu, 07 Sep 2000 13:41:18 0000 (GMT) Received: by fmsmsx26.fm.intel.com with Internet Mail Service (5.5.2650.21) id ; Thu, 7 Sep 2000 06:40:28 -0700 Message-ID: <10C8636AE359D4119118009027AE9987FECF27@FMSMSX34> From: "Howell, David P" To: "'kdb@oss.sgi.com'" Cc: "Smith, Stanley W" Subject: Planned availability of SGI kdb and lkcd in future 2.4 vendor dis tributions Date: Thu, 7 Sep 2000 06:40:26 -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 Is there any plans for a vendor, like Red Hat, to pick up the kdb and lkcd work for inclusion in a 2.4 (or 2.2, although I doubt there will be since the focus appears to be on 2.4 kernels)? Seems like they would fit nicely into a vendor's serviceability/support story, to supplement functionality that is now missing. From owner-kdb@oss.sgi.com Thu Sep 7 14:24:31 2000 Received: by oss.sgi.com id ; Thu, 7 Sep 2000 14:24:21 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:28435 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Thu, 7 Sep 2000 14:24:08 -0700 Received: (qmail 23626 invoked from network); 7 Sep 2000 21:24:01 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 7 Sep 2000 21:24:01 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Howell, David P" cc: "'kdb@oss.sgi.com'" , "Smith, Stanley W" Subject: Re: Planned availability of SGI kdb and lkcd in future 2.4 vendor dis tributions In-reply-to: Your message of "Thu, 07 Sep 2000 06:40:26 PDT." <10C8636AE359D4119118009027AE9987FECF27@FMSMSX34> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 08 Sep 2000 08:24:00 +1100 Message-ID: <13977.968361840@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, 7 Sep 2000 06:40:26 -0700 , "Howell, David P" wrote: >Is there any plans for a vendor, like Red Hat, to pick up the kdb and lkcd >work for inclusion in a >2.4 (or 2.2, although I doubt there will be since the focus appears to be on >2.4 kernels)? Seems >like they would fit nicely into a vendor's serviceability/support story, to >supplement functionality >that is now missing. lkcd is now maintained outside SGI, on sourceforge, I cannot speak for them. I am going to make one more try at persuading Linus to include kdb in the base kernel (2.4 only) but I don't expect to succeed. Then I plan to contact the distributors. From owner-kdb@oss.sgi.com Thu Sep 7 14:49:21 2000 Received: by oss.sgi.com id ; Thu, 7 Sep 2000 14:49:11 -0700 Received: from ns2-gw.divi.com ([199.97.190.20]:21962 "EHLO divi.com") by oss.sgi.com with ESMTP id ; Thu, 7 Sep 2000 14:48:46 -0700 Received: from pcamit ([150.100.167.213]) by divi.com (8.9.3/8.9.3) with SMTP id OAA03749; Thu, 7 Sep 2000 14:48:16 -0700 (PDT) Message-ID: <000901c01915$e3238f60$d5a76496@divi.com> From: "Amit D Chaudhary" To: "Keith Owens" Cc: References: <13977.968361840@ocs3.ocs-net> Subject: Re: Planned availability of SGI kdb and lkcd in future 2.4 vendor dis tributions Date: Thu, 7 Sep 2000 14:52:15 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" 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 >I am going to make one more try at persuading Linus to include > kdb in the base kernel (2.4 only) but I don't expect to succeed. Then > I plan to contact the distributors. My own thinking is kdb is more of a development tool than part of the actual kernel, but to ensure that all kernel developers know and can use kdb, it should be part of GNU or all the major distributions. Amit From owner-kdb@oss.sgi.com Thu Sep 7 15:37:51 2000 Received: by oss.sgi.com id ; Thu, 7 Sep 2000 15:37:41 -0700 Received: from farmer8.nanobiz.com ([208.176.9.172]:40717 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Thu, 7 Sep 2000 15:37:26 -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 PAA14675; Thu, 7 Sep 2000 15:35:54 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Thu, 7 Sep 2000 15:33:20 -0700 Message-Id: <200009072233.PAA27246@pendragon.eng.nanobiz.com> Subject: Re: Planned availability of SGI kdb and lkcd in future 2.4 vendor dis tributions To: amit@muppetlabs.com (Amit D Chaudhary) Date: Thu, 7 Sep 2000 15:33:20 -0700 (PDT) Cc: kaos@melbourne.sgi.com (Keith Owens), kdb@oss.sgi.com In-Reply-To: <000901c01915$e3238f60$d5a76496@divi.com> from "Amit D Chaudhary" at Sep 07, 2000 02:52:15 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 > > >I am going to make one more try at persuading Linus to include > > kdb in the base kernel (2.4 only) but I don't expect to succeed. Then > > I plan to contact the distributors. > My own thinking is kdb is more of a development tool than part of the actual kernel, but to ensure that all kernel developers know > and can use kdb, it should be part of GNU or all the major distributions. > > Amit > Being that there is no additional overhead (aside from some small number of kb of code) when KDB is included in a production kernel, it is nice to have on all the time - just in case the system does panic or hang due to a heisenbug. scott From owner-kdb@oss.sgi.com Thu Sep 7 15:50:21 2000 Received: by oss.sgi.com id ; Thu, 7 Sep 2000 15:50:12 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:29700 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Thu, 7 Sep 2000 15:49:57 -0700 Received: (qmail 24590 invoked from network); 7 Sep 2000 22:49:52 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 7 Sep 2000 22:49:52 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: Scott Lurndal cc: kdb@oss.sgi.com Subject: Re: Planned availability of SGI kdb and lkcd in future 2.4 vendor dis tributions In-reply-to: Your message of "Thu, 07 Sep 2000 15:33:20 PDT." <200009072233.PAA27246@pendragon.eng.nanobiz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 08 Sep 2000 09:49:52 +1100 Message-ID: <15416.968366992@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, 7 Sep 2000 15:33:20 -0700 (PDT), Scott Lurndal wrote: >Being that there is no additional overhead (aside from some small number >of kb of code) when KDB is included in a production kernel, it is nice >to have on all the time - just in case the system does panic or hang >due to a heisenbug. It does introduce overhead on some common paths. * NMI handling checks for a kdb vector, NMI code is driven once per timer tick on each cpu if the NMI oopser is active (which it should be). * The serial code has to check for kdb interrupt keys. * The frame pointer option adds extra code to some assembler code like semaphore and spin lock out of line code. * The register spill affect of maintaining frame pointers on ix86 is noticable, fortunately kdb v1.3 works without frame pointers so I normally run without CONFIG_FRAME_POINTER. * kdb has a longer section of code for the page fault handler, we have to handle last branch recording around the page fault code. This is the one that worries me the most as far as performance goes. * kdb needs kallsyms to get kernel and module symbols. kallsyms adds 20-30% to the size of the loaded kernel. * The main kdb code itself increases the size of the kernel, although this is swamped by the size of kallsyms. From owner-kdb@oss.sgi.com Thu Sep 7 15:55:11 2000 Received: by oss.sgi.com id ; Thu, 7 Sep 2000 15:55:02 -0700 Received: from Cantor.suse.de ([194.112.123.193]:33298 "HELO Cantor.suse.de") by oss.sgi.com with SMTP id ; Thu, 7 Sep 2000 15:54:57 -0700 Received: from Hermes.suse.de (Hermes.suse.de [194.112.123.136]) by Cantor.suse.de (Postfix) with ESMTP id 981D81E539; Fri, 8 Sep 2000 00:54:55 +0200 (MEST) Received: from gruyere.muc.suse.de (unknown [10.23.1.2]) by Hermes.suse.de (Postfix) with ESMTP id 671BA10A029; Fri, 8 Sep 2000 00:54:55 +0200 (MEST) Received: by gruyere.muc.suse.de (Postfix, from userid 14446) id 4F2EB2F300; Fri, 8 Sep 2000 00:54:54 +0200 (MEST) Date: Fri, 8 Sep 2000 00:54:54 +0200 From: "Andi Kleen" To: Keith Owens Cc: Scott Lurndal , kdb@oss.sgi.com Subject: Re: Planned availability of SGI kdb and lkcd in future 2.4 vendor dis tributions Message-ID: <20000908005454.A24402@gruyere.muc.suse.de> References: <200009072233.PAA27246@pendragon.eng.nanobiz.com> <15416.968366992@ocs3.ocs-net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <15416.968366992@ocs3.ocs-net>; from kaos@melbourne.sgi.com on Fri, Sep 08, 2000 at 09:49:52AM +1100 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Fri, Sep 08, 2000 at 09:49:52AM +1100, Keith Owens wrote: [...] > * The main kdb code itself increases the size of the kernel, although > this is swamped by the size of kallsyms. * kdb increases the path lengths for hardware breakpoint debugging (used heavily by things like ltrace) -Andi > From owner-kdb@oss.sgi.com Thu Sep 7 19:27:04 2000 Received: by oss.sgi.com id ; Thu, 7 Sep 2000 19:26:54 -0700 Received: from [212.150.53.130] ([212.150.53.130]:28935 "EHLO marcellos.corky.net") by oss.sgi.com with ESMTP id ; Thu, 7 Sep 2000 19:26:44 -0700 Received: (from marc@localhost) by marcellos.corky.net (8.9.3/8.8.7) id FAA26032; Fri, 8 Sep 2000 05:26:23 +0300 Date: Fri, 8 Sep 2000 05:26:23 +0300 From: Marc Esipovich To: Keith Owens Cc: kdb@oss.sgi.com Subject: Re: Planned availability of SGI kdb and lkcd in future 2.4 vendor dis tributions Message-ID: <20000908052623.B25895@marcellos.corky.net> References: <200009072233.PAA27246@pendragon.eng.nanobiz.com> <15416.968366992@ocs3.ocs-net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15416.968366992@ocs3.ocs-net>; from kaos@melbourne.sgi.com on Fri, Sep 08, 2000 at 09:49:52AM +1100 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Fri, Sep 08, 2000 at 09:49:52AM +1100, Keith Owens wrote: > On Thu, 7 Sep 2000 15:33:20 -0700 (PDT), > Scott Lurndal wrote: > >Being that there is no additional overhead (aside from some small number > >of kb of code) when KDB is included in a production kernel, it is nice > >to have on all the time - just in case the system does panic or hang > >due to a heisenbug. > > It does introduce overhead on some common paths. > > * NMI handling checks for a kdb vector, NMI code is driven once per > timer tick on each cpu if the NMI oopser is active (which it should > be). > > * The serial code has to check for kdb interrupt keys. > > * The frame pointer option adds extra code to some assembler code like > semaphore and spin lock out of line code. > > * The register spill affect of maintaining frame pointers on ix86 is > noticable, fortunately kdb v1.3 works without frame pointers so I > normally run without CONFIG_FRAME_POINTER. > > * kdb has a longer section of code for the page fault handler, we have > to handle last branch recording around the page fault code. This is > the one that worries me the most as far as performance goes. > > * kdb needs kallsyms to get kernel and module symbols. kallsyms adds > 20-30% to the size of the loaded kernel. > > * The main kdb code itself increases the size of the kernel, although > this is swamped by the size of kallsyms. I don't think all of these are really relevent, because kdb should be under the 'kernel hacking' section and kdb will only be used by ones who need it. It's just a nice thing to have in the kernel. OTOH, LKCD is a must, of course as an option too, but no system is complete w/o some sort of crashdump features and crashdump analysis tools. This is a feature every trustworthy kernel should provide. bye, Marc. -- marc @ corky.net fingerprint = D1F0 5689 967F B87A 98EB C64D 256A D6BF 80DE 6D3C /"\ \ / ASCII Ribbon Campaign X Against HTML Mail / \ From owner-kdb@oss.sgi.com Thu Sep 7 19:59:06 2000 Received: by oss.sgi.com id ; Thu, 7 Sep 2000 19:58:56 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:25637 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Thu, 7 Sep 2000 19:58:33 -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 UAA03968 for ; Thu, 7 Sep 2000 20:05:06 -0700 (PDT) mail_from (kaos@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 NAA28340; Fri, 8 Sep 2000 13:57:12 +1100 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: Marc Esipovich cc: kdb@oss.sgi.com Subject: Re: Planned availability of SGI kdb and lkcd in future 2.4 vendor dis tributions In-reply-to: Your message of "Fri, 08 Sep 2000 05:26:23 +0300." <20000908052623.B25895@marcellos.corky.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 08 Sep 2000 13:57:12 +1100 Message-ID: <3984.968381832@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Fri, 8 Sep 2000 05:26:23 +0300, Marc Esipovich wrote: >On Fri, Sep 08, 2000 at 09:49:52AM +1100, Keith Owens wrote: > Scott Lurndal wrote: > >Being that there is no additional overhead (aside from some small number > >of kb of code) when KDB is included in a production kernel, it is nice > >to have on all the time - just in case the system does panic or hang > >due to a heisenbug. > > >> It does introduce overhead on some common paths. >> [snip] > >I don't think all of these are really relevent, because kdb should be under >the 'kernel hacking' section and kdb will only be used by ones who need it. My text was in response to Scott Lurndal's note "it is nice to have on all the time". In that context, the overhead matters. It would be nice if a supplier could say Go back one hour and turn the debugger on but until somebody invents a time machine, the only thing they can do is supply a kernel with the debugger always turned on. From owner-kdb@oss.sgi.com Fri Sep 15 15:05:00 2000 Received: by oss.sgi.com id ; Fri, 15 Sep 2000 15:04:50 -0700 Received: from natadm.apptitude.com ([192.190.175.254]:26635 "EHLO natadm.apptitude.com") by oss.sgi.com with ESMTP id ; Fri, 15 Sep 2000 15:04:31 -0700 Received: from us-exch2-210.apptitude.com (us-exch2-210.apptitude.com [192.190.175.202]) by natadm.apptitude.com (8.9.3/8.9.3) with ESMTP id PAA21633 for ; Fri, 15 Sep 2000 15:04:31 -0700 Received: from apptitude.com (pawnee.apptitude.com [192.190.175.73]) by us-exch2-210.apptitude.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id SMNG9H4K; Fri, 15 Sep 2000 15:04:01 -0700 Message-ID: <39C29B40.5672B6BE@apptitude.com> Date: Fri, 15 Sep 2000 21:57:20 +0000 From: Evan Wheeler X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: kdb@oss.sgi.com Subject: KDB 1.0 Backport to 2.2.12 kernel 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: Has anyone backported any of the 1.x version(s) of KDB to the Linux 2.2.12 kernel ? I am in desperate need of a kernel debugger that does breakpoints on memory writes. Evan Wheeler From owner-kdb@oss.sgi.com Fri Sep 15 15:53:51 2000 Received: by oss.sgi.com id ; Fri, 15 Sep 2000 15:53:41 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:1803 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Fri, 15 Sep 2000 15:53:16 -0700 Received: (qmail 11059 invoked from network); 15 Sep 2000 22:53:11 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 15 Sep 2000 22:53:11 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: kdb@oss.sgi.com Subject: Source level debugging with kdb Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 16 Sep 2000 09:53:10 +1100 Message-ID: <9664.969058390@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing FYI, we have just started work on source level debugging using kdb. One restriction, it will only work with two machines linked via a serial line. One of the design requirements for kdb is that it completely disables the kernel while you are in kdb. All interrupts are ignored, all cpus are stopped from doing any work other than kdb. This means all I/O must be polled, the serial console and keyboard use polling for kdb I/O. No interrupts means that few, if any, disk controllers will work while kdb is in control. Also doing disk I/O means using kernel structures which might be the very structures you are trying to debug. Or the disk controller might be wedged. So you cannot do I/O to disk on the machine being debugged. All is not lost, we are working on this configuration. Machine 1. Kernel source tree, compiled with -g. gdb vmlinux target remote /dev/ptyxx /dev/ptyxx is connected to a small C program that talks to gdb on one side and to the remote machine (via the serial line) on the other. Machine 2. Running kernel with kdb. The C program (tentatively called gdb2kdb) translates gdb packets to kdb commands and kdb output to gdb packets. You get the benefits of all the gdb commands (including source level debugging) plus the kdb kernel specific knowledge. gdb2kdb will have a mechanism for entering raw kdb commands as well as translating existing gdb commands. As an example, gdb is very bad at handling kernel back traces. If the kernel is compiled without frame pointers then gdb basically gives up on back trace. Even when the kernel is compiled with frame pointers, not all areas of the kernel use them, so gdb does not always get it right. kdb bt knows all about the kernel special cases and can do a decent back trace, even without frame pointers. Instead of using gdb 'bt', you would enter 'kdb bt'. From owner-kdb@oss.sgi.com Sat Sep 16 02:04:36 2000 Received: by oss.sgi.com id ; Sat, 16 Sep 2000 02:04:26 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:62733 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Sat, 16 Sep 2000 02:04:00 -0700 Received: (qmail 15705 invoked from network); 16 Sep 2000 09:03:55 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 16 Sep 2000 09:03:55 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: kdb@oss.sgi.com Subject: [Announce] kdb v1.4 is available Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 16 Sep 2000 20:03:54 +1100 Message-ID: <14955.969095034@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing http://oss.sgi.com/projects/kdb/download/ix86/ contains patches for kdb v1.4 against kernels 2.4.0-test5 (for the SGI XFS beta) and against 2.4.0-test8. The patch mainly adds one function that the XFS team wanted. CONFIG_KDB_OFF. Default is N, i.e. kdb defaults to on. The double negative is messy but necessary for backward compatibility, new config options default to N. If you want to ship a kernel with kdb support but you do not want every oops to drop the kernel into kdb and stop for debugging then compile with CONFIG_KDB_OFF=y. Give the users instructions on how to activate and use kdb when it is needed. The patch adds the boot time flags, kdb=on, kdb=off, kdb=early. kdb on its own still means early but is deprecated. These flags control the boot up state of kdb, if not specified then the initial state is taken from CONFIG_KDB_OFF. After /proc has been mounted, root can echo "1" > /proc/sys/kernel/kdb to turn kdb on, or echo "0" > /proc/sys/kernel/kdb to turn kdb off. New environment variable BTAPROMPT. If not defined or set to non-zero then bta pauses after each process. If set to zero then bta does not pause after each process. The commands set LINES=0 set BTAPROMPT=0 bta list every proc without human intervention. Assorted man page updates. From owner-kdb@oss.sgi.com Sun Sep 17 15:15:30 2000 Received: by oss.sgi.com id ; Sun, 17 Sep 2000 15:15:20 -0700 Received: from orzan.fi.udc.es ([193.144.60.19]:6881 "EHLO orzan.fi.udc.es") by oss.sgi.com with ESMTP id ; Sun, 17 Sep 2000 15:14:56 -0700 Received: from serpe.mitica (mail@vexeta.dc.fi.udc.es [193.144.51.32]) by orzan.fi.udc.es (8.9.3/8.9.1) with ESMTP id AAA01978 for ; Mon, 18 Sep 2000 00:14:53 +0200 (MET DST) Received: from quintela by serpe.mitica with local (Exim 3.16 #1 (Debian)) id 13ami4-0002vO-00; Mon, 18 Sep 2000 00:14:52 +0200 To: kdb@oss.sgi.com Subject: [PATCH]: kdb on serial console without keyboard support X-Url: http://carpanta.dc.fi.udc.es/~quintela From: "Juan J. Quintela" Date: 18 Sep 2000 00:14:52 +0200 Message-ID: Lines: 57 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 Keith You forgot to include that patch in the 1.4 release. It makes possible to compile kdb with serial console and without keyboard support. Later, Juan. diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude kdb/arch/i386/kdb/kdba_io.c kdb2/arch/i386/kdb/kdba_io.c --- kdb/arch/i386/kdb/kdba_io.c Tue Sep 5 22:36:23 2000 +++ kdb2/arch/i386/kdb/kdba_io.c Tue Sep 5 22:37:17 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 /* CONFIG_SERIAL_CONSOLE */ +#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 /* CONFIG_VT */ #ifdef KDB_BLINK_LED @@ -294,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 Sep 18 11:40:01 2000 Received: by oss.sgi.com id ; Mon, 18 Sep 2000 11:39:52 -0700 Received: from farmer8.nanobiz.com ([208.176.9.172]:8464 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Mon, 18 Sep 2000 11:39:34 -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 LAA20392; Mon, 18 Sep 2000 11:36:06 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Mon, 18 Sep 2000 11:36:58 -0700 Message-Id: <200009181836.LAA20317@pendragon.eng.nanobiz.com> Subject: Re: KDB 1.0 Backport to 2.2.12 kernel To: ewheeler@apptitude.com (Evan Wheeler) Date: Mon, 18 Sep 2000 11:36:57 -0700 (PDT) Cc: kdb@oss.sgi.com In-Reply-To: <39C29B40.5672B6BE@apptitude.com> from "Evan Wheeler" at Sep 15, 2000 09:57:20 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 > > Hi: > > Has anyone backported any of the 1.x version(s) of KDB to the Linux > 2.2.12 kernel ? I am in desperate need of a kernel debugger that does > breakpoints on memory writes. > > Evan Wheeler > Unless there is a bug in the implementation, v0.6 for 2.2.12 should do memory write breakpoints. scott From owner-kdb@oss.sgi.com Mon Sep 18 15:40:23 2000 Received: by oss.sgi.com id ; Mon, 18 Sep 2000 15:40:13 -0700 Received: from natadm.apptitude.com ([192.190.175.254]:34066 "EHLO natadm.apptitude.com") by oss.sgi.com with ESMTP id ; Mon, 18 Sep 2000 15:40:07 -0700 Received: from us-exch2-210.apptitude.com (us-exch2-210.apptitude.com [192.190.175.202]) by natadm.apptitude.com (8.9.3/8.9.3) with ESMTP id PAA26715; Mon, 18 Sep 2000 15:40:05 -0700 Received: by us-exch2-210.apptitude.com with Internet Mail Service (5.5.2448.0) id ; Mon, 18 Sep 2000 15:39:35 -0700 Message-ID: <1E06B998E00BD311A7410008C7BF2D8F0AF60E@us-exch2-210.apptitude.com> From: Evan Wheeler To: "'Scott Lurndal'" , Evan Wheeler Cc: kdb@oss.sgi.com, "',marc@corky.net'" <>, marc@corky.net Subject: RE: KDB 1.0 Backport to 2.2.12 kernel Date: Mon, 18 Sep 2000 15:39:34 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C021C1.5179C174" Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C021C1.5179C174 Content-Type: text/plain; charset="windows-1252" You're right, I stand corrected... it appears to work as advertised.... -----Original Message----- From: Scott Lurndal [mailto:slurn@nanobiz.com] Sent: Monday, September 18, 2000 11:37 AM To: ewheeler@apptitude.com Cc: kdb@oss.sgi.com Subject: Re: KDB 1.0 Backport to 2.2.12 kernel > > Hi: > > Has anyone backported any of the 1.x version(s) of KDB to the Linux > 2.2.12 kernel ? I am in desperate need of a kernel debugger that does > breakpoints on memory writes. > > Evan Wheeler > Unless there is a bug in the implementation, v0.6 for 2.2.12 should do memory write breakpoints. scott ------_=_NextPart_001_01C021C1.5179C174 Content-Type: text/html; charset="windows-1252" RE: KDB 1.0 Backport to 2.2.12 kernel

You're right, I stand corrected... it appears to work as advertised....



-----Original Message-----
From: Scott Lurndal [mailto:slurn@nanobiz.com]
Sent: Monday, September 18, 2000 11:37 AM
To: ewheeler@apptitude.com
Cc: kdb@oss.sgi.com
Subject: Re: KDB 1.0 Backport to 2.2.12 kernel


>
> Hi:
>
> Has anyone backported any of the 1.x version(s) of KDB to the Linux
> 2.2.12 kernel ?   I am in desperate need of a kernel debugger that does
> breakpoints on memory writes.
>
> Evan Wheeler
>

Unless there is a bug in the implementation, v0.6 for 2.2.12 should
do memory write breakpoints.

scott

------_=_NextPart_001_01C021C1.5179C174-- From owner-kdb@oss.sgi.com Tue Sep 19 17:28:35 2000 Received: by oss.sgi.com id ; Tue, 19 Sep 2000 17:28:25 -0700 Received: from orzan.fi.udc.es ([193.144.60.19]:29388 "EHLO orzan.fi.udc.es") by oss.sgi.com with ESMTP id ; Tue, 19 Sep 2000 17:28:10 -0700 Received: from serpe.mitica (mail@vexeta.dc.fi.udc.es [193.144.51.32]) by orzan.fi.udc.es (8.9.3/8.9.1) with ESMTP id CAA04074 for ; Wed, 20 Sep 2000 02:28:07 +0200 (MET DST) Received: from quintela by serpe.mitica with local (Exim 3.16 #1 (Debian)) id 13bXk6-00040S-00; Wed, 20 Sep 2000 02:28:06 +0200 To: kdb@oss.sgi.com Subject: kdb-1.4 ported to test9-pre4 X-Url: http://carpanta.dc.fi.udc.es/~quintela From: "Juan J. Quintela" Date: 20 Sep 2000 02:28:06 +0200 Message-ID: Lines: 24 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 I have just "ported" kdb-1.4 to test9-pre4. I have changed: - the machine_check of the MCE/MCA msr is now handled for the vanilla kernel, I have just removed it. - I have removed do_machine_check (done my kernel now) - I have removed kdba_enable_mce (done my kernel now) - I have removed kdb_enablehwfault (empty function after the removal of the previous function, I don't know if it is used in the ia64 port) - My kdb over serial console patch You can get the patch at: http://carpanta.dc.fi.udc.es/~quintela/kernel/2.4.0-test9-pre4/kdb-1.4-test9-pre4.bz2 (If you fond any problem, bugger me, not Keith :)))) Later, Juan. -- In theory, practice and theory are the same, but in practice they are different -- Larry McVoy From owner-kdb@oss.sgi.com Tue Sep 19 20:20:06 2000 Received: by oss.sgi.com id ; Tue, 19 Sep 2000 20:19:56 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:60945 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 19 Sep 2000 20:19:40 -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 UAA11081 for ; Tue, 19 Sep 2000 20:11:57 -0700 (PDT) mail_from (kaos@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 OAA11938; Wed, 20 Sep 2000 14:17:02 +1100 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Juan J. Quintela" cc: kdb@oss.sgi.com Subject: Re: kdb-1.4 ported to test9-pre4 In-reply-to: Your message of "20 Sep 2000 02:28:06 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 20 Sep 2000 14:17:02 +1100 Message-ID: <3167.969419822@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On 20 Sep 2000 02:28:06 +0200, "Juan J. Quintela" wrote: > I have just "ported" kdb-1.4 to test9-pre4. I have changed: >- the machine_check of the MCE/MCA msr is now handled for the vanilla kernel, > I have just removed it. >- I have removed do_machine_check (done my kernel now) >- I have removed kdba_enable_mce (done my kernel now) >- I have removed kdb_enablehwfault (empty function after the removal > of the previous function, I don't know if it is used in the > ia64 port) >- My kdb over serial console patch > >You can get the patch at: > >http://carpanta.dc.fi.udc.es/~quintela/kernel/2.4.0-test9-pre4/kdb-1.4-test9-pre4.bz2 Thanks Juan, I just did all those on my own tree, except for removing kdb_enablehwfault which is needed for IA64. Plus adding kdb hooks into bluesmoke and cleaning up some redundant trap entries which used to be reserved but are now used by bluesmoke. You can get it on http://oss.sgi.com/projects/kdb/download/ix86/kdb-v1.4-2.4.0-test9-pre4.gz The patch would have been out sooner but the scsi and devfs changes really stuffed up my test environment. Code freeze - what code freeze? From owner-kdb@oss.sgi.com Wed Sep 20 22:32:29 2000 Received: by oss.sgi.com id ; Wed, 20 Sep 2000 22:32:20 -0700 Received: from thalia.fm.intel.com ([132.233.247.11]:30982 "EHLO thalia.fm.intel.com") by oss.sgi.com with ESMTP id ; Wed, 20 Sep 2000 22:32:09 -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.31 2000/08/22 00:15:13 dmccart Exp $) with SMTP id FAA04237 for ; Thu, 21 Sep 2000 05:33:05 GMT Received: from fmsmsx17.intel.com ([132.233.48.17]) by 132.233.48.201 (Norton AntiVirus for Internet Email Gateways 1.0) ; Thu, 21 Sep 2000 05:32:03 0000 (GMT) Received: by fmsmsx17.fm.intel.com with Internet Mail Service (5.5.2650.21) id ; Wed, 20 Sep 2000 22:32:02 -0700 Message-ID: <4148FEAAD879D311AC5700A0C969E8905DE367@orsmsx35.jf.intel.com> From: "Grover, Andrew" To: "'kdb@oss.sgi.com'" Subject: kdb_read not exported Date: Wed, 20 Sep 2000 22:32:01 -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 all, I'm writing a module for kdb. I would find kdb_read's functionality useful in my module. If I export and use it, will anything break? ;-) Thanks -- Regards -- Andy ---------------------------- Andrew Grover Intel/TRL/MAL andrew.grover@intel.com From owner-kdb@oss.sgi.com Wed Sep 20 22:44:19 2000 Received: by oss.sgi.com id ; Wed, 20 Sep 2000 22:43:59 -0700 Received: from thalia.fm.intel.com ([132.233.247.11]:44554 "EHLO thalia.fm.intel.com") by oss.sgi.com with ESMTP id ; Wed, 20 Sep 2000 22:43:56 -0700 Received: from SMTP (fmsmsxvs02-1.fm.intel.com [132.233.42.202]) by thalia.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.31 2000/08/22 00:15:13 dmccart Exp $) with SMTP id FAA07740; Thu, 21 Sep 2000 05:44:54 GMT Received: from fmsmsx29.FM.INTEL.COM ([132.233.48.29]) by 132.233.48.202 (Norton AntiVirus for Internet Email Gateways 1.0) ; Thu, 21 Sep 2000 05:43:53 0000 (GMT) Received: by fmsmsx29.fm.intel.com with Internet Mail Service (5.5.2650.21) id ; Wed, 20 Sep 2000 22:43:51 -0700 Message-ID: <4148FEAAD879D311AC5700A0C969E8905DE368@orsmsx35.jf.intel.com> From: "Grover, Andrew" To: "'Keith Owens'" , kdb@oss.sgi.com Subject: RE: Source level debugging with kdb Date: Wed, 20 Sep 2000 22:43:47 -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 Source-level debugging would be very cool. BTW, can you describe more as to why there would be the only-over-serial-port limitation? If it were possible to have source debug for only a few modules (and the rest only symbols), that would fit in the kernel image, but still not be too big... Step-over would be nice too ;-) Regards -- Andy -----Original Message----- From: Keith Owens [mailto:kaos@melbourne.sgi.com] Sent: Friday, September 15, 2000 3:53 PM To: kdb@oss.sgi.com Subject: Source level debugging with kdb FYI, we have just started work on source level debugging using kdb. One restriction, it will only work with two machines linked via a serial line. From owner-kdb@oss.sgi.com Wed Sep 20 23:08:00 2000 Received: by oss.sgi.com id ; Wed, 20 Sep 2000 23:07:50 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:4690 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Wed, 20 Sep 2000 23:07:32 -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 WAA10112 for ; Wed, 20 Sep 2000 22:59:49 -0700 (PDT) mail_from (kaos@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 RAA22916; Thu, 21 Sep 2000 17:04:56 +1100 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Grover, Andrew" cc: "'kdb@oss.sgi.com'" Subject: Re: kdb_read not exported In-reply-to: Your message of "Wed, 20 Sep 2000 22:32:01 PDT." <4148FEAAD879D311AC5700A0C969E8905DE367@orsmsx35.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 21 Sep 2000 17:04:56 +1100 Message-ID: <5593.969516296@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Wed, 20 Sep 2000 22:32:01 -0700, "Grover, Andrew" wrote: >I'm writing a module for kdb. > >I would find kdb_read's functionality useful in my module. If I export and >use it, will anything break? kdb v1.5 (out soon) is a major redesign of the cpu state handling, to get finer grained control over single step and recovery from oopsing or hung kdb commands. Part of that redesign affects the way kdb_read() works, especially the longjmp() to break out of a command. Ask me again after v1.5 is out. From owner-kdb@oss.sgi.com Wed Sep 20 23:08:59 2000 Received: by oss.sgi.com id ; Wed, 20 Sep 2000 23:08:49 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:9554 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Wed, 20 Sep 2000 23:08:40 -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 XAA10148 for ; Wed, 20 Sep 2000 23:00:57 -0700 (PDT) mail_from (kaos@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 RAA22925; Thu, 21 Sep 2000 17:07:19 +1100 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Grover, Andrew" cc: kdb@oss.sgi.com Subject: Re: Source level debugging with kdb In-reply-to: Your message of "Wed, 20 Sep 2000 22:43:47 PDT." <4148FEAAD879D311AC5700A0C969E8905DE368@orsmsx35.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 21 Sep 2000 17:07:19 +1100 Message-ID: <5621.969516439@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Wed, 20 Sep 2000 22:43:47 -0700, "Grover, Andrew" wrote: >Source-level debugging would be very cool. > >BTW, can you describe more as to why there would be the >only-over-serial-port limitation? If it were possible to have source debug >for only a few modules (and the rest only symbols), that would fit in the >kernel image, but still not be too big... Source debug information is not stored in the running kernel, it is stored in vmlinux. The size of the running kernel is not the constraint, it is gdb's need to do I/O to access vmlinux. kdb does not allow I/O so gdb/vmlinux must be on a second machine. From owner-kdb@oss.sgi.com Thu Sep 21 01:06:10 2000 Received: by oss.sgi.com id ; Thu, 21 Sep 2000 01:06:00 -0700 Received: from farmer8.nanobiz.com ([208.176.9.172]:19475 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Thu, 21 Sep 2000 01:05:40 -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 BAA09718; Thu, 21 Sep 2000 01:02:21 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Thu, 21 Sep 2000 01:04:02 -0700 Message-Id: <200009210804.BAA04505@pendragon.eng.nanobiz.com> Subject: Re: Source level debugging with kdb To: kaos@melbourne.sgi.com (Keith Owens) Date: Thu, 21 Sep 2000 01:04:02 -0700 (PDT) Cc: andrew.grover@intel.com (Grover Andrew), kdb@oss.sgi.com In-Reply-To: <5621.969516439@kao2.melbourne.sgi.com> from "Keith Owens" at Sep 21, 2000 05:07:19 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 Wed, 20 Sep 2000 22:43:47 -0700, > "Grover, Andrew" wrote: > >Source-level debugging would be very cool. > > > >BTW, can you describe more as to why there would be the > >only-over-serial-port limitation? If it were possible to have source debug > >for only a few modules (and the rest only symbols), that would fit in the > >kernel image, but still not be too big... > > Source debug information is not stored in the running kernel, it is > stored in vmlinux. The size of the running kernel is not the > constraint, it is gdb's need to do I/O to access vmlinux. kdb does not > allow I/O so gdb/vmlinux must be on a second machine. > You could preload the information from vmlinux either at run-time prior to the first entry of kdb (via insmod, for example) or at boot time by reading the appropriate parts of vmlinux into allocated memory. If you have the memory to spare... scott From owner-kdb@oss.sgi.com Thu Sep 21 01:46:12 2000 Received: by oss.sgi.com id ; Thu, 21 Sep 2000 01:45:52 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:41220 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Thu, 21 Sep 2000 01:45:33 -0700 Received: (qmail 13633 invoked from network); 21 Sep 2000 08:45:26 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 21 Sep 2000 08:45:26 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: Scott Lurndal cc: andrew.grover@intel.com (Grover Andrew), kdb@oss.sgi.com Subject: Re: Source level debugging with kdb In-reply-to: Your message of "Thu, 21 Sep 2000 01:04:02 PDT." <200009210804.BAA04505@pendragon.eng.nanobiz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 21 Sep 2000 19:45:25 +1100 Message-ID: <968.969525925@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, 21 Sep 2000 01:04:02 -0700 (PDT), Scott Lurndal wrote: >You could preload the information from vmlinux >either at run-time prior to the first entry >of kdb (via insmod, for example) or at boot time >by reading the appropriate parts of vmlinux into >allocated memory. If you have the memory to spare... But then you have to teach gdb to read from memory instead of from a file. The whole problem is the design of gdb, it runs as a normal application and issues system calls to do I/O and talk to the user. System calls require kernel support but kdb has stopped the kernel. Don't even think about embedding gdb into the kernel, shudder. From owner-kdb@oss.sgi.com Thu Sep 21 03:13:03 2000 Received: by oss.sgi.com id ; Thu, 21 Sep 2000 03:12:52 -0700 Received: from Cantor.suse.de ([194.112.123.193]:48647 "HELO Cantor.suse.de") by oss.sgi.com with SMTP id ; Thu, 21 Sep 2000 03:12:32 -0700 Received: from Hermes.suse.de (Hermes.suse.de [194.112.123.136]) by Cantor.suse.de (Postfix) with ESMTP id 8E40A1E195; Thu, 21 Sep 2000 12:12:28 +0200 (MEST) Received: from gruyere.muc.suse.de (unknown [10.23.1.2]) by Hermes.suse.de (Postfix) with ESMTP id EB8BF10A028; Thu, 21 Sep 2000 12:12:27 +0200 (MEST) Received: by gruyere.muc.suse.de (Postfix, from userid 14446) id CE9FF2F300; Thu, 21 Sep 2000 12:12:24 +0200 (MEST) Date: Thu, 21 Sep 2000 12:12:24 +0200 From: "Andi Kleen" To: Keith Owens Cc: Scott Lurndal , andrew.grover@intel.com (Grover Andrew), kdb@oss.sgi.com Subject: Re: Source level debugging with kdb Message-ID: <20000921121224.A4250@gruyere.muc.suse.de> References: <200009210804.BAA04505@pendragon.eng.nanobiz.com> <968.969525925@ocs3.ocs-net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <968.969525925@ocs3.ocs-net>; from kaos@melbourne.sgi.com on Thu, Sep 21, 2000 at 07:45:25PM +1100 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, Sep 21, 2000 at 07:45:25PM +1100, Keith Owens wrote: > On Thu, 21 Sep 2000 01:04:02 -0700 (PDT), > Scott Lurndal wrote: > >You could preload the information from vmlinux > >either at run-time prior to the first entry > >of kdb (via insmod, for example) or at boot time > >by reading the appropriate parts of vmlinux into > >allocated memory. If you have the memory to spare... > > But then you have to teach gdb to read from memory instead of from a > file. The whole problem is the design of gdb, it runs as a normal > application and issues system calls to do I/O and talk to the user. > System calls require kernel support but kdb has stopped the kernel. > Don't even think about embedding gdb into the kernel, shudder. Actually there is some old patch that allows local kernel debugging with gdb via a gdb stub that works via a character device (it used to be in ikd), but of course it is a very very risky thing because you can easily deadlock yourself. -Andi From owner-kdb@oss.sgi.com Thu Sep 21 03:26:32 2000 Received: by oss.sgi.com id ; Thu, 21 Sep 2000 03:26:22 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:518 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Thu, 21 Sep 2000 03:25:59 -0700 Received: (qmail 14424 invoked from network); 21 Sep 2000 10:25:54 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 21 Sep 2000 10:25:54 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Andi Kleen" cc: kdb@oss.sgi.com Subject: Re: Source level debugging with kdb In-reply-to: Your message of "Thu, 21 Sep 2000 12:12:24 +0200." <20000921121224.A4250@gruyere.muc.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 21 Sep 2000 21:25:52 +1100 Message-ID: <2019.969531952@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, 21 Sep 2000 12:12:24 +0200, "Andi Kleen" wrote: >Actually there is some old patch that allows local kernel debugging >with gdb via a gdb stub that works via a character device (it used to be >in ikd), but of course it is a very very risky thing because you can easily >deadlock yourself. Same problem, the gdb stub for local source level kernel debugging (xkgdb) requires a functioning kernel, both for gdb and for the stub. kdb is deliberately aimed at a lower level, where the kernel is frozen during debugging and the debugger uses the absolute minimum of kernel services. You are right, it is incredibly easy to deadlock doing debugging on the local kernel. Just put a break point anywhere that gdb needs, or in any code running with interrupts disabled, or in the screen handler, then it is time for the big red button. I used to use xkgdb and did some patches for it to overcome some of its disadvantages, but xkgdb has too many restrictions on where it can be used to be useful for real kernel work. It is OK for higher levels of the kernel such as device drivers or file systems, but even then you have to make sure you do not interrupt while the kernel holds any locks that you need in order to talk to gdb. From owner-kdb@oss.sgi.com Fri Sep 22 03:47:19 2000 Received: by oss.sgi.com id ; Fri, 22 Sep 2000 03:47:09 -0700 Received: from giaspn01.vsnl.net.in ([202.54.10.1]:37892 "EHLO giaspn01.vsnl.net.in") by oss.sgi.com with ESMTP id ; Fri, 22 Sep 2000 03:46:54 -0700 Received: from anmol (mhsr2_14.ppppun.vsnl.net.in [202.54.10.221]) by giaspn01.vsnl.net.in (8.9.0/8.9.0) with SMTP id QAA32213 for ; Fri, 22 Sep 2000 16:14:12 +0530 (IST) Message-ID: <000901c02483$78fc72e0$dd0a36ca@anmol> From: "Anmol Sheth" To: Subject: KDB Compile problems Date: Fri, 22 Sep 2000 16:23:51 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0006_01C024B1.7E8AA280" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 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_0006_01C024B1.7E8AA280 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi! We downloaded the patch for the 2.2 series The exact filename being=20 ftp://oss.sgi.com/www/projects/kdb/download/ix86/kdb-v0.6-2.2.13.gz We are running a 2.2.17 kernel, however we are getting errors when we = recompile after patching the kernel with the above patch Is there a specific patch for the 2.2.17 kernel, if not is the above = adequate. Also we are a little confused after reading the README in the Modules = directory wherein a mention is made of a *.c file which we havent found = anywhere within the downloads, could you please clarify on this too. Hoping to hear from you soon Anmol and Aditya ------=_NextPart_000_0006_01C024B1.7E8AA280 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi!
We downloaded the patch for the 2.2 series The exact = filename=20 being
ftp://oss.sgi.com/www/projects/kdb/download/ix86/kdb-v0.6-2.2.13.gz
 
We are running a 2.2.17 kernel, however we are = getting errors=20 when we recompile after patching the kernel with the above = patch
 
Is there a specific patch for the 2.2.17 kernel, if = not is the=20 above adequate.
Also we are a little confused after reading the = README in the=20 Modules directory wherein a mention is made of a *.c file which we = havent found=20 anywhere within the downloads, could you please clarify on this=20 too.
 
Hoping to hear from you soon
 
Anmol and Aditya
------=_NextPart_000_0006_01C024B1.7E8AA280-- From owner-kdb@oss.sgi.com Fri Sep 22 04:15:19 2000 Received: by oss.sgi.com id ; Fri, 22 Sep 2000 04:15:09 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:21261 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Fri, 22 Sep 2000 04:14:51 -0700 Received: (qmail 24201 invoked from network); 22 Sep 2000 11:14:46 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 22 Sep 2000 11:14:46 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: "Anmol Sheth" cc: kdb@oss.sgi.com Subject: Re: KDB Compile problems In-reply-to: Your message of "Fri, 22 Sep 2000 16:23:51 +0530." <000901c02483$78fc72e0$dd0a36ca@anmol> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 22 Sep 2000 22:14:46 +1100 Message-ID: <2241.969621286@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Fri, 22 Sep 2000 16:23:51 +0530, "Anmol Sheth" wrote: >We downloaded the patch for the 2.2 series The exact filename being=20 >ftp://oss.sgi.com/www/projects/kdb/download/ix86/kdb-v0.6-2.2.13.gz > >We are running a 2.2.17 kernel, however we are getting errors when we = >recompile after patching the kernel with the above patch The last patch for 2.2 kernels was kdb-v0.6-2.2.13. Due to lack of resources, SGI is not supporting kdb for 2.2 kernels, all our development is on kdb v1.x for 2.4 kernels. If somebody wants to upgrade kdb v0.x for the latest 2.2 kernel or, better still, backport kdb v1.x from 2.4 to 2.2 kernels then we will gratefully accept any patches. From owner-kdb@oss.sgi.com Sun Sep 24 04:39:12 2000 Received: by oss.sgi.com id ; Sun, 24 Sep 2000 04:39:02 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:61447 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Sun, 24 Sep 2000 04:38:48 -0700 Received: (qmail 7256 invoked from network); 24 Sep 2000 11:38:43 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 24 Sep 2000 11:38:43 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: kdb@oss.sgi.com Cc: linux-xfs@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [Announce] kdb v1.5-beta1 is available Date: Sun, 24 Sep 2000 22:38:41 +1100 Message-ID: <29463.969795521@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-Type: text/plain; charset=us-ascii http://oss.sgi.com/projects/kdb/download/ix86/ contains a patch for kdb v1.5-beta1 against 2.4.0-test8, patch against 2.4.0-test9-pre6 will be there soon. Copied to linux-xfs for interest only, XFS will stay on kdb v1.4 until kdb v1.5 has been better tested. This version of kdb has had a lot of internal changes from kdb v1.4 so it comes with even less warranty than normal. You may hit problems in the debugger itself so only apply this patch if you want to explore the debugger, if you want to do real debugging then stick to kdb v1.4 for the moment. All the global kdb state has been converted to per cpu state, this gives a lot more control over what kdb can do to individual cpus. Besides the internal rewrite, there are quite a few externally visible changes. man Documentation/kdb/kdb.mm, sections INITIAL KDB COMMANDS onwards. * Initial commands. Edit kdb/kdb_cmds to define your startup commands, build and install the new kernel. Allows per user definition of startup kdb commands. * SS and SSB commands now only let one cpu run and attempt to block interrupts while they do so. Previously ss[b] let all cpus run with interrupts enabled which meant the kernel changed while you were debugging. * kdb can now recover from errors in its own commands. This is the requirement that triggered the rewrite, it turned out to be a can of worms. * kdb can now go recursive which gives you some self debugging capability. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.2 (GNU/Linux) Comment: Exmh version 2.1.1 10/15/1999 iD8DBQE5zefAi4UHNye0ZOoRAghjAKCSBmVjg4/JNa0P4aU0l+MSBa9QAQCcDdXw LpqTl5moOVKO/9w+n1+y3k8= =1xuA -----END PGP SIGNATURE----- From owner-kdb@oss.sgi.com Sun Sep 24 06:13:42 2000 Received: by oss.sgi.com id ; Sun, 24 Sep 2000 06:13:33 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:5384 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Sun, 24 Sep 2000 06:13:18 -0700 Received: (qmail 7815 invoked from network); 24 Sep 2000 13:13:10 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 24 Sep 2000 13:13:10 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: kdb@oss.sgi.com Subject: Re: [Announce] kdb v1.5-beta1 is available In-reply-to: Your message of "Sun, 24 Sep 2000 22:38:41 +1100." <29463.969795521@ocs3.ocs-net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 25 Sep 2000 00:13:09 +1100 Message-ID: <30805.969801189@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Typical, send the patch out and find a bug 30 seconds later. Setting breakpoints in initial commands (kdb_cmds) defines the breakpoints but they are not activated until you enter and leave kdb at least once. If you need breakpoints in kdb_cmds, there is a workaround. Boot with 'kdb=early' on the command line and just type 'go' at the first kdb prompt. Will be fixed in beta2. From owner-kdb@oss.sgi.com Wed Sep 27 15:01:54 2000 Received: by oss.sgi.com id ; Wed, 27 Sep 2000 15:01:34 -0700 Received: from mercury.eng.emc.com ([168.159.40.77]:54798 "EHLO mercury.lss.emc.com") by oss.sgi.com with ESMTP id ; Wed, 27 Sep 2000 15:01:07 -0700 Received: by mercury.eng.emc.com with Internet Mail Service (5.5.2650.21) id ; Wed, 27 Sep 2000 18:06:45 -0400 Message-ID: <221EA3AEAB55D411A2DA00D0B774E6F70A04F2@marino.lss.emc.com> From: "goggin, edward" To: "'kdb@oss.sgi.com'" Subject: KDB console hang after "go" Date: Wed, 27 Sep 2000 18:03:09 -0400 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 While your recommended work around to the apparent hang after typing "go" out of the KDB console interrupt does work for me, the bad news is that the problem is still present on my computer after patching Linux kernel version 2.2.17 with the kdb-v0.6-2.2.13 patch file. Any ideas what will fix the problem? Thanks, Ed Goggin From owner-kdb@oss.sgi.com Wed Sep 27 21:54:27 2000 Received: by oss.sgi.com id ; Wed, 27 Sep 2000 21:54:17 -0700 Received: from pallas.veritas.com ([204.177.156.25]:659 "EHLO pallas.veritas.com") by oss.sgi.com with ESMTP id ; Wed, 27 Sep 2000 21:54:00 -0700 Received: from megami.veritas.com (megami.veritas.com [192.203.46.101]) by pallas.veritas.com (8.9.1a/8.9.1) with SMTP id VAA18457; Wed, 27 Sep 2000 21:54:14 -0700 (PDT) Received: from muppetlabs.com([172.22.5.154]) (1133 bytes) by megami.veritas.com via sendmail with P:esmtp/R:smart_host/T:smtp (sender: ) id for ; Wed, 27 Sep 2000 21:53:59 -0700 (PDT) (Smail-3.2.0.101 1997-Dec-17 #4 built 1999-Aug-24) Message-ID: <39D2CEA4.23B58CEE@muppetlabs.com> Date: Wed, 27 Sep 2000 21:52:52 -0700 From: Amit D Chaudhary X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: "goggin, edward" CC: "'kdb@oss.sgi.com'" Subject: Re: KDB console hang after "go" References: <221EA3AEAB55D411A2DA00D0B774E6F70A04F2@marino.lss.emc.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing The patch is "suppose" to be made against the 2.2.13 kernel. Amit "goggin, edward" wrote: > > While your recommended work around to the apparent > hang after typing "go" out of the KDB console interrupt > does work for me, the bad news is that the problem is > still present on my computer after patching Linux kernel > version 2.2.17 with the kdb-v0.6-2.2.13 patch file. > > Any ideas what will fix the problem? > > Thanks, > > Ed Goggin From owner-kdb@oss.sgi.com Thu Sep 28 04:43:18 2000 Received: by oss.sgi.com id ; Thu, 28 Sep 2000 04:42:59 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:56843 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Thu, 28 Sep 2000 04:42:41 -0700 Received: (qmail 2044 invoked from network); 28 Sep 2000 11:42:35 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 28 Sep 2000 11:42:35 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: kdb@oss.sgi.com Cc: linux-xfs@oss.sgi.com, linux-kernel@vger.kernel.org, Keir Fraser Subject: [Announce] kdb v1.5-beta2 is available Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 28 Sep 2000 22:42:34 +1100 Message-ID: <9450.970141354@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing http://oss.sgi.com/projects/kdb/download/ix86/ contains a patch for kdb v1.5-beta2 against 2.4.0-test9-pre7. Copied to linux-xfs for interest only, XFS will stay on kdb v1.4 until kdb v1.5 has been better tested. If nobody complains then this will become kdb v1.5 some time next week. This version of kdb has had a lot of internal changes from kdb v1.4 so it comes with even less warranty than normal. You may hit problems in the debugger itself so only apply this patch if you want to explore the debugger, if you want to do real debugging then stick to kdb v1.4 for the moment. Changes from kdb v1.5-beta1. * Upgrade to 2.4.0-test9-pre7. * Breakpoints that are set via kdb/kdb_cmds at bootup are now activated automatically. They are also applied to each cpu as it boots so you can specify global hardware breakpoints and they will appear on all cpus. * SS and SSB commands have some minor bugs fixes. The change to only release one cpu for ss[b] appears to be working. * NMI oopser for uniprocessors. This builds on Keir Fraser's excellent patch for activating the local APIC on P6 systems and (ab)uses the local APIC to generate NMI on systems which have a local APIC but no IO-APIC, typically any P6 and above uniprocessor. So you poor developers with uniprocessors can now get diagnostics when the system gets into a spin loop. On the Processor configuration menu, select 'APIC and IO-APIC support on uniprocessors'. That option will detect the local APIC if it exists. See the help for 'NMI watchdog active for uniprocessors' and Documentation/nmi_watchdog.txt. * gdb single step sometimes hangs with this version of kdb, probably related to the dr7 changes in 2.4.0-test9-pre7. Under investigation, for the moment do not use gdb single stepping. From owner-kdb@oss.sgi.com Thu Sep 28 05:01:19 2000 Received: by oss.sgi.com id ; Thu, 28 Sep 2000 05:01:09 -0700 Received: from [62.172.234.2] ([62.172.234.2]:50611 "EHLO saturn.homenet") by oss.sgi.com with ESMTP id ; Thu, 28 Sep 2000 05:00:55 -0700 Received: from localhost (tigran@localhost) by saturn.homenet (8.11.0/8.11.0) with ESMTP id e8SC9tm01054; Thu, 28 Sep 2000 13:09:55 +0100 X-Authentication-Warning: saturn.homenet: tigran owned process doing -bs Date: Thu, 28 Sep 2000 13:09:55 +0100 (BST) From: Tigran Aivazian X-Sender: tigran@saturn.homenet To: Keith Owens cc: kdb@oss.sgi.com, Keir Fraser Subject: Re: [Announce] kdb v1.5-beta2 is available In-Reply-To: <9450.970141354@ocs3.ocs-net> Message-ID: 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 On Thu, 28 Sep 2000, Keith Owens wrote: > http://oss.sgi.com/projects/kdb/download/ix86/ contains a patch for kdb > v1.5-beta2 against 2.4.0-test9-pre7. Hi Keith, Just 5 minutes ago I made a patch for you against beta1 :( Maybe it still applies to beta2, otherwise I can redo it on beta2. Basically, I suggest to move kdb_vmlist_check() out of vmalloc.c because it makes kdb patch less intrusive into non-kdb-specific code. I mentioned this to Scott ages ago but he thinks it is better to stay inside vmalloc.c in case vmlist semantics (or anything else relevant, in vmalloc.c) changes. I disagree, not sure about you - hence the patch below. Also, your latest kdb patch is part of my "vx-linux patch" (i.e. everything needed for VERITAS Linux kernel work) and thus it is easier for me to keep maintaining it when it touches as few common files as possible. Regards, Tigran diff -urN -X dontdiff linux-kdb-keith/arch/i386/kdb/kdbasupport.c linux-kdb/arch/i386/kdb/kdbasupport.c --- linux-kdb-keith/arch/i386/kdb/kdbasupport.c Thu Sep 28 12:56:31 2000 +++ linux-kdb/arch/i386/kdb/kdbasupport.c Thu Sep 28 12:54:15 2000 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +36,7 @@ #include #include -char *kdb_diemsg = NULL; +char *kdb_diemsg; /* @@ -1223,6 +1224,51 @@ kdb_printf(" to: "); kdb_symbol_print(to, NULL, KDB_SP_DEFAULT); kdb_printf("\n"); +} + +/* kdb_vmlist_check + * Check to determine if an address is within a vmalloced range. + * Parameters: + * starta -- Starting address of region to check + * enda -- Ending address of region to check + * Returns: + * 0 -- [starta,enda] not within a vmalloc area + * 1 -- [starta,enda] within a vmalloc area + * Locking: + * None. + * Remarks: + * Shouldn't acquire locks. Always called with all interrupts + * disabled and other cpus halted. Yet, if a breakpoint or fault + * occurs while the vmlist is in an indeterminate state, this + * function could fail. + */ +static int +kdb_vmlist_check(unsigned long starta, unsigned long enda) +{ + struct vm_struct *vp; + + if (vmlist) { + for(vp=vmlist; vp; vp = vp->next) { + unsigned long end = (unsigned long)vp->addr + vp->size; + + end -= PAGE_SIZE; /* Unbias for guard page */ + + if ((starta >= (unsigned long)vp->addr) + && (starta < end) + && (enda < end)) { + return 1; + } + } + } + else { + /* early kdb, no vmlist yet */ + extern char _text, _end; + if (starta >= (unsigned long) &_text && + enda < (unsigned long) &_end && + starta <= enda) + return 1; + } + return 0; } /* diff -urN -X dontdiff linux-kdb-keith/include/linux/kdb.h linux-kdb/include/linux/kdb.h --- linux-kdb-keith/include/linux/kdb.h Thu Sep 28 12:56:31 2000 +++ linux-kdb/include/linux/kdb.h Thu Sep 28 12:45:48 2000 @@ -210,12 +210,6 @@ extern int kdba_callback_debug(struct pt_regs *, int, long, void *); /* - * Determine if a kernel address is valid or not. - */ - -extern int kdb_vmlist_check(unsigned long, unsigned long); - - /* * Routine for debugging the debugger state. */ diff -urN -X dontdiff linux-kdb-keith/kdb/gen-kdb_cmds.c linux-kdb/kdb/gen-kdb_cmds.c --- linux-kdb-keith/kdb/gen-kdb_cmds.c Thu Jan 1 01:00:00 1970 +++ linux-kdb/kdb/gen-kdb_cmds.c Thu Sep 28 12:52:13 2000 @@ -0,0 +1,4 @@ +#include +char __initdata *kdb_cmds[] = { + 0 +}; diff -urN -X dontdiff linux-kdb-keith/mm/vmalloc.c linux-kdb/mm/vmalloc.c --- linux-kdb-keith/mm/vmalloc.c Thu Sep 28 12:56:31 2000 +++ linux-kdb/mm/vmalloc.c Thu Sep 28 12:46:41 2000 @@ -16,53 +16,6 @@ rwlock_t vmlist_lock = RW_LOCK_UNLOCKED; struct vm_struct * vmlist = NULL; -#if defined(CONFIG_KDB) -/* kdb_vmlist_check - * Check to determine if an address is within a vmalloced range. - * Parameters: - * starta -- Starting address of region to check - * enda -- Ending address of region to check - * Returns: - * 0 -- [starta,enda] not within a vmalloc area - * 1 -- [starta,enda] within a vmalloc area - * Locking: - * None. - * Remarks: - * Shouldn't acquire locks. Always called with all interrupts - * disabled and other cpus halted. Yet, if a breakpoint or fault - * occurs while the vmlist is in an indeterminate state, this - * function could fail. - */ -int -kdb_vmlist_check(unsigned long starta, unsigned long enda) -{ - struct vm_struct *vp; - - if (vmlist) { - for(vp=vmlist; vp; vp = vp->next) { - unsigned long end = (unsigned long)vp->addr + vp->size; - - end -= PAGE_SIZE; /* Unbias for guard page */ - - if ((starta >= (unsigned long)vp->addr) - && (starta < end) - && (enda < end)) { - return 1; - } - } - } - else { - /* early kdb, no vmlist yet */ - extern char _text, _end; - if (starta >= (unsigned long) &_text && - enda < (unsigned long) &_end && - starta <= enda) - return 1; - } - return 0; -} -#endif - static inline void free_area_pte(pmd_t * pmd, unsigned long address, unsigned long size) { pte_t * pte; From owner-kdb@oss.sgi.com Thu Sep 28 05:04:19 2000 Received: by oss.sgi.com id ; Thu, 28 Sep 2000 05:03:59 -0700 Received: from [62.172.234.2] ([62.172.234.2]:17848 "EHLO saturn.homenet") by oss.sgi.com with ESMTP id ; Thu, 28 Sep 2000 05:03:48 -0700 Received: from localhost (tigran@localhost) by saturn.homenet (8.11.0/8.11.0) with ESMTP id e8SCCos01060; Thu, 28 Sep 2000 13:12:50 +0100 X-Authentication-Warning: saturn.homenet: tigran owned process doing -bs Date: Thu, 28 Sep 2000 13:12:50 +0100 (BST) From: Tigran Aivazian X-Sender: tigran@saturn.homenet To: Keith Owens cc: kdb@oss.sgi.com, Keir Fraser Subject: Re: [Announce] kdb v1.5-beta2 is available In-Reply-To: Message-ID: 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 On Thu, 28 Sep 2000, Tigran Aivazian wrote: > diff -urN -X dontdiff linux-kdb-keith/kdb/gen-kdb_cmds.c linux-kdb/kdb/gen-kdb_cmds.c > --- linux-kdb-keith/kdb/gen-kdb_cmds.c Thu Jan 1 01:00:00 1970 > +++ linux-kdb/kdb/gen-kdb_cmds.c Thu Sep 28 12:52:13 2000 > @@ -0,0 +1,4 @@ > +#include > +char __initdata *kdb_cmds[] = { > + 0 > +}; oops, this bit is an error - I'll put gen-kdb_cmds.c in my dontdiff file! Regards, Tigran From owner-kdb@oss.sgi.com Thu Sep 28 06:26:09 2000 Received: by oss.sgi.com id ; Thu, 28 Sep 2000 06:25:50 -0700 Received: from ppp0.ocs.com.au ([203.34.97.3]:6668 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Thu, 28 Sep 2000 06:25:34 -0700 Received: (qmail 2849 invoked from network); 28 Sep 2000 13:25:29 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 28 Sep 2000 13:25:29 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: Tigran Aivazian cc: kdb@oss.sgi.com Subject: Re: [Announce] kdb v1.5-beta2 is available In-reply-to: Your message of "Thu, 28 Sep 2000 13:09:55 BST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 29 Sep 2000 00:25:28 +1100 Message-ID: <10346.970147528@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, 28 Sep 2000 13:09:55 +0100 (BST), Tigran Aivazian wrote: >On Thu, 28 Sep 2000, Keith Owens wrote: > >> http://oss.sgi.com/projects/kdb/download/ix86/ contains a patch for kdb >> v1.5-beta2 against 2.4.0-test9-pre7. > >Just 5 minutes ago I made a patch for you against beta1 :( The joys of life on the bleeding edge :) >Maybe it still applies to beta2, otherwise I can redo it on beta2. >Basically, I suggest to move kdb_vmlist_check() out of vmalloc.c because >it makes kdb patch less intrusive into non-kdb-specific code. I have to agree with Scott on this one. A kdb hook for a particular area needs to be in the source where all the other work for that area is done. It picks up unexpected kernel changes much faster and tells people who are integrating multiple patches that there might be conflicts in that area. From owner-kdb@oss.sgi.com Thu Sep 28 06:37:39 2000 Received: by oss.sgi.com id ; Thu, 28 Sep 2000 06:37:20 -0700 Received: from [62.172.234.2] ([62.172.234.2]:20086 "EHLO saturn.homenet") by oss.sgi.com with ESMTP id ; Thu, 28 Sep 2000 06:36:46 -0700 Received: from localhost (tigran@localhost) by saturn.homenet (8.11.0/8.11.0) with ESMTP id e8SDik609122; Thu, 28 Sep 2000 14:44:46 +0100 X-Authentication-Warning: saturn.homenet: tigran owned process doing -bs Date: Thu, 28 Sep 2000 14:44:46 +0100 (BST) From: Tigran Aivazian X-Sender: tigran@saturn.homenet To: Keith Owens cc: kdb@oss.sgi.com Subject: Re: [Announce] kdb v1.5-beta2 is available In-Reply-To: <10346.970147528@ocs3.ocs-net> Message-ID: 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 On Fri, 29 Sep 2000, Keith Owens wrote: > >Maybe it still applies to beta2, otherwise I can redo it on beta2. > >Basically, I suggest to move kdb_vmlist_check() out of vmalloc.c because > >it makes kdb patch less intrusive into non-kdb-specific code. > > I have to agree with Scott on this one. A kdb hook for a particular > area needs to be in the source where all the other work for that area > is done. It picks up unexpected kernel changes much faster and tells > people who are integrating multiple patches that there might be > conflicts in that area. Ok, I suppose it makes sense - I do not strongly disagree and also confess that one of the reasons is that my vx-linux patch also contains other changes to vmalloc.c and I never trust patch(1)'s "hunking succeeded" stuff and always check the conflicts manually, just in case :) Regards, Tigran