From sonic.zhang@intel.com Thu Jan 2 22:49:02 2003 Received: with ECARTIS (v1.0.0; list kdb); Thu, 02 Jan 2003 22:49:04 -0800 (PST) Received: from caduceus.jf.intel.com (fmr06.intel.com [134.134.136.7]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h036n13v017085 for ; Thu, 2 Jan 2003 22:49:02 -0800 Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7]) by caduceus.jf.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h036ols24853 for ; Fri, 3 Jan 2003 06:50:47 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by talaria.jf.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.27 2002/10/16 23:46:59 dmccart Exp $) with SMTP id h036ap601001 for ; Fri, 3 Jan 2003 06:36:51 GMT Received: from pdsmsx17.pd.intel.com ([172.16.12.121]) by pdsmsxvs01.pd.intel.com (NAVGW 2.5.2.11) with SMTP id M2003010314541303540 for ; Fri, 03 Jan 2003 14:54:13 +0800 Received: by pdsmsx17.pd.intel.com with Internet Mail Service (5.5.2653.19) id ; Fri, 3 Jan 2003 14:53:29 +0800 Message-ID: <957BD1C2BF3CD411B6C500A0C944CA2602AFAF90@pdsmsx32.pd.intel.com> From: "Zhang, Sonic" To: "KDB (E-mail)" Subject: New results for cases 530, 531, 581, 603 Date: Fri, 3 Jan 2003 14:51:56 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C2B2F4.9B727890" X-archive-position: 201 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sonic.zhang@intel.com Precedence: bulk X-list: kdb 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_000_01C2B2F4.9B727890 Content-Type: text/plain; charset="gb2312" Hi, See the attachments. Regards. Sonic Zhang ------_=_NextPart_000_01C2B2F4.9B727890 Content-Type: application/octet-stream; name="530.out.bad" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="530.out.bad" 530: =0D: command not found=0A= 530: =0D: command not found=0A= 530: line 18: syntax error near unexpected token `in=0D'=0A= 530: line 18: `case "`date +%H`" in=0D'=0A= ------_=_NextPart_000_01C2B2F4.9B727890 Content-Type: application/octet-stream; name="532.out.bad" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="532.out.bad" 532: =0D: command not found=0A= 532: =0D: command not found=0A= 532: line 18: syntax error near unexpected token `in=0D'=0A= 532: line 18: `case "`date +%H`" in=0D'=0A= ------_=_NextPart_000_01C2B2F4.9B727890 Content-Type: application/octet-stream; name="581.out.bad" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="581.out.bad" 581: =0D: command not found=0A= QA output created by 581=0D 581: =0D: command not found=0A= 581: ./common.product=0D: No such file or directory=0A= ------_=_NextPart_000_01C2B2F4.9B727890 Content-Type: application/octet-stream; name="603.out.ZIP" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="603.out.ZIP" UEsDBBQAAAAIAOptIy5KhvHvZQIAAMAJAAALAAAANjAzX291dC5iYWTtVE1P20AQvftXPKkHoIpj QlTaRuLAx7UppeVEOKztsb1ivWv2I2okfnxnbQOpqGgPCKkSkWzJM+/Ny76Z2W/HMMF3waOwJDyV yDc43J8n/CxwtYA3Bq3QGwhbh5a0d4mjcoGUQD87S85Jo/FuNkHRCIsZs5YGnFhLExws1UFx/BE7 VFZSEw4WwOHs80ecWHNDGp3sCNs/VopCOy6bvsdqtxGugRe5Ym3trSS32suA5XKJ1Szb2YZqo1NF ooI25TOwf4DkG08OpoLbtLlRg/5TdPaDbCs1W4jzL2fH2SS77Erhpa7hmxg7PcuKVfI7CrKCUGx8 uYHUzgul+MTT6XSVXPF7DKGSityE23BDY7c4eb1KniigMOyLGRgTCF3y4bysNhHUA5i4kxwdHeHY e2q7np2LEsoUQkEUBTcJnE+61ltR0AKGQdxhS7dBcgu56MMoIE3RJJdO1IwbCbhKb6/5VWAtVKA7 9qYwLU9QeZeuh1hMN2iM89fsZp0kX3sJt0iAe17sPs+MsR6CCwTtyY4Z31gT6qY/9CAZrYzcBynA Bv3wEZ+xFuO1E0V/IvZORNbwV8Z5Y+hQM2Z5+LcUwJxarnlOIz4ybx8nlc0hj5YnCSlc6PppR8sv NgeVNS1He3eroIaiscJ3cIc9DdoeJeWhHkPBxd6Mrvah3fle5KyfOqRhckd2LfqDPWvTC2/vfP7p bXtff3tPglRlDJfUxn6Z2ooWu6LrDvb69Y2gi6D13zCnDRU393uvZCv9sP5vS/0/LfUfLnTLTWfB rRv9PA7vsPAlaUnl9KUvgw/7+2+XweteBr8AUEsBAhQLFAAAAAgA6m0jLkqG8e9lAgAAwAkAAAsA AAAAAAAAAQAgAAAAAAAAADYwM19vdXQuYmFkUEsFBgAAAAABAAEAOQAAAI4CAAAAAA== ------_=_NextPart_000_01C2B2F4.9B727890-- From sonic.zhang@intel.com Thu Jan 2 23:31:07 2003 Received: with ECARTIS (v1.0.0; list kdb); Thu, 02 Jan 2003 23:31:09 -0800 (PST) Received: from caduceus.jf.intel.com (fmr06.intel.com [134.134.136.7]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h037V73v017844 for ; Thu, 2 Jan 2003 23:31:07 -0800 Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7]) by caduceus.jf.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h037Wr406522 for ; Fri, 3 Jan 2003 07:32:53 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by talaria.jf.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.27 2002/10/16 23:46:59 dmccart Exp $) with SMTP id h037Iuq13298 for ; Fri, 3 Jan 2003 07:18:56 GMT Received: from pdsmsx17.pd.intel.com ([172.16.12.121]) by pdsmsxvs01.pd.intel.com (NAVGW 2.5.2.11) with SMTP id M2003010315361818074 for ; Fri, 03 Jan 2003 15:36:18 +0800 Received: by pdsmsx17.pd.intel.com with Internet Mail Service (5.5.2653.19) id ; Fri, 3 Jan 2003 15:35:34 +0800 Message-ID: <957BD1C2BF3CD411B6C500A0C944CA2602AFAFC1@pdsmsx32.pd.intel.com> From: "Zhang, Sonic" To: "KDB (E-mail)" Subject: RE: New results for cases 530, 531, 581, 603 Date: Fri, 3 Jan 2003 15:34:10 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id h037V73v017844 X-archive-position: 202 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sonic.zhang@intel.com Precedence: bulk X-list: kdb Hi, I am sorry, I made a mistake. Please ignore the former email. Sonic Zhang -----Original Message----- From: Zhang, Sonic [mailto:sonic.zhang@intel.com] Sent: 2003Äê1ÔÂ3ÈÕ 14:52 To: KDB (E-mail) Subject: New results for cases 530, 531, 581, 603 Hi, See the attachments. Regards. Sonic Zhang From aparna.shivaswamy@intel.com Mon Jan 13 01:13:26 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 13 Jan 2003 01:13:28 -0800 (PST) Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0D9DP3v002319 for ; Mon, 13 Jan 2003 01:13:25 -0800 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes.fm.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h0D9Gpp05697 for ; Mon, 13 Jan 2003 09:16:52 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.27 2002/10/16 23:46:59 dmccart Exp $) with SMTP id h0D9LSo05215 for ; Mon, 13 Jan 2003 09:21:28 GMT Received: from FMSMSX018.fm.intel.com ([132.233.42.197]) by fmsmsxvs042.fm.intel.com (NAVGW 2.5.2.11) with SMTP id M2003011301210411544 for ; Mon, 13 Jan 2003 01:21:04 -0800 Received: by fmsmsx018.fm.intel.com with Internet Mail Service (5.5.2653.19) id ; Mon, 13 Jan 2003 01:19:25 -0800 Message-ID: <53A7943A5BD8D411B6930002A5073155036247A2@bgsmsx90.iind.intel.com> From: "Shivaswamy, Aparna" To: "'kdb@oss.sgi.com'" Subject: kdb patch Date: Mon, 13 Jan 2003 01:19:32 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2BAE4.E1E9F030" X-archive-position: 203 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: aparna.shivaswamy@intel.com Precedence: bulk X-list: kdb 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_01C2BAE4.E1E9F030 Content-Type: text/plain HI , I have been trying unsuccessfully to download the kdb patch from the following ftp site : ftp://oss.sgi.com/www/projects/kdb/download/ix86/ Can you please confirm if the site is having any problems. Also, can you please let me know if there are any other ftp sites from which I can download this patch. Thanks and regards, aparna ------_=_NextPart_001_01C2BAE4.E1E9F030 Content-Type: text/html Content-Transfer-Encoding: quoted-printable

HI ,

  I have been trying unsuccessfully to download = the kdb patch from the following ftp site :

ftp://oss.sgi= .com/www/projects/kdb/download/ix86/

Can you please confirm if the site is having any = problems. Also, can you please let me know if there are any other ftp sites from = which I can download this patch.

Thanks and regards,

aparna

------_=_NextPart_001_01C2BAE4.E1E9F030-- From sonic.zhang@intel.com Mon Jan 13 01:24:09 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 13 Jan 2003 01:24:11 -0800 (PST) Received: from caduceus.jf.intel.com (fmr06.intel.com [134.134.136.7]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0D9O83v003011 for ; Mon, 13 Jan 2003 01:24:08 -0800 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by caduceus.jf.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h0D9QVJ18837 for ; Mon, 13 Jan 2003 09:26:31 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by petasus.jf.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.27 2002/10/16 23:46:59 dmccart Exp $) with SMTP id h0D9Qfh28179 for ; Mon, 13 Jan 2003 09:26:41 GMT Received: from pdsmsx17.pd.intel.com ([172.16.12.121]) by pdsmsxvs01.pd.intel.com (NAVGW 2.5.2.11) with SMTP id M2003011317300316884 for ; Mon, 13 Jan 2003 17:30:03 +0800 Received: by pdsmsx17.pd.intel.com with Internet Mail Service (5.5.2653.19) id ; Mon, 13 Jan 2003 17:29:14 +0800 Message-ID: <957BD1C2BF3CD411B6C500A0C944CA2602CB5D02@pdsmsx32.pd.intel.com> From: "Zhang, Sonic" To: "Shivaswamy, Aparna" , "'kdb@oss.sgi.com'" Subject: RE: kdb patch Date: Mon, 13 Jan 2003 17:27:51 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2BAE6.0B147650" X-archive-position: 204 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sonic.zhang@intel.com Precedence: bulk X-list: kdb 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_01C2BAE6.0B147650 Content-Type: text/plain; charset="iso-8859-1" Hi, The maintainer is not here recently. So I try to help you. I can download patches from this site. But they are too old. Please use latest version, such as v2.5. Regards. Sonic Zhang -----Original Message----- From: Shivaswamy, Aparna [mailto:aparna.shivaswamy@intel.com] Sent: 2003?1?13? 17:20 To: 'kdb@oss.sgi.com' Subject: kdb patch HI , I have been trying unsuccessfully to download the kdb patch from the following ftp site : ftp://oss.sgi.com/www/projects/kdb/download/ix86/ Can you please confirm if the site is having any problems. Also, can you please let me know if there are any other ftp sites from which I can download this patch. Thanks and regards, aparna ------_=_NextPart_001_01C2BAE6.0B147650 Content-Type: text/html; charset="iso-8859-1"
Hi,
    The maintainer is not here recently. So I try to help you.
 
    I can download patches from this site.
    But they are too old. Please use latest version, such as v2.5.
 
    Regards.
 
    Sonic Zhang
-----Original Message-----
From: Shivaswamy, Aparna [mailto:aparna.shivaswamy@intel.com]
Sent: 2003年1月13日 17:20
To: 'kdb@oss.sgi.com'
Subject: kdb patch

HI ,

  I have been trying unsuccessfully to download the kdb patch from the following ftp site :

ftp://oss.sgi.com/www/projects/kdb/download/ix86/

Can you please confirm if the site is having any problems. Also, can you please let me know if there are any other ftp sites from which I can download this patch.

Thanks and regards,

aparna

------_=_NextPart_001_01C2BAE6.0B147650-- From bgnaidu@yahoo.com Mon Jan 13 14:37:01 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 13 Jan 2003 14:37:05 -0800 (PST) Received: from web80311.mail.yahoo.com (web80311.mail.yahoo.com [66.218.79.27]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0DMb13v005613 for ; Mon, 13 Jan 2003 14:37:01 -0800 Message-ID: <20030113224300.24104.qmail@web80311.mail.yahoo.com> Received: from [67.112.223.242] by web80311.mail.yahoo.com via HTTP; Mon, 13 Jan 2003 14:43:00 PST Date: Mon, 13 Jan 2003 14:43:00 -0800 (PST) From: naidu bollineni Subject: How to invoke kdb from c source (like Debugger() call in FreeBSD) To: kdb@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 205 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: bgnaidu@yahoo.com Precedence: bulk X-list: kdb Hi, I have been using kdb without much difficulty on an X86 platform over serial line for development. Thanks for the effort. I had past experience with other such tools where they provide a mechanism to invoke debugger from the C source and compile, so that the program enters debugger(kdb) in the event of hitting that code path. Here is an example of how that works: ... if (my_test_condition_is_met) { print something about the condition invoke_debugger() } ... In the above statement, invoke_debugger can be replaced with Debugger() call in FreeBSD, and debug_enter() in case of Solaris. That has the same effect as manually going to kdb and setting a breakpoint in that area. The added advantage is there can be unlimited such invokations anywhere in the code which is difficult for developer to put at the moment of debugging the system. Is it possible to make such a change to the linux debugger kdb as well ? Can you suggest some pieces of code where I can make changes and have such facility. Thanks. __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From kaos@sgi.com Mon Jan 13 14:49:42 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 13 Jan 2003 14:49:44 -0800 (PST) Received: from mail.ocs.com.au (mail.ocs.com.au [203.34.97.2]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0DMnd3v006059 for ; Mon, 13 Jan 2003 14:49:40 -0800 Received: (qmail 22060 invoked from network); 13 Jan 2003 22:55:41 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 13 Jan 2003 22:55:41 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id 79963300087; Tue, 14 Jan 2003 09:55:28 +1100 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id 6B51985; Tue, 14 Jan 2003 09:55:28 +1100 (EST) X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 From: Keith Owens To: naidu bollineni Cc: kdb@oss.sgi.com Subject: Re: How to invoke kdb from c source (like Debugger() call in FreeBSD) In-reply-to: Your message of "Mon, 13 Jan 2003 14:43:00 -0800." <20030113224300.24104.qmail@web80311.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 14 Jan 2003 09:55:23 +1100 Message-ID: <8770.1042498523@ocs3.intra.ocs.com.au> X-archive-position: 206 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Mon, 13 Jan 2003 14:43:00 -0800 (PST), naidu bollineni wrote: >Is it possible to make such a change to the linux >debugger kdb as well ? Can you suggest some pieces of >code where I can make changes and have such facility. KDB_ENTER(); From slurn@verisign.com Mon Jan 13 15:08:44 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 13 Jan 2003 15:08:47 -0800 (PST) Received: from peacock.verisign.com (peacock.verisign.com [65.205.251.73]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0DN8h3v006345 for ; Mon, 13 Jan 2003 15:08:44 -0800 Received: from vhqpostal-gw2.verisign.com (verisign.com [65.205.251.56]) by peacock.verisign.com (8.12.1/) with ESMTP id h0DNEFq4013815; Mon, 13 Jan 2003 15:14:15 -0800 (PST) Received: from slurndal-lnx.verisign.com ([10.25.27.123]) by vhqpostal-gw2.verisign.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id ZHL3RF06; Mon, 13 Jan 2003 15:14:46 -0800 From: Received: by slurndal-lnx.verisign.com; Mon, 13 Jan 2003 15:14:46 -0800 Message-Id: <200301132314.PAA28301@slurndal-lnx.verisign.com> Subject: Re: How to invoke kdb from c source (like Debugger() call in FreeBSD) To: bgnaidu@yahoo.com (naidu bollineni) Date: Mon, 13 Jan 2003 15:14:46 -0800 (PST) Cc: kdb@oss.sgi.com In-Reply-To: from "naidu bollineni" at Jan 13, 2003 02:43:00 PM X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 207 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: slurn@verisign.com Precedence: bulk X-list: kdb > > Hi, > > I have been using kdb without much difficulty on an > X86 platform over serial line for development. Thanks > for the effort. I had past experience with other such > tools where they provide a mechanism to invoke > debugger from the C source and compile, so that the > program enters debugger(kdb) in the event of hitting > that code path. Here is an example of how that works: > .... > if (my_test_condition_is_met) { > print something about the condition > invoke_debugger() This would be the 'KDB_ENTER' macro, see kdb.h. scott From sonic.zhang@intel.com Mon Jan 13 23:13:07 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 13 Jan 2003 23:13:12 -0800 (PST) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0E7D63v017321 for ; Mon, 13 Jan 2003 23:13:07 -0800 Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7]) by hermes.jf.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h0E7HDb20690 for ; Tue, 14 Jan 2003 07:17:13 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by talaria.jf.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.28 2003/01/13 19:44:39 dmccart Exp $) with SMTP id h0E70g124810 for ; Tue, 14 Jan 2003 07:00:43 GMT Received: from pdsmsx17.pd.intel.com ([172.16.12.121]) by pdsmsxvs01.pd.intel.com (NAVGW 2.5.2.11) with SMTP id M2003011415190227752 for ; Tue, 14 Jan 2003 15:19:02 +0800 Received: by pdsmsx17.pd.intel.com with Internet Mail Service (5.5.2653.19) id ; Tue, 14 Jan 2003 15:18:12 +0800 Message-ID: <957BD1C2BF3CD411B6C500A0C944CA2602CB5F72@pdsmsx32.pd.intel.com> From: "Zhang, Sonic" To: "KDB (E-mail)" Subject: [Doc] KDB basic test cases Date: Tue, 14 Jan 2003 15:16:46 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C2BB9C.E5AE68A0" X-archive-position: 208 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sonic.zhang@intel.com Precedence: bulk X-list: kdb 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_000_01C2BB9C.E5AE68A0 Content-Type: text/plain; charset="gb2312" Hi, I have composed a document of KDB basic test cases. I also attachment the source code of all tools required by these test cases. Please take a look. Thank you. ************************************* Sonic Zhang Software Engineer Intel China Software Lab Tel: 021-52574545-1667 iNet: 8-752-1667 ************************************* ------_=_NextPart_000_01C2BB9C.E5AE68A0 Content-Type: application/octet-stream; name="kdbtesttools.tar.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="kdbtesttools.tar.gz" H4sIACC5Iz4AA+1abVPbSBLOV6mK/9Axya1tDJZsyU7weqtShiTUAtkK7O1dZSlWlkbxrGXJJclg ssV/3+7RyJY4A7k7x9zWzVOApJmenp5+U4+GsTdMWZKmURQkzWffBoZhGV3bxqvA3Wt23+2YRrdt WW28N1ttw34G9jeSp4RZkjoxwLM4itKH6B7r/4tiXLS/GzvJaP1e8O/Yv010Ztsy28r+m8AK+4u/ e+765jBM4yH7mx27ndu/3UXDG6bV6ZjPwFifCPfj/9z+29wPPebD5eWPhx9PD48vL7f0bWzgISu3 sdDjPl4X9CcfDn4+PizTF9ok/ZberMP5iEHIXJYkTnwDI+Z4LAafByyBelPSnKVO6DmxBzyEMYtD FsAk8mY5zTYP3WDmMfg+4OFs3sxI9kY/AACO/oV9FzPwIh5+zkdfR/F45dCM7WLo2ZS53OeuEwQ3 DXDkrFIwKdwBc5AhT0cw+HD69ugdLfTvhx/Pjj6cngnKZh0Vs6Kz3zeX+im0r5TqisUJj8IERcsV CBJbei4PSnMU8pQ7Af/CIEXNFgTmYYr64+ll1latbel/yNbelg4wjfF+XK28Z0EQNUhFgQe7yIUn gD/ETWovmTJnjNr8NazUesLsZHVp35/enB4NUCaNQx9M7NamTsjdauUcUwmI+4IZ3YhMM5tMc14s SBiOuR6hB0DVRCG1Bafcb2iZPlwziFk6i0O0SxiF8IXFEVw5wYw1gKcwYU5IUjsp0OqgXlw8+A7y 9wDdqrgw2SnpXSf8LoUhgyBCp/SEEiGf00B5bhdaHwQ422yK6pqhiB5c47QMTVaakzqIx1WEN242 omyMpRHORlGc5moPuM8g8nGdJTmlym7JA75J/K/I/yfOmFFwrm2OR/K/0ba6mP9tC6s+fPPT+982 bEPl/01gG3Jzgx/F6H5DJ8HoLTmhrg8G/c+uq2P4D94ev3l3Bvt92P0FMybsHmQ5AW+Wrwt8OD46 /fkfOlLsa1pWUES6vO7LBheasyRuyjzYzNKgzIF7I8wJL6qDQQ1eVBfT1hbTyRS060LOazeCfB5d BN4+cognsOtDfS96ajX/z6IU/x6/4h4z1r0D+Lr6X8Z/p0v1f6dtqfp/E1hp/+xKL9u1bAMey/9G N7O/0W7ZnTbZv2Pia0Dl/w2AasOJw8NqTf8D6zmqFBu/93RN137vGz1Z4UETsE3XFnWRfvvUcius Byvjf80V4GPxb7eX9V/Lov2/3eq2VPxvArKyOz7oB96d+g4LurOTn0Q1h9dCgVco+o6wbBvKHXXS /G0WOhMGu/FvzeGMB15e2+W14oeWrr9FvxJUfVi+ZnRRKWKpl/fWdG2buaOoVP3peoGgRI1FH1aL xwdYIMZUCRa6ymRaiQfWoqVuV9NXFp1umWpZYGb15b2zwbfZs60TpfiXD09T/8nvv+L7f7trqfpv I1hp/43nf+tO/WdbZkfl/03gKfM/+Rq6nEr+T4iV8S8Ns64zoEfi3+rY3UX+F3tB07Y7av+3Edx7 rnL/sYlOX8O5DzO4dnC/mEYikMVX7PzT/1U0ZkChDQAYD8OAZWcME8eNIzj55+Xg45vBj3q9SbyW 5yPl9v790MXHyiAg/o6fslh8vy+chjSoZylHQ5wC6BomoclNdB0GHAW2zQ5MPCLEJSSj6BooSQke yWdqJgL5eT7y/YSl+5DwLyzyq7hPru3QfdUdOXGtbpst/QFx+31aETpaitqhEfVMDDo5wLk+XfQ1 3HxXzuUxTBSySqPwnF5H5edRzO5QoIgs9Cr6bW8xT5LGMzddrje9mTJN7vHD2QT39iQJrfUTin/R 0zD/rRoDdZiGbJ72HmO+fPpkXfRK64W6TCk4Gyb+SvHACZueP39eWQ4gAYcpioiURu9BT9CFAqZO nAqHEH44nDbwd/SAPcgYNImUCYl7d55b/8G0jjtOY8dlXzGx35afW3yoipX+YNTINFq+7Oy6CyZa SSNqvN4CnZsRGYYfOiMuEkYsZqUAHKaAk2iak0yqFS2MpsSgdK2QnTXBsPRFR7+VsrWWn4Lm83lm Ay27o787Qigp04IB9vQWHMyqGLxgk+JQYttbku+kgvwhHVNwFCL6K9RaPPmkAzgSQH7Toq9XJZ0U LguN6Fp+NPcy+TWsNJY+W3twfD5anHTnjkHeXTBMQOegkwmlITIQuU2V940e/97q8Z0dMj+yWUYQ v9jLXIHTNIkQzK+W+lGuBqColUYpmfCLWk8jZuRd7X6f18j0pZEinqVlNfKqeyn+Vpxyx7wgG2rk OrRYzDh0ZEnLE8aS9/i6GAONILsUvxk+bG95Wvr1Jl91xirNjiIug5kWOsedpdUivZCR/jVg8sCz ybfNqpk592MWvxOIZFyUg/s3eWJDm4cpQwckg7xFm7O5M5kGdHqd6crxvJglSa66QpZE/zHmnvGq +9r0HBJmMik04C3uml5br2zrTs+OhQ8t2lO9bhl3+16JPsteNc5sadhpWl0ceqDRjCRRvoCRk8CQ sZDSefiZeeTclfP3R2eAP+fvD+Hk7N3zClyPkESc2k+iq+K/J+zRS/2/i69mXRPhNYyd0B2RgiiK ZqUwS5IhCLdbpFbo98GiEMjnLr4zM1bikF0vukxruTsRb4fHhVv8h0Rew8gRqAZ4YTTg5UvmzGkQ NeDDcN6AqmisCR77+W+F2iqNCpFI5tn/RKBFbv8SWwoFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUF BQUFBQUFBQUFBQWFDeBPxlO4lwBQAAA= ------_=_NextPart_000_01C2BB9C.E5AE68A0 Content-Type: text/plain; name="KDB_testcases.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="KDB_testcases.txt" ************************************************************************= **** * KDB basic test cases * * version 0.1 * * Sonic Zhang (sonic.zhang@intel.com) * * 01/14/2002 * ************************************************************************= **** ------------------------------------------------------------------------= ----- Case 001: KDB comes up at kernel boot with "kdb=3Dearly" =09 Steps: 1. Add append=3D"kdb=3Dearly" in the lilo.conf=09 2. Reboot the OS. Expected Result: Enter KDB when kernel starts up. ------------------------------------------------------------------------= ----- Case 002: Enable/disable KDB by "/proc/sys/kernel/kdb" Steps: 1. echo "1|0" > /proc/sys/kernel/kdb'=20 2. Keydown "Pause" after echo the parameter.=09 Expected Result: Enter KDB after echo "1", no response after echo "0". ------------------------------------------------------------------------= ----- Case 003: Operate in KDB via serial console port Steps: 1. Add 'serial =3D 0,9600n8' in file /etc/lilo.conf 2. Add 'append=3D"console=3DttyS0,9600"' in file /etc/lilo.conf 3. Add 'S1:23:respawn:/sbin/getty -L ttyS1 9600 vt100' in file = /etc/inittab 4. Connect the serial port to the other computer via a serial cable. 5. Run a terminate tool on the other computer and start the connection. 6. reboot the computer with KDB 7. Enter KDB by "Ctrl-A" on the console of the terminate tool. 8. Run some KDB commands. Expected Result: Enter KDB successfully via the serial port.=20 Can run KDB commands via the serial port. Correct results will be displayed. ------------------------------------------------------------------------= ----- Case 004: KDB comes up through Keyboard. Steps: 1. Activate KDB. 2. Keydown "Pause". 3. Run command "go" to return to console. Expected Result: Enter KDB, return to console after exiting KDB. ------------------------------------------------------------------------= ----- Case 005: KDB comes up before kernel panic. Steps: 1. Compile test module crash.c. 2. Activate KDB. 3. Insert "crash.o" module into the kernel, which brings the OS into = panic. 4. Run command "go" to return to kernel panic. Expected Result: Enter KDB, return to kernel panic after exiting KDB. ------------------------------------------------------------------------= ----- Case 006: KDB comes up before kernel dump. Steps: 1. Turn on/off the Dump option (in the /etc/sysconfig/vmdump). 2. Compile test module "crash.c". 3. Activate KDB. 4. Insert "crash.o" module into the kernel, which will cause kernel = dump. 5. Run command "go" to return to kernel dump.=09 =20 Expected Result: Enter KDB before kernel dump, then return to kernel dump after exiting = KDB. ------------------------------------------------------------------------= ----- Case 001: Command display breakpoint (bl) =09 Steps: (Sample) 1. bp printk 2. bph sched 3. bl Expected Result: Show all breakpoints. ------------------------------------------------------------------------= ----- Case 001: Command enable breakpoint (be) =09 Steps: (Sample) 1. bp printk 2. bd 0 3. bl 4. be 0 5. bl 6. bd * 7. bl 8. be * 9. bl Expected Result: The specified breakpoint is activated. ------------------------------------------------------------------------= ----- Case 001: Command disable breakpoint (bd) =09 Steps: (Sample) 1. bp printk 2. be 0 3. bl 4. bd 0 5. bl 6. be * 7. bl 8. bd * 9. bl Expected Result: The specified breakpoint is deactivated. ------------------------------------------------------------------------= ----- Case 001: Command clear breakpoint (bc) =09 Steps: (Sample) 1. bp printk 2. bp sched 3. bl 4. bc 0 5. bl 6. bp printk 7. bl 8. bc * 9. bl Expected Result: Remove specified breakpoints. ------------------------------------------------------------------------= ----- Case 001: Command set or display breakpoint (bp) =09 Steps:=20 (Sample 1) 1. Enter KDB mode. =20 2. bp[h][a] printk[+0x20] =20 3. go =20 4. insmod testkdb.o =20 (Sample 2) 1. Enter KDB mode =20 2. bph[a] testkdbbph (datar|dataw|io) [4|2|1] 3. go =20 4. rmmod testkdb =20 Expected Result: If instruction pointer equals the break point address or this address is read or written, system traps into KDB. ------------------------------------------------------------------------= ----- Case 001: Command set or display global breakpoint (bpa) =09 Refer to command bp. ------------------------------------------------------------------------= ----- Case 001: Command set or display hardware breakpoint (bph) =09 Refer to command bp. ------------------------------------------------------------------------= ----- Case 001: Command set or display global hardware breakpoint (bpha) =09 Refer to command bp. ------------------------------------------------------------------------= ----- Case 001: Command stack back trace (bt)=09 Steps: (Sample) 1. Compile test module "testkdb.c". 2. Insert test module "testkdb.o" into the kernel. 3. Enter the KDB and set a breakpoint at function f3(). =20 kdb> id f3 0xd085b060 f3mov 0xd085b21c,%eax 0xd085b065 f3+0x5push %ebp 0xd085b066 f3+0x6test %eax,%eax 0xd085b068 f3+0x8mov %esp,%ebp 0xd085b06a f3+0xajle =20 0xd085b07c f3+0x1c 0xd085b06c f3+0xcdec %eax 0xd085b06d f3+0xdmov %eax,0xd085b21c 0xd085b072 f3+0x12call 0xd085b060 f3 0xd085b077 f3+0x17jmp 0xd085b07f f3+0x1f 0xd085b079 f3+0x19lea 0x0(%esi),%esi 0xd085b07c f3+0x1cnop 0xd085b07d f3+0x1dnop 0xd085b07e f3+0x1enop 0xd085b07f f3+0x1fxor %eax,%eax 0xd085b081 f3+0x21pop %ebp 0xd085b082 f3+0x22ret kdb> bp 0xd085b07e Instruction(i) BP #1 at 0xd085b07e ([testkdb]f3+0x1e) is enabled = globally adjust 1 kdb> go 4. Remove the module from the kernel. That will result in a breakpoint. 5. Now we can test the bt command. Entering KDB (current=3D0xc6b14000, pid 1342) due to Breakpoint @ = 0xd085b07d kdb> bt %esp=09 Expected Result: Display call stack detail information. ------------------------------------------------------------------------= ----- Case 001: Command stack backtrace for process (btp)=09 Steps: (Sample) kdb> ps Task Addr Pid Parent [*] cpu State Thread Command 0xc14fe000 00000001 00000000 0 000 stop 0xc14fe260 init 0xc14f0000 00000002 00000001 0 000 stop 0xc14f0260 keventd 0xc14ec000 00000003 00000001 0 000 stop 0xc14ec260 kapm-idled ... kdb> btp 1=09 Expected Result: Display call stack detail information of a specified process. ------------------------------------------------------------------------= ----- Case 001: Command stack backtrace for all processes (bta) =09 Steps: (Sample) kdb> ps Task Addr Pid Parent [*] cpu State Thread Command 0xc14fe000 00000001 00000000 0 000 stop 0xc14fe260 init 0xc14f0000 00000002 00000001 0 000 stop 0xc14f0260 keventd 0xc14ec000 00000003 00000001 0 000 stop 0xc14ec260 kapm-idled ... kdb> bta Expected Result: Display call stack detail information of all processes. ------------------------------------------------------------------------= ----- Case 001: Command display and switch CPUs (cpu) =09 Steps: (Sample) 1. Enter KDB 2. cpu 3. cpu 1 4. go 5. Enter KDB again 6. cpu 7. cpu 0 8. go 9. Enter KDB again 10. cpu 11. cpu 123 (123 is a invalid CPU ID) 12. cpu Expected Result: List all available CPUs with no parameters or switch to the specified = CPU.=20 If the given CPU id is invalid, show error information. ------------------------------------------------------------------------= ----- Case 001: Command display system message (dmesg) =09 Steps: (Sample) 1. dmesg 2. dmesg 5 Expected Result: Display last set of system message from the kernel buffer. If lines is specified, only dump the last lines. ------------------------------------------------------------------------= ----- Case 001: Command define system message (defcmd) =09 Steps: (Sample) 1. defcmd diag "" "Standard diagnostics" 2. set LINES 200 3. cpu 4. ps 5. dmesg 6. endefcmd 7. diag Expected Result: Defines a new command as a set of other commands. All input until endefcmd is saved and executed as a new command.=20 ------------------------------------------------------------------------= ----- Case 001: Command print exception frame (ef)=09 Steps: (Sample) 1. Here we choose the divide_zero exception as an example. 2. After enter the KDB, add breakpoint at do_divide_error. kdb> bp do_divide_error kdb> go 3. Run the program "dividezero", which traps into a divide_zero = exception.=20 4. The system enters KDB again and stop at the breakpoint.=20 5. we dump the stack, the first dword is the return address, the second = one is the exception frame address. kdb> rd eax =3D 0xffffffff ebx =3D 0xce044000 ecx =3D 0x0000002b edx =3D = 0x00000018 esi =3D 0x00000000 edi =3D 0xc0109890 esp =3D 0xce045fb8 eip =3D = 0xc0109890 ... kdb> md %esp 0xce045fb8 c01092a8 ce045fc4 00000000 401519e4 = =A1=A7..=A8=A4?_.?....?..@ 0xce045fd8 bffffa38 00000001 bfff002b 0000002b 8=A8=B2??....+. ?+...? 0xce045fe8 ffffffff 0804844e 00000023 00010292 N...#....... ... kdb> ef 0xce045fc4 eax =3D 0x00000001 ebx =3D 0x401519e4 ecx =3D 0xbffffa30 edx =3D = 0x00000000 esi =3D 0x40016b64 edi =3D 0xbffffaac esp =3D 0xbffffa2c eip =3D = 0x0804844e ebp =3D 0xbffffa38 xss =3D 0x0000002b xcs =3D 0x00000023 eflags =3D = 0x00010292 xds =3D 0xbfff002b xes =3D 0x0000002b origeax =3D 0xffffffff ®s =3D = 0xce045fc4 Expected Result: Print exception frame on the screen, after trap into an exceptioin. ------------------------------------------------------------------------= ----- Case 001: Command show environment (env) =09 Steps: (Sample) 1. env Expected Result: Show environment parameters on the screen. ------------------------------------------------------------------------= ----- Case 001: Command restart execution (go) =09 Steps: (Sample) 1. bp printk 2. go Expected Result: Restart execution. ------------------------------------------------------------------------= ----- Case 001: Command help (help/?) =09 Steps: (Sample) 1. help 2. ? Expected Result: Display help message. ------------------------------------------------------------------------= ----- Case 001: Command disassemble instructions (id) =09 Steps: (Sample) id printk Expected Result: Disassemble instructions from specified address. ------------------------------------------------------------------------= ----- Case 001: Command follow linked lists (ll)=09 Steps: (Sample) In the "testkdb.o" module, we define a simple link list type = myownlisttype=20 and use it to test the ll command. 1. Insert test module "testkdb.o" into the kernel. 2. Enter KDB. 3. ll myownlist 516 md Number 516 is the offset of pointer pnext in struct myownlisttype.=09 Expected Result: Display all items in a linked list in memory. ------------------------------------------------------------------------= ----- Case 001: Command list loaded modules (lsmod) =09 Steps: (Sample) lsmod Expected Result: Display information of all loaded modules. ------------------------------------------------------------------------= ----- Case 001: Command display memory contents (md)=09 Steps: (Sample) Insmod test module "testkdb.o" into the kernel. Entering KDB. kdb> sections testkdb .text 0xd085b060 0xd085b1a4 0x6=20 .rodata 0xd085b1a4 0xd085b208 0x2=20 .data0xd085b208 0xd085b220 0x3=20 .bss 0xd085b320 0xd085bb48 0x3=20 .this 0xd085b000 0xd085b060 0x3=20 .kstrtab 0xd085b220 0xd085b301 0x3=20 ...... kdb> md[2c5] .rodata [4] kdb> md[2c5] 0xd085b1a4 kdb> md[2c5] .rodata+8 kdb> md[2c5] %eax kdb> set DATAHEAD=3D0xd085b1a4 kdb> md[2c5] %DATAHEAD kdb> md[2c5] Expected Result: Display content of memory from specified address. ------------------------------------------------------------------------= ----- Case 001: Command display memory contents with width and count (mdWcN)=09 Refer to command md ------------------------------------------------------------------------= ----- Case 001: Command display raw memory contents (mdr)=09 Insmod test module "testkdb.o" into the kernel. Entering KDB. Steps: (Sample) kdb> sections testkdb .text 0xd085b060 0xd085b1a4 0x6=20 .rodata 0xd085b1a4 0xd085b208 0x2=20 .data0xd085b208 0xd085b220 0x3=20 .bss 0xd085b320 0xd085bb48 0x3=20 .this 0xd085b000 0xd085b060 0x3=20 .kstrtab 0xd085b220 0xd085b301 0x3=20 ...... kdb> mdr .rodata 4 54686973=09 Expected Result: Display the raw contents of memory from specified address for specified number of bytes. ------------------------------------------------------------------------= ----- Case 001: Command display memory contents symbolically (mds)=09 Refer to command md Steps: (Sample) Insmod test module "testkdb.o" into the kernel. Entering KDB. kdb> mds testkdbmsg 0xd0879218 d08791da [testkdb].rodata+0x36 =20 testkdb .rodata 0xd08791a4=20 0xd08791a4 0xd0879208 0xd087921c 00000000 =20 .... 0xd0879220 74736574 test 0xd0879224 0062646b kdb.=09 Expected Result: Display the contents of memory. One word per line and relate each word=20 with a symbol in the symbol table. ------------------------------------------------------------------------= ----- Case 001: Command modify memory contents, words (mm)=09 Steps: (Sample) Insmod test module "testkdb.o" into the kernel. Entering KDB. kdb> md testkdbmsg 0xd0879218 d08791da 00000000 74736574 0062646b =A8=B2..D....testkdb. 0xd0879228 6e695f5f 646f6d73 7365745f 62646b74 __insmod_testkdb ... kdb> md 0xd08791da 0xd08791d8 68740065 69207369 68742073 736d2065 e.this is the ms 0xd08791e8 21212167 0a732500 00732500 73696854 g!!!.%s..%s.This 0xd08791f8 20736920 20656874 6e617262 000a6863 is the branch.. ... kdb> mm 0xd08791da 0x53494854 0xd08791da =3D 0x53494854 kdb> mm 0xd08791da+4 0x20534920 0xd08791de =3D 0x20534920 kdb> mm 0xd08791da+8 0x20454854 0xd08791e2 =3D 0x20454854 kdb> mmW 0xd08791da+12 0x534D 0xd08791e6 =3D 0x534d kdb> mmW 0xd08791da+14 0x2147 0xd08791e8 =3D 0x2147 When removing the module, you will see the output msg=20 "THIS IS THE MSG!!!" instead of "this is the msg!!!" Expected Result: The content of the specified memory is replaced with a new value. ------------------------------------------------------------------------= ----- Case 001: Command modify memory contents of a given width (mmW)=09 Refer the command mm ------------------------------------------------------------------------= ----- Case 001: Command display process status (ps) =09 Steps: (Sample) ps Expected Result: Display all processes. ------------------------------------------------------------------------= ----- Case 001: Command reboot the machine (reboot) =09 Steps: (Sample) reboot Expected Result: Computer restarts. ------------------------------------------------------------------------= ----- Case 001: Command display register contents (rd) =09 Steps: (Sample) 1. rd (entry point) eax =3D 0xffffffff ebx =3D 0xce044000 ecx =3D 0x0000002b edx =3D = 0x00000018 esi =3D 0x00000000 edi =3D 0xc0109890 esp =3D 0xce045fb8 eip =3D = 0xc0109890 2. rd c (entry point) 3. rd d (entry point) 4. rd u (last time the current task enter the kernel) Expected Result: Show all register contents on screen. ------------------------------------------------------------------------= ----- Case 001: Command modify register contents (rm) =09 Steps: (Sample) 1. rm %eax 0 2. rd 3. rm %esi 0x23459123 4. rd 5. rm %dr0 0x23459123 6. rd d 7. rm %%eax 20 8. rd u 9. rd Expected Result: The content of the specified register is replaced with a new value. ------------------------------------------------------------------------= ----- Case 001: Command remove module (rmmod) Steps: (Sample) 1. Insert test module "testkdb.o" into the kernel. 2. Enter KDB. 3. rmmod testkdb 4. go 5. lsmod Expected Result: A module is unloaded. ------------------------------------------------------------------------= ----- Case 001: Command list sections (sections) =09 Steps: (Sample) sections Expected Result: List information for all known sections. The output is one line per module, starting with the module name. ------------------------------------------------------------------------= ----- Case 001: Command add/change environment variable (set)=09 Steps: (Sample) 1. set LINES=3D20 2. env Expected Result: New value is set into a environment parameter. ------------------------------------------------------------------------= ----- Case 001: Command invoke SysReq command (sr)=09 Steps: (Sample) 1. echo "1" > /proc/sys/kernel/sysrq 2. sr p SysRq: Show Regs EIP: 0010:[] CPU: 0 EFLAGS: 00000246 EAX: 00000000 EBX: c0107240 ECX: ceb40000 EDX: 00000032 ESI: c0304000 EDI: c0304000 EBP: c0305fd4 DS: 0018 ES: 0018 CR0: 8005003b CR2: 080d4a0c CR3: 0eb7b000 CR4: 000006d0 Call Trace: [] [] [] Expected Result: Execute the specified command correctly. ------------------------------------------------------------------------= ----- Case 001: Command single step CPU (ss)=09 Steps: (Sample) 1. Enter KDB 2. bp printk 3. go 4. Insert test module "testkdb.o" into the kernel. 5. Execute ss command for 10 times.=09 Expected Result: Execute a single instruction and enter KDB again. ------------------------------------------------------------------------= ----- Case 001: Command single step CPU until branch (ssb)=09 Steps: (Sample) 1. Enter KDB 2. bp printk 3. go 4. Insert test module "testkdb.o" into the kernel. 5. Execute ssb command for 10 times.=09 Expected Result: Execute instructions from current instruction pointer to the first = branch=20 instruction and enter KDB again. ------------------------------------------------------------------------= ----- Case 001: Catch invalid address/reference commands correctly. Steops: For example, test the ef command with a non-suitable.=20 kdb> md 00x00000000=20 kdb: Bad user address=20 0x0kdb> ef 0 eax =3D Unable to handle kernel NULL pointer dereference at virtual = address 0000002c=20 printing=20 eip:c020d99c pgd entry ceb7b000: 0000000000000000 pmd entry ceb7b000: 0000000000000000...=20 pmd not present! kdb: Debugger re-entered on cpu 0, new reason =3D 5 =20 Attempting to abort command and recover=09 Expected Result: If a KDB command breaks and KDB has enough of a recovery environment, KDB should abort the command and drop back into KDB environment. ------------------------------------------------------------------------= ----- ------_=_NextPart_000_01C2BB9C.E5AE68A0-- From aysen@yahoo.com Tue Jan 14 08:04:22 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 14 Jan 2003 08:04:25 -0800 (PST) Received: from ommo.net ([212.253.211.36]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0EG4D3v005578 for ; Tue, 14 Jan 2003 08:04:20 -0800 Message-Id: <200301141604.h0EG4D3v005578@oss.sgi.com> From: "MARAMARA Erotik Market" Reply-To: aysen@yahoo.com To: kdb@oss.sgi.com Date: Tue, 14 Jan 2003 18:10:26 +0200 Subject: BU FIRSATTAN RARARLANIN. X-Mailer: Microsoft Outlook Express 5.00.2919.7000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id h0EG4D3v005578 X-archive-position: 209 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: aysen@yahoo.com Precedence: bulk X-list: kdb DIKKAT VIDEO CD : Iddia ediyoruz.. Hic bir yerden temin edemeyeceginiz ses ve göruntu kalitesi ile yuzlerce porno video CD. arSivimiz yenilenmistir. istemis oldugunuz video CD.ler bire bir yollanir kesinlikle isteginiz harici alakasiz baSka video CD.ler yollanmaz. Anal. Oral. Vajinal. Grup. Zenci. FethiS. Ayak fethiS. Gay. Zenci gay. Trans. Transexual. Lezbiyen ve daha bircok ceSit .... ZENGIN URUN CESITLERIMIZ : Sisme Bebekler ..... (Erkek & Bayan) Kesinlikle size hayir demeyecek. Vibratörler ........ Istediginiz boy ve ebatlarda (Vajinal/Anal/catal.Pilli.Motorlu.TitreSimli) Suni Vajinalar ..... Asla gerceginden ayirt edemeyeceksiniz (Gercek ten hassasiyetinde) Reailistik Penisler. Gercek ten hassasiyetinde ve dokusunda (Vantuzlu/Deri kemer kilotlu) Vakum Pompalari .... Ereksiyonu kolaylastirici ve duzenli kullanimlarda peniste irilesme saglar. Geciktiriciler ..... Erken boSalmayi dert etmeyin (Sprey ceSitleri/Kremler) Kremler ............ Anal ve Vajinal iliSkilerde kullanabileceginiz kayganlaStirici krem ceSitleri Uyandiricilar ...... Cinsel istek uyandirici haplar ve damlalar. Yapmaniz gereken tek Sey TIKLAMAK .. NOT : BU MAIL REKLAM AMAcLI OLUP HIcBIR SEKILDE TARAFIMIZDA KAYDINIZ BULUNMAMAKTADIR. ILGI ALANINIZIN DISINDA ISE EGER LUTFEN DIKKATE ALMAYINIZ TESEKKURLER.. From sonic.zhang@intel.com Wed Jan 15 00:34:03 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 15 Jan 2003 00:34:06 -0800 (PST) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0F8Y13v000614 for ; Wed, 15 Jan 2003 00:34:02 -0800 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by hermes.jf.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h0F8cCC05543 for ; Wed, 15 Jan 2003 08:38:12 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by petasus.jf.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.28 2003/01/13 19:44:39 dmccart Exp $) with SMTP id h0F8ags26371 for ; Wed, 15 Jan 2003 08:36:42 GMT Received: from pdsmsx17.pd.intel.com ([172.16.12.121]) by pdsmsxvs01.pd.intel.com (NAVGW 2.5.2.11) with SMTP id M2003011516400421222 for ; Wed, 15 Jan 2003 16:40:04 +0800 Received: by pdsmsx17.pd.intel.com with Internet Mail Service (5.5.2653.19) id ; Wed, 15 Jan 2003 16:39:13 +0800 Message-ID: <957BD1C2BF3CD411B6C500A0C944CA2602CB62BF@pdsmsx32.pd.intel.com> From: "Zhang, Sonic" To: "KDB (E-mail)" Subject: New update to KDB command line Date: Wed, 15 Jan 2003 16:37:50 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C2BC71.633550C0" X-archive-position: 210 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sonic.zhang@intel.com Precedence: bulk X-list: kdb 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_000_01C2BC71.633550C0 Content-Type: text/plain; charset="gb2312" Hi, I found 2 bugs in my former patch for KDB command line. They are related to the prompt "more>". I fixed them in the new patch. I also changed the logic to print all kernel symbols which start with a given prefix. In the previous implementation, a counter is used to check double "TAB" key. Now, any two continuous "TAB" keys will trigger this function. Could you give me any comments to the "TAB" enhancement of KDB command line? Not any suggestion comes from you since I sent last patch a month ago. Thank you. ************************************* Sonic Zhang Software Engineer Intel China Software Lab Tel: 021-52574545-1667 iNet: 8-752-1667 ************************************* ------_=_NextPart_000_01C2BC71.633550C0 Content-Type: application/octet-stream; name="kdb-cmdline-v2.5-2.4.19-i386-3.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdb-cmdline-v2.5-2.4.19-i386-3.patch" --- linux-kdb/arch/i386/kdb/kdba_io.c Tue Dec 3 13:25:48 2002=0A= +++ linux-kdb-cmdline/arch/i386/kdb/kdba_io.c Wed Jan 15 15:34:39 = 2003=0A= @@ -43,6 +43,7 @@=0A= #include =0A= #include =0A= #include =0A= +#include =0A= =0A= #include =0A= #include =0A= @@ -110,7 +111,6 @@=0A= {=0A= case 0x2:=0A= case 0x20: /* Shift */=0A= - kdb_printf("%c", shift_map[keycode]);=0A= return shift_map[keycode];=0A= case 0x1:=0A= case 0x10: /* Ctrl */=0A= @@ -125,7 +125,6 @@=0A= switch(keycode)=0A= {=0A= case 0x1C: /* Enter */=0A= - kdb_printf("\n");=0A= return 13;=0A= =0A= case 0x3A: /* Capslock */=0A= @@ -134,15 +133,14 @@=0A= case 0x0E: /* Backspace */=0A= return 8;=0A= case 0x0F: /* TAB */=0A= + return 9;=0A= case 0x77: /* Pause */=0A= break ;=0A= default:=0A= if(!usb_lock) {=0A= - kdb_printf("%c", plain_map[keycode]);=0A= return plain_map[keycode];=0A= }=0A= else {=0A= - kdb_printf("%c", shift_map[keycode]);=0A= return shift_map[keycode];=0A= }=0A= }=0A= @@ -219,15 +217,6 @@=0A= ch =3D 8;=0A= if (ch =3D=3D '\t')=0A= ch =3D ' ';=0A= - if (ch =3D=3D 8) { /* BS */=0A= - ;=0A= - } else if (ch =3D=3D 13) { /* Enter */=0A= - kdb_printf("\n");=0A= - } else {=0A= - if (!isprint(ch))=0A= - return(-1);=0A= - kdb_printf("%c", ch);=0A= - }=0A= return ch;=0A= }=0A= return -1;=0A= @@ -335,6 +324,26 @@=0A= return 8;=0A= }=0A= =0A= + // Special Key=0A= + switch (scancode) {=0A= + case 0xF: // Tab=0A= + return 9;=0A= + case 0x53: // Del=0A= + return 4;=0A= + case 0x47: // Home=0A= + return 1;=0A= + case 0x4F: // End=0A= + return 5;=0A= + case 0x4B: // Left=0A= + return 2;=0A= + case 0x48: // Up=0A= + return 16;=0A= + case 0x50: // Down=0A= + return 14;=0A= + case 0x4D: // Right=0A= + return 6;=0A= + }=0A= +=0A= if (scancode =3D=3D 0xe0) {=0A= return -1;=0A= }=0A= @@ -407,11 +416,6 @@=0A= return 13;=0A= }=0A= =0A= - /*=0A= - * echo the character.=0A= - */=0A= - kdb_printf("%c", keychar&0xff);=0A= -=0A= return keychar & 0xff;=0A= }=0A= #endif /* CONFIG_VT_CONSOLE */=0A= @@ -460,12 +464,61 @@=0A= NULL=0A= };=0A= =0A= +#define CMD_BUFLEN 256=0A= +=0A= +static void kdb_printprompt(void)=0A= +{=0A= +#if defined(CONFIG_SMP)=0A= + kdb_printf(kdbgetenv("PROMPT"), smp_processor_id());=0A= +#else=0A= + kdb_printf(kdbgetenv("PROMPT"));=0A= +#endif=0A= +}=0A= +=0A= +static int kdb_promptlength(void)=0A= +{=0A= +#if defined(CONFIG_SMP)=0A= + char promptstr[30];=0A= + snprintf(promptstr, 30, kdbgetenv("PROMPT"), smp_processor_id());=0A= + return strlen(promptstr);=0A= +#else=0A= + return strlen(kdbgetenv("PROMPT");=0A= +#endif=0A= +}=0A= +=0A= +// The bufsize must >=3D 2 .=0A= +// If bufsize =3D=3D 2, that means this routine returns immediately = after receiving one key.=0A= char *=0A= kdba_read(char *buffer, size_t bufsize)=0A= {=0A= char *cp =3D buffer;=0A= char *bufend =3D buffer+bufsize-2; /* Reserve space for newline and = null byte */=0A= =0A= + char *lastchar;=0A= + char *p_tmp;=0A= + char tmp;=0A= + static char tmpbuffer[CMD_BUFLEN];=0A= + int len =3D strlen(buffer);=0A= + int len_tmp;=0A= + int tab=3D0;=0A= + int count;=0A= + int i;=0A= + int diag, dtab_count;=0A= +=0A= + diag =3D kdbgetintenv("DTABCOUNT",&dtab_count);=0A= + if (diag)=0A= + dtab_count =3D 30;=0A= +=0A= + if (len > 0 ) {=0A= + cp +=3D len;=0A= + if (*(buffer+len-1) =3D=3D '\n')=0A= + cp--;=0A= + }=0A= +=0A= + lastchar =3D cp;=0A= + *cp =3D '\0';=0A= + kdb_printf("%s", buffer);=0A= +=0A= for (;;) {=0A= int key;=0A= get_char_func *f;=0A= @@ -476,26 +529,161 @@=0A= f =3D &poll_funcs[0];=0A= }=0A= key =3D (*f)();=0A= - if (key !=3D -1)=0A= +=0A= + if (key !=3D -1) {=0A= + if (key =3D=3D 9){=0A= + if (dtab_count>0) {=0A= + if(tab<2)++tab;=0A= + }=0A= + }=0A= + else {=0A= + tab =3D 0;=0A= + }=0A= break;=0A= + }=0A= + }=0A= + if (bufsize <=3D 2) {=0A= + *buffer++ =3D (char)key;=0A= + *buffer =3D '\0';=0A= + return buffer;=0A= }=0A= =0A= - /* Echo is done in the low level functions */=0A= switch (key) {=0A= case 8: /* backspace */=0A= if (cp > buffer) {=0A= - kdb_printf("\b \b");=0A= + if (cp < lastchar) {=0A= + memcpy(tmpbuffer, cp, lastchar - cp);=0A= + memcpy(cp-1, tmpbuffer, lastchar - cp);=0A= + }=0A= + *(--lastchar) =3D '\0';=0A= --cp;=0A= + kdb_printf("\b%s \r", cp);=0A= + tmp =3D *cp;=0A= + *cp =3D '\0';=0A= + kdb_printprompt();=0A= + kdb_printf("%s", buffer);=0A= + *cp =3D tmp;=0A= }=0A= break;=0A= - case 10: /* enter */=0A= case 13: /* enter */=0A= - *cp++ =3D '\n';=0A= - *cp++ =3D '\0';=0A= + *lastchar++ =3D '\n';=0A= + *lastchar++ =3D '\0';=0A= + kdb_printf("\n");=0A= return buffer;=0A= + case 4: /* Del */=0A= + if(cp < lastchar) {=0A= + memcpy(tmpbuffer, cp+1, lastchar - cp -1);=0A= + memcpy(cp, tmpbuffer, lastchar - cp -1);=0A= + *(--lastchar) =3D '\0';=0A= + kdb_printf("%s \r", cp);=0A= + tmp =3D *cp;=0A= + *cp =3D '\0';=0A= + kdb_printprompt();=0A= + kdb_printf("%s", buffer);=0A= + *cp =3D tmp;=0A= + }=0A= + break;=0A= + case 1: /* Home */=0A= + if(cp > buffer) {=0A= + kdb_printf("\r");=0A= + kdb_printprompt();=0A= + cp =3D buffer;=0A= + }=0A= + break;=0A= + case 5: /* End */=0A= + if(cp < lastchar) {=0A= + kdb_printf("%s", cp);=0A= + cp =3D lastchar;=0A= + }=0A= + break;=0A= + case 2: /* Left */=0A= + if (cp > buffer) {=0A= + kdb_printf("\b");=0A= + --cp;=0A= + }=0A= + break;=0A= + case 14: /* Down */=0A= + memset(tmpbuffer, ' ', kdb_promptlength()+(lastchar-buffer));=0A= + *(tmpbuffer+kdb_promptlength()+(lastchar-buffer)) =3D '\0';=0A= + kdb_printf("\r%s\r", tmpbuffer);=0A= + *lastchar =3D (char)key;=0A= + *(lastchar+1) =3D '\0';=0A= + return lastchar;=0A= + case 6: /* Right */=0A= + if (cp < lastchar) {=0A= + kdb_printf("%c", *cp);=0A= + ++cp;=0A= + }=0A= + break;=0A= + case 16: /* Up */=0A= + memset(tmpbuffer, ' ', kdb_promptlength()+(lastchar-buffer));=0A= + *(tmpbuffer+kdb_promptlength()+(lastchar-buffer)) =3D '\0';=0A= + kdb_printf("\r%s\r", tmpbuffer);=0A= + *lastchar =3D (char)key;=0A= + *(lastchar+1) =3D '\0';=0A= + return lastchar;=0A= + case 9: /* Tab */=0A= + p_tmp =3D buffer;=0A= + while(*p_tmp=3D=3D' ') p_tmp++;=0A= + if (p_tmp<=3Dcp) {=0A= + memcpy(tmpbuffer, p_tmp, cp-p_tmp);=0A= + *(tmpbuffer + (cp-p_tmp)) =3D '\0';=0A= + p_tmp =3D strrchr(tmpbuffer, ' ');=0A= + if (p_tmp !=3D NULL) {=0A= + ++p_tmp;=0A= + len =3D strlen(p_tmp);=0A= + if (tab =3D=3D 2) {=0A= + if((count=3Dkallsyms_symbol_complete(p_tmp))>0) {=0A= + kdb_printf("\n%d symbols are found.", count);=0A= + if(count>dtab_count) {=0A= + count=3Ddtab_count;=0A= + kdb_printf(" But only first %d symbols will be printed.\nYou = can change the environment variable DTABCOUNT.", count);=0A= + }=0A= + kdb_printf("\n");=0A= + for(i=3D0;i=3Ddtab_count)kdb_printf("...");=0A= + kdb_printf("\n");=0A= + kdb_printprompt();=0A= + kdb_printf("%s", buffer);=0A= + }=0A= + }=0A= + else {=0A= + if(kallsyms_symbol_complete(p_tmp)>0) {=0A= + len_tmp =3D strlen(p_tmp);=0A= + strncpy(p_tmp+len_tmp,cp, lastchar-cp+1);=0A= + len_tmp =3D strlen(p_tmp);=0A= + strncpy(cp, p_tmp+len, len_tmp-len+1);=0A= + len =3D len_tmp - len;=0A= + kdb_printf("%s", cp);=0A= + cp+=3Dlen;=0A= + lastchar+=3Dlen;=0A= + }=0A= + }=0A= + kdb_nextline =3D 1; // reset output line number=0A= + }=0A= + }=0A= + break;=0A= default:=0A= - if (cp < bufend)=0A= - *cp++ =3D key;=0A= + if (key >=3D 32 &&lastchar < bufend) {=0A= + if (cp < lastchar) {=0A= + memcpy(tmpbuffer, cp, lastchar - cp);=0A= + memcpy(cp+1, tmpbuffer, lastchar - cp);=0A= + }=0A= + *(++lastchar) =3D '\0';=0A= + *cp =3D key;=0A= + kdb_printf("%s\r", cp);=0A= + ++cp;=0A= + tmp =3D *cp;=0A= + *cp =3D '\0';=0A= + kdb_printprompt();=0A= + kdb_printf("%s", buffer);=0A= + *cp =3D tmp;=0A= + }=0A= break;=0A= }=0A= }=0A= ------_=_NextPart_000_01C2BC71.633550C0 Content-Type: application/octet-stream; name="kdb-cmdline-v2.5-2.4.19-common-3.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdb-cmdline-v2.5-2.4.19-common-3.patch" --- linux-kdb/kdb/kdbmain.c Fri Dec 20 14:13:57 2002=0A= +++ linux-kdb-cmdline/kdb/kdbmain.c Fri Dec 20 14:27:42 2002=0A= @@ -157,7 +157,7 @@=0A= "MDCOUNT=3D8", /* lines of md output */=0A= "BTARGS=3D5", /* 5 possible args in bt */=0A= KDB_PLATFORM_ENV,=0A= - (char *)0,=0A= + "DTABCOUNT=3D30",=0A= (char *)0,=0A= (char *)0,=0A= (char *)0,=0A= @@ -691,7 +691,7 @@=0A= */=0A= #define KDB_CMD_HISTORY_COUNT 32=0A= #define CMD_BUFLEN 200 /* kdb_printf: max printline size =3D=3D 256 = */=0A= -static unsigned int cmd_head, cmd_tail;=0A= +static unsigned int cmd_head=3D0, cmd_tail=3D0;=0A= static unsigned int cmdptr;=0A= static char cmd_hist[KDB_CMD_HISTORY_COUNT][CMD_BUFLEN];=0A= =0A= @@ -887,22 +887,22 @@=0A= #define CTRL_N 14=0A= =0A= /* initial situation */=0A= - if (cmd_head =3D=3D cmd_tail) return 1;=0A= + if (cmd_head =3D=3D cmd_tail) return 0;=0A= =0A= switch(*cmd) {=0A= - case '\n':=0A= case CTRL_P:=0A= if (cmdptr !=3D cmd_tail)=0A= cmdptr =3D (cmdptr-1) % KDB_CMD_HISTORY_COUNT;=0A= - strcpy(cmd, cmd_hist[cmdptr]);=0A= - return 0; =0A= + strncpy(cmd_hist[cmd_head], cmd_hist[cmdptr], CMD_BUFLEN);=0A= + return 1;=0A= case CTRL_N:=0A= + if (cmdptr =3D=3D cmd_head) return 0;=0A= if (cmdptr !=3D (cmd_head-1))=0A= cmdptr =3D (cmdptr+1) % KDB_CMD_HISTORY_COUNT;=0A= - strcpy(cmd, cmd_hist[cmdptr]);=0A= - return 0;=0A= + strncpy(cmd_hist[cmd_head], cmd_hist[cmdptr], CMD_BUFLEN);=0A= + return 1;=0A= }=0A= - return 1;=0A= + return 0;=0A= }=0A= =0A= =0A= @@ -998,7 +998,7 @@=0A= return KDB_CMD_GO;=0A= }=0A= break;=0A= - case KDB_REASON_CALL: =0A= + case KDB_REASON_CALL:=0A= if (!regs)=0A= kdb_printf("kdb() called with no registers, restricted = function\n");=0A= break;=0A= @@ -1059,6 +1059,10 @@=0A= KDB_STATE_SET(LONGJMP);=0A= #endif /* KDB_HAVE_LONGJMP */=0A= =0A= +=0A= + cmdbuf =3D cmd_hist[cmd_head];=0A= + *cmdbuf =3D '\0';=0A= +=0A= do_full_getstr:=0A= #if defined(CONFIG_SMP)=0A= kdb_printf(kdbgetenv("PROMPT"), smp_processor_id());=0A= @@ -1066,15 +1070,15 @@=0A= kdb_printf(kdbgetenv("PROMPT"));=0A= #endif=0A= =0A= - cmdbuf =3D cmd_hist[cmd_head];=0A= - *cmdbuf =3D '\0';=0A= /*=0A= * Fetch command from keyboard=0A= */=0A= cmdbuf =3D kdb_getstr(cmdbuf, CMD_BUFLEN, defcmd_in_progress ? = "[defcmd]" : "");=0A= - if (*cmdbuf < 32 && *cmdbuf !=3D '\n')=0A= - if (handle_ctrl_cmd(cmdbuf))=0A= - goto do_full_getstr;=0A= + if (*cmdbuf < 32 && *cmdbuf !=3D '\n') {=0A= + if (!handle_ctrl_cmd(cmdbuf)) *cmdbuf =3D '\0';=0A= + cmdbuf =3D cmd_hist[cmd_head];=0A= + goto do_full_getstr;=0A= + }=0A= =0A= if (*cmdbuf !=3D '\n') {=0A= cmd_head =3D (cmd_head+1) % KDB_CMD_HISTORY_COUNT;=0A= =0A= =0A= --- linux-kdb/kdb/kdb_io.c Wed Dec 4 16:09:02 2002=0A= +++ linux-kdb-cmdline/kdb/kdb_io.c Wed Jan 15 16:07:26 2003=0A= @@ -206,7 +206,7 @@=0A= =0A= if (kdb_nextline =3D=3D linecount) {=0A= #ifdef KDB_HAVE_LONGJMP=0A= - char buf1[16];=0A= + char buf1[16]=3D"";=0A= #if defined(CONFIG_SMP)=0A= char buf2[32];=0A= #endif=0A= @@ -243,16 +243,19 @@=0A= c->write(c, moreprompt, strlen(moreprompt));=0A= c =3D c->next;=0A= }=0A= +=0A= if (logging)=0A= printk("%s", moreprompt);=0A= =0A= - kdb_read(buf1, sizeof(buf1));=0A= + kdb_read(buf1, 2); // '2' indicates to return immediately after = getting one key.=0A= kdb_nextline =3D 1; /* Really set output line 1 */=0A= =0A= - if ((buf1[0] =3D=3D 'q') || (buf1[0] =3D=3D 'Q'))=0A= + if ((buf1[0] =3D=3D 'q') || (buf1[0] =3D=3D 'Q')) {=0A= do_longjmp =3D 1;=0A= + kdb_printf("\n");=0A= + }=0A= else if (buf1[0] && buf1[0] !=3D '\n')=0A= - kdb_printf("Only 'q' or 'Q' are processed at more prompt, input = ignored\n");=0A= + kdb_printf("\nOnly 'q' or 'Q' are processed at more prompt, input = ignored\n");=0A= #endif /* KDB_HAVE_LONGJMP */=0A= }=0A= =0A= =0A= --- linux-kdb/include/linux/kallsyms.h Fri Dec 20 13:41:45 2002=0A= +++ linux-kdb-cmdline/include/linux/kallsyms.h Fri Dec 20 13:42:14 = 2002=0A= @@ -136,4 +136,12 @@=0A= )=0A= );=0A= =0A= +int kallsyms_symbol_complete(=0A= + char *prefix_name // Prefix of a symbol name to lookup=0A= + );=0A= +int kallsyms_symbol_next(=0A= + char *prefix_name, // Prefix of a symbol name to lookup=0A= + int flag // Indicate if search from the head=0A= + );=0A= +=0A= #endif /* kallsyms.h */=0A= =0A= =0A= --- linux-kdb/kernel/kallsyms.c Fri Dec 20 13:40:49 2002=0A= +++ linux-kdb-cmdline/kernel/kallsyms.c Fri Dec 20 13:42:39 2002=0A= @@ -38,6 +38,7 @@=0A= #include =0A= #include =0A= #include =0A= +#include =0A= =0A= /* These external symbols are only set on kernels compiled with=0A= * CONFIG_KALLSYMS.=0A= @@ -302,3 +303,118 @@=0A= }=0A= return(1);=0A= }=0A= +=0A= +=0A= +// paramter prefix_name is a buffer provided by the caller, it must = ends with '\0'.=0A= +// return the extra string together with the given prefix of a symbol = name.=0A= +// return 0 means no prefix string is found.=0A= +// return >0 means prefix string is found.=0A= +int kallsyms_symbol_complete(=0A= + char *prefix_name // Prefix of a symbol name to lookup=0A= + )=0A= +{=0A= + const struct kallsyms_header *ka_hdr =3D NULL; // stupid gcc=0A= + const struct kallsyms_symbol *ka_sym =3D NULL;=0A= + const char *ka_str =3D NULL;=0A= + const struct module *m;=0A= + int i =3D 0;=0A= + int prefix_len=3Dstrlen(prefix_name);=0A= + int cur_pos=3D0, last_pos=3D0;=0A= + int find=3D0;=0A= + int number=3D0;=0A= + const char *p;=0A= +=0A= + kallsyms_do_first_time();=0A= + if (!kallsyms_module_list)=0A= + return(0);=0A= +=0A= + for (m =3D *kallsyms_module_list; m; m =3D m->next) {=0A= + if (!mod_member_present(m, kallsyms_start) ||=0A= + !mod_member_present(m, kallsyms_end) ||=0A= + m->kallsyms_start >=3D m->kallsyms_end)=0A= + continue;=0A= + ka_hdr =3D (struct kallsyms_header *)m->kallsyms_start;=0A= + ka_sym =3D (struct kallsyms_symbol *)=0A= + ((char *)(ka_hdr) + ka_hdr->symbol_off);=0A= + ka_str =3D=0A= + ((char *)(ka_hdr) + ka_hdr->string_off);=0A= + for (i =3D 0; i < ka_hdr->symbols; ++i, kallsyms_next_sym(ka_hdr, = ka_sym)) {=0A= + p =3D ka_str + ka_sym->name_off;=0A= + if (strncmp(p, prefix_name,prefix_len) =3D=3D 0) {=0A= + ++number;=0A= + if (find =3D=3D 0) {=0A= + last_pos =3D strlen(p);=0A= + strncpy(prefix_name, p, last_pos+1);=0A= + find =3D 1;=0A= + }=0A= + else {=0A= + for (cur_pos =3D prefix_len ; cur_pos < last_pos; cur_pos++) {=0A= + if (*(p + cur_pos) =3D=3D '\0'=0A= + || *(p + cur_pos) !=3D prefix_name[cur_pos]) {=0A= + last_pos =3D cur_pos;=0A= + prefix_name[cur_pos] =3D '\0';=0A= + break;=0A= + }=0A= + }=0A= + }=0A= + }=0A= + }=0A= + }=0A= +=0A= + return number;=0A= +}=0A= +=0A= +// paramter prefix_name is a buffer provided by the caller, it must = ends with '\0'.=0A= +// parameter flag =3D 0 means search from the head, flag =3D 1 means = continue search.=0A= +// return a symbol string which matches the given prefix.=0A= +// return 0 means no prefix string is found.=0A= +// return >0 means prefix string is found.=0A= +int kallsyms_symbol_next(=0A= + char *prefix_name, // Prefix of a symbol name to lookup=0A= + int flag // Indicate if search from the head=0A= + )=0A= +{=0A= + const struct kallsyms_header *ka_hdr =3D NULL; // stupid gcc=0A= + const char *ka_str =3D NULL;=0A= + static const struct kallsyms_symbol *ka_sym;=0A= + static const struct module *m;=0A= + static int i;=0A= + int prefix_len=3Dstrlen(prefix_name);=0A= + const char *p;=0A= +=0A= + kallsyms_do_first_time();=0A= + if (!kallsyms_module_list)=0A= + return(0);=0A= +=0A= + if(!flag) {=0A= + m =3D *kallsyms_module_list;=0A= + }=0A= +=0A= + for (; m; m =3D m->next) {=0A= + if (!mod_member_present(m, kallsyms_start) ||=0A= + !mod_member_present(m, kallsyms_end) ||=0A= + m->kallsyms_start >=3D m->kallsyms_end)=0A= + continue;=0A= + ka_hdr =3D (struct kallsyms_header *)m->kallsyms_start;=0A= + if(!flag) {=0A= + ka_sym =3D (struct kallsyms_symbol *)=0A= + ((char *)(ka_hdr) + ka_hdr->symbol_off);=0A= + i =3D 0;=0A= + }=0A= + ka_str =3D ((char *)(ka_hdr) + ka_hdr->string_off);=0A= +=0A= + for (; i < ka_hdr->symbols; ++i, kallsyms_next_sym(ka_hdr, ka_sym)) = {=0A= + p =3D ka_str + ka_sym->name_off;=0A= + if (strncmp(p, prefix_name,prefix_len) =3D=3D 0) {=0A= + strncpy(prefix_name, p, strlen(p)+1);=0A= + ++i;=0A= + kallsyms_next_sym(ka_hdr, ka_sym);=0A= + return 1;=0A= + }=0A= + }=0A= + }=0A= +=0A= + return 0;=0A= +}=0A= +=0A= +=0A= =0A= ------_=_NextPart_000_01C2BC71.633550C0-- From kaos@sgi.com Wed Jan 15 02:23:22 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 15 Jan 2003 02:23:25 -0800 (PST) Received: from mail.ocs.com.au (mail.ocs.com.au [203.34.97.2]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0FANJ3v006686 for ; Wed, 15 Jan 2003 02:23:21 -0800 Received: (qmail 26304 invoked from network); 15 Jan 2003 10:29:28 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 15 Jan 2003 10:29:28 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id 15AA03000B8; Wed, 15 Jan 2003 21:29:25 +1100 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id EAB6385; Wed, 15 Jan 2003 21:29:25 +1100 (EST) X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 From: Keith Owens To: "Zhang, Sonic" Cc: "KDB (E-mail)" Subject: Re: New update to KDB command line In-reply-to: Your message of "Wed, 15 Jan 2003 16:37:50 +0800." <957BD1C2BF3CD411B6C500A0C944CA2602CB62BF@pdsmsx32.pd.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 15 Jan 2003 21:29:20 +1100 Message-ID: <3098.1042626560@ocs3.intra.ocs.com.au> X-archive-position: 211 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Wed, 15 Jan 2003 16:37:50 +0800, "Zhang, Sonic" wrote: > Could you give me any comments to the "TAB" enhancement of KDB >command line? Not any suggestion comes from you since I sent last patch a >month ago. I was away for 3 weeks and since my return have been flat out working on the Altix 3000 release (NUMA Itanium-2 systems running Linux). I have a backlog of kdb changes to look at after Altix 3000 is stable, your command line changes, tab completion and test cases are all in that kdb backlog. Not enough hours in the day ... From sonic.zhang@intel.com Thu Jan 16 22:28:34 2003 Received: with ECARTIS (v1.0.0; list kdb); Thu, 16 Jan 2003 22:28:36 -0800 (PST) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0H6SX3v014365 for ; Thu, 16 Jan 2003 22:28:33 -0800 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by hermes.jf.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h0H6Wq104862 for ; Fri, 17 Jan 2003 06:32:52 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by petasus.jf.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.28 2003/01/13 19:44:39 dmccart Exp $) with SMTP id h0H6VKR15233 for ; Fri, 17 Jan 2003 06:31:20 GMT Received: from pdsmsx17.pd.intel.com ([172.16.12.121]) by pdsmsxvs01.pd.intel.com (NAVGW 2.5.2.11) with SMTP id M2003011714344418838 for ; Fri, 17 Jan 2003 14:34:44 +0800 Received: by pdsmsx17.pd.intel.com with Internet Mail Service (5.5.2653.19) id ; Fri, 17 Jan 2003 14:33:53 +0800 Message-ID: <957BD1C2BF3CD411B6C500A0C944CA2602CB688B@pdsmsx32.pd.intel.com> From: "Zhang, Sonic" To: "KDB (E-mail)" Cc: "XieMay (E-mail)" , "WangFrank (E-mail)" Subject: [Patch] I port the command line enhancement patch to the IA64 arc hitecture. Date: Fri, 17 Jan 2003 14:32:34 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C2BDF2.38728600" X-archive-position: 212 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sonic.zhang@intel.com Precedence: bulk X-list: kdb 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_000_01C2BDF2.38728600 Content-Type: text/plain; charset="gb2312" Hi, I successfully port my command line enhancement patch to the IA64 architecture. I have tested it on an Itanium platform with Linux kernel 2.4. 19. Please refer to the attachment. This patch is based on kernel 2.4.19 with KDB patch kdb-v2.5-2.4.19 and IA64 patch linux-2.4.19-ia64-020821. It is still without your changes to the serial console. Before porting to IA64, I think code in architecture dependent function kdba_read() is actually architecture independent. So, in order to merge redundant code for each architecture, I delete function kdba_read() and move all code to architecture independent function kdb_read(). I also change some related definition in head file kdbprivate.h accordingly. Do you think it is reasonable or not? Are there any better solutions? Thanks. ************************************* Sonic Zhang Software Engineer Intel China Software Lab Tel: 021-52574545-1667 iNet: 8-752-1667 ************************************* ------_=_NextPart_000_01C2BDF2.38728600 Content-Type: application/octet-stream; name="kdb-cmdline-v2.5-2.4.19-i386-4.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdb-cmdline-v2.5-2.4.19-i386-4.patch" --- linux-kdb/arch/i386/kdb/kdba_io.c Tue Dec 3 13:25:48 2002=0A= +++ linux-kdb-cmdline/arch/i386/kdb/kdba_io.c Fri Jan 17 13:55:55 = 2003=0A= @@ -42,7 +42,6 @@=0A= #include =0A= #include =0A= #include =0A= -#include =0A= =0A= #include =0A= #include =0A= @@ -110,7 +109,6 @@=0A= {=0A= case 0x2:=0A= case 0x20: /* Shift */=0A= - kdb_printf("%c", shift_map[keycode]);=0A= return shift_map[keycode];=0A= case 0x1:=0A= case 0x10: /* Ctrl */=0A= @@ -125,7 +123,6 @@=0A= switch(keycode)=0A= {=0A= case 0x1C: /* Enter */=0A= - kdb_printf("\n");=0A= return 13;=0A= =0A= case 0x3A: /* Capslock */=0A= @@ -134,15 +131,14 @@=0A= case 0x0E: /* Backspace */=0A= return 8;=0A= case 0x0F: /* TAB */=0A= + return 9;=0A= case 0x77: /* Pause */=0A= break ;=0A= default:=0A= if(!usb_lock) {=0A= - kdb_printf("%c", plain_map[keycode]);=0A= return plain_map[keycode];=0A= }=0A= else {=0A= - kdb_printf("%c", shift_map[keycode]);=0A= return shift_map[keycode];=0A= }=0A= }=0A= @@ -219,15 +215,6 @@=0A= ch =3D 8;=0A= if (ch =3D=3D '\t')=0A= ch =3D ' ';=0A= - if (ch =3D=3D 8) { /* BS */=0A= - ;=0A= - } else if (ch =3D=3D 13) { /* Enter */=0A= - kdb_printf("\n");=0A= - } else {=0A= - if (!isprint(ch))=0A= - return(-1);=0A= - kdb_printf("%c", ch);=0A= - }=0A= return ch;=0A= }=0A= return -1;=0A= @@ -335,6 +322,26 @@=0A= return 8;=0A= }=0A= =0A= + // Special Key=0A= + switch (scancode) {=0A= + case 0xF: // Tab=0A= + return 9;=0A= + case 0x53: // Del=0A= + return 4;=0A= + case 0x47: // Home=0A= + return 1;=0A= + case 0x4F: // End=0A= + return 5;=0A= + case 0x4B: // Left=0A= + return 2;=0A= + case 0x48: // Up=0A= + return 16;=0A= + case 0x50: // Down=0A= + return 14;=0A= + case 0x4D: // Right=0A= + return 6;=0A= + }=0A= +=0A= if (scancode =3D=3D 0xe0) {=0A= return -1;=0A= }=0A= @@ -407,11 +414,6 @@=0A= return 13;=0A= }=0A= =0A= - /*=0A= - * echo the character.=0A= - */=0A= - kdb_printf("%c", keychar&0xff);=0A= -=0A= return keychar & 0xff;=0A= }=0A= #endif /* CONFIG_VT_CONSOLE */=0A= @@ -442,9 +444,7 @@=0A= }=0A= #endif=0A= =0A= -typedef int (*get_char_func)(void);=0A= -=0A= -static get_char_func poll_funcs[] =3D {=0A= +get_char_func poll_funcs[] =3D {=0A= #if defined(CONFIG_VT_CONSOLE)=0A= get_kbd_char,=0A= #endif=0A= @@ -460,43 +460,3 @@=0A= NULL=0A= };=0A= =0A= -char *=0A= -kdba_read(char *buffer, size_t bufsize)=0A= -{=0A= - char *cp =3D buffer;=0A= - char *bufend =3D buffer+bufsize-2; /* Reserve space for newline and = null byte */=0A= -=0A= - for (;;) {=0A= - int key;=0A= - get_char_func *f;=0A= - for (f =3D &poll_funcs[0]; ; ++f) {=0A= - if (*f =3D=3D NULL) {=0A= - /* Reset NMI watchdog once per poll loop */=0A= - touch_nmi_watchdog();=0A= - f =3D &poll_funcs[0];=0A= - }=0A= - key =3D (*f)();=0A= - if (key !=3D -1)=0A= - break;=0A= - }=0A= -=0A= - /* Echo is done in the low level functions */=0A= - switch (key) {=0A= - case 8: /* backspace */=0A= - if (cp > buffer) {=0A= - kdb_printf("\b \b");=0A= - --cp;=0A= - }=0A= - break;=0A= - case 10: /* enter */=0A= - case 13: /* enter */=0A= - *cp++ =3D '\n';=0A= - *cp++ =3D '\0';=0A= - return buffer;=0A= - default:=0A= - if (cp < bufend)=0A= - *cp++ =3D key;=0A= - break;=0A= - }=0A= - }=0A= -}=0A= ------_=_NextPart_000_01C2BDF2.38728600 Content-Type: application/octet-stream; name="kdb-cmdline-v2.5-2.4.19-common-4.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdb-cmdline-v2.5-2.4.19-common-4.patch" --- linux-kdb/kdb/kdbmain.c Fri Dec 20 14:13:57 2002=0A= +++ linux-kdb-cmdline/kdb/kdbmain.c Fri Dec 20 14:27:42 2002=0A= @@ -157,7 +157,7 @@=0A= "MDCOUNT=3D8", /* lines of md output */=0A= "BTARGS=3D5", /* 5 possible args in bt */=0A= KDB_PLATFORM_ENV,=0A= - (char *)0,=0A= + "DTABCOUNT=3D30",=0A= (char *)0,=0A= (char *)0,=0A= (char *)0,=0A= @@ -691,7 +691,7 @@=0A= */=0A= #define KDB_CMD_HISTORY_COUNT 32=0A= #define CMD_BUFLEN 200 /* kdb_printf: max printline size =3D=3D 256 = */=0A= -static unsigned int cmd_head, cmd_tail;=0A= +static unsigned int cmd_head=3D0, cmd_tail=3D0;=0A= static unsigned int cmdptr;=0A= static char cmd_hist[KDB_CMD_HISTORY_COUNT][CMD_BUFLEN];=0A= =0A= @@ -887,22 +887,22 @@=0A= #define CTRL_N 14=0A= =0A= /* initial situation */=0A= - if (cmd_head =3D=3D cmd_tail) return 1;=0A= + if (cmd_head =3D=3D cmd_tail) return 0;=0A= =0A= switch(*cmd) {=0A= - case '\n':=0A= case CTRL_P:=0A= if (cmdptr !=3D cmd_tail)=0A= cmdptr =3D (cmdptr-1) % KDB_CMD_HISTORY_COUNT;=0A= - strcpy(cmd, cmd_hist[cmdptr]);=0A= - return 0; =0A= + strncpy(cmd_hist[cmd_head], cmd_hist[cmdptr], CMD_BUFLEN);=0A= + return 1;=0A= case CTRL_N:=0A= + if (cmdptr =3D=3D cmd_head) return 0;=0A= if (cmdptr !=3D (cmd_head-1))=0A= cmdptr =3D (cmdptr+1) % KDB_CMD_HISTORY_COUNT;=0A= - strcpy(cmd, cmd_hist[cmdptr]);=0A= - return 0;=0A= + strncpy(cmd_hist[cmd_head], cmd_hist[cmdptr], CMD_BUFLEN);=0A= + return 1;=0A= }=0A= - return 1;=0A= + return 0;=0A= }=0A= =0A= =0A= @@ -998,7 +998,7 @@=0A= return KDB_CMD_GO;=0A= }=0A= break;=0A= - case KDB_REASON_CALL: =0A= + case KDB_REASON_CALL:=0A= if (!regs)=0A= kdb_printf("kdb() called with no registers, restricted = function\n");=0A= break;=0A= @@ -1059,6 +1059,10 @@=0A= KDB_STATE_SET(LONGJMP);=0A= #endif /* KDB_HAVE_LONGJMP */=0A= =0A= +=0A= + cmdbuf =3D cmd_hist[cmd_head];=0A= + *cmdbuf =3D '\0';=0A= +=0A= do_full_getstr:=0A= #if defined(CONFIG_SMP)=0A= kdb_printf(kdbgetenv("PROMPT"), smp_processor_id());=0A= @@ -1066,15 +1070,15 @@=0A= kdb_printf(kdbgetenv("PROMPT"));=0A= #endif=0A= =0A= - cmdbuf =3D cmd_hist[cmd_head];=0A= - *cmdbuf =3D '\0';=0A= /*=0A= * Fetch command from keyboard=0A= */=0A= cmdbuf =3D kdb_getstr(cmdbuf, CMD_BUFLEN, defcmd_in_progress ? = "[defcmd]" : "");=0A= - if (*cmdbuf < 32 && *cmdbuf !=3D '\n')=0A= - if (handle_ctrl_cmd(cmdbuf))=0A= - goto do_full_getstr;=0A= + if (*cmdbuf < 32 && *cmdbuf !=3D '\n') {=0A= + if (!handle_ctrl_cmd(cmdbuf)) *cmdbuf =3D '\0';=0A= + cmdbuf =3D cmd_hist[cmd_head];=0A= + goto do_full_getstr;=0A= + }=0A= =0A= if (*cmdbuf !=3D '\n') {=0A= cmd_head =3D (cmd_head+1) % KDB_CMD_HISTORY_COUNT;=0A= =0A= =0A= --- linux-kdb/kdb/kdb_io.c Wed Dec 4 16:09:02 2002=0A= +++ linux-kdb-cmdline/kdb/kdb_io.c Wed Jan 17 11:07:26 2003=0A= @@ -42,9 +42,11 @@=0A= #include =0A= #include =0A= #include =0A= +#include =0A= =0A= #include =0A= #include =0A= +#include =0A= =0A= #ifdef CONFIG_SPARC64=0A= #include =0A= @@ -52,6 +54,29 @@=0A= static struct console *kdbcons;=0A= #endif=0A= =0A= +=0A= +#define CMD_BUFLEN 256=0A= +=0A= +static void kdb_printprompt(void)=0A= +{=0A= +#if defined(CONFIG_SMP)=0A= + kdb_printf(kdbgetenv("PROMPT"), smp_processor_id());=0A= +#else=0A= + kdb_printf(kdbgetenv("PROMPT"));=0A= +#endif=0A= +}=0A= +=0A= +static int kdb_promptlength(void)=0A= +{=0A= +#if defined(CONFIG_SMP)=0A= + char promptstr[30];=0A= + snprintf(promptstr, 30, kdbgetenv("PROMPT"), smp_processor_id());=0A= + return strlen(promptstr);=0A= +#else=0A= + return strlen(kdbgetenv("PROMPT");=0A= +#endif=0A= +}=0A= +=0A= /*=0A= * kdb_read=0A= *=0A= @@ -95,10 +120,208 @@=0A= * The bulk of this function is architecture dependent.=0A= */=0A= =0A= +// The bufsize must >=3D 2 .=0A= +// If bufsize =3D=3D 2, that means this routine returns immediately = after receiving one key.=0A= +=0A= char *=0A= kdb_read(char *buffer, size_t bufsize)=0A= {=0A= - return(kdba_read(buffer, bufsize));=0A= + char *cp =3D buffer;=0A= + char *bufend =3D buffer+bufsize-2; /* Reserve space for newline and = null byte */=0A= +=0A= + char *lastchar;=0A= + char *p_tmp;=0A= + char tmp;=0A= + static char tmpbuffer[CMD_BUFLEN];=0A= + int len =3D strlen(buffer);=0A= + int len_tmp;=0A= + int tab=3D0;=0A= + int count;=0A= + int i;=0A= + int diag, dtab_count;=0A= +=0A= + diag =3D kdbgetintenv("DTABCOUNT",&dtab_count);=0A= + if (diag)=0A= + dtab_count =3D 30;=0A= +=0A= + if (len > 0 ) {=0A= + cp +=3D len;=0A= + if (*(buffer+len-1) =3D=3D '\n')=0A= + cp--;=0A= + }=0A= +=0A= + lastchar =3D cp;=0A= + *cp =3D '\0';=0A= + kdb_printf("%s", buffer);=0A= +=0A= + for (;;) {=0A= + int key;=0A= + get_char_func *f;=0A= + for (f =3D &poll_funcs[0]; ; ++f) {=0A= + if (*f =3D=3D NULL) {=0A= + /* Reset NMI watchdog once per poll loop */=0A= + touch_nmi_watchdog();=0A= + f =3D &poll_funcs[0];=0A= + }=0A= + key =3D (*f)();=0A= +=0A= + if (key !=3D -1) {=0A= + if (key =3D=3D 9){=0A= + if (dtab_count>0) {=0A= + if(tab<2)++tab;=0A= + }=0A= + }=0A= + else {=0A= + tab =3D 0;=0A= + }=0A= + break;=0A= + }=0A= + }=0A= + if (bufsize <=3D 2) {=0A= + *buffer++ =3D (char)key;=0A= + *buffer =3D '\0';=0A= + return buffer;=0A= + }=0A= +=0A= + switch (key) {=0A= + case 8: /* backspace */=0A= + if (cp > buffer) {=0A= + if (cp < lastchar) {=0A= + memcpy(tmpbuffer, cp, lastchar - cp);=0A= + memcpy(cp-1, tmpbuffer, lastchar - cp);=0A= + }=0A= + *(--lastchar) =3D '\0';=0A= + --cp;=0A= + kdb_printf("\b%s \r", cp);=0A= + tmp =3D *cp;=0A= + *cp =3D '\0';=0A= + kdb_printprompt();=0A= + kdb_printf("%s", buffer);=0A= + *cp =3D tmp;=0A= + }=0A= + break;=0A= + case 13: /* enter */=0A= + *lastchar++ =3D '\n';=0A= + *lastchar++ =3D '\0';=0A= + kdb_printf("\n");=0A= + return buffer;=0A= + case 4: /* Del */=0A= + if(cp < lastchar) {=0A= + memcpy(tmpbuffer, cp+1, lastchar - cp -1);=0A= + memcpy(cp, tmpbuffer, lastchar - cp -1);=0A= + *(--lastchar) =3D '\0';=0A= + kdb_printf("%s \r", cp);=0A= + tmp =3D *cp;=0A= + *cp =3D '\0';=0A= + kdb_printprompt();=0A= + kdb_printf("%s", buffer);=0A= + *cp =3D tmp;=0A= + }=0A= + break;=0A= + case 1: /* Home */=0A= + if(cp > buffer) {=0A= + kdb_printf("\r");=0A= + kdb_printprompt();=0A= + cp =3D buffer;=0A= + }=0A= + break;=0A= + case 5: /* End */=0A= + if(cp < lastchar) {=0A= + kdb_printf("%s", cp);=0A= + cp =3D lastchar;=0A= + }=0A= + break;=0A= + case 2: /* Left */=0A= + if (cp > buffer) {=0A= + kdb_printf("\b");=0A= + --cp;=0A= + }=0A= + break;=0A= + case 14: /* Down */=0A= + memset(tmpbuffer, ' ', kdb_promptlength()+(lastchar-buffer));=0A= + *(tmpbuffer+kdb_promptlength()+(lastchar-buffer)) =3D '\0';=0A= + kdb_printf("\r%s\r", tmpbuffer);=0A= + *lastchar =3D (char)key;=0A= + *(lastchar+1) =3D '\0';=0A= + return lastchar;=0A= + case 6: /* Right */=0A= + if (cp < lastchar) {=0A= + kdb_printf("%c", *cp);=0A= + ++cp;=0A= + }=0A= + break;=0A= + case 16: /* Up */=0A= + memset(tmpbuffer, ' ', kdb_promptlength()+(lastchar-buffer));=0A= + *(tmpbuffer+kdb_promptlength()+(lastchar-buffer)) =3D '\0';=0A= + kdb_printf("\r%s\r", tmpbuffer);=0A= + *lastchar =3D (char)key;=0A= + *(lastchar+1) =3D '\0';=0A= + return lastchar;=0A= + case 9: /* Tab */=0A= + p_tmp =3D buffer;=0A= + while(*p_tmp=3D=3D' ') p_tmp++;=0A= + if (p_tmp<=3Dcp) {=0A= + memcpy(tmpbuffer, p_tmp, cp-p_tmp);=0A= + *(tmpbuffer + (cp-p_tmp)) =3D '\0';=0A= + p_tmp =3D strrchr(tmpbuffer, ' ');=0A= + if (p_tmp !=3D NULL) {=0A= + ++p_tmp;=0A= + len =3D strlen(p_tmp);=0A= + if (tab =3D=3D 2) {=0A= + if((count=3Dkallsyms_symbol_complete(p_tmp))>0) {=0A= + kdb_printf("\n%d symbols are found.", count);=0A= + if(count>dtab_count) {=0A= + count=3Ddtab_count;=0A= + kdb_printf(" But only first %d symbols will be printed.\nYou = can change the environment variable DTABCOUNT.", count);=0A= + }=0A= + kdb_printf("\n");=0A= + for(i=3D0;i=3Ddtab_count)kdb_printf("...");=0A= + kdb_printf("\n");=0A= + kdb_printprompt();=0A= + kdb_printf("%s", buffer);=0A= + }=0A= + }=0A= + else {=0A= + if(kallsyms_symbol_complete(p_tmp)>0) {=0A= + len_tmp =3D strlen(p_tmp);=0A= + strncpy(p_tmp+len_tmp,cp, lastchar-cp+1);=0A= + len_tmp =3D strlen(p_tmp);=0A= + strncpy(cp, p_tmp+len, len_tmp-len+1);=0A= + len =3D len_tmp - len;=0A= + kdb_printf("%s", cp);=0A= + cp+=3Dlen;=0A= + lastchar+=3Dlen;=0A= + }=0A= + }=0A= + kdb_nextline =3D 1; // reset output line number=0A= + }=0A= + }=0A= + break;=0A= + default:=0A= + if (key >=3D 32 &&lastchar < bufend) {=0A= + if (cp < lastchar) {=0A= + memcpy(tmpbuffer, cp, lastchar - cp);=0A= + memcpy(cp+1, tmpbuffer, lastchar - cp);=0A= + }=0A= + *(++lastchar) =3D '\0';=0A= + *cp =3D key;=0A= + kdb_printf("%s\r", cp);=0A= + ++cp;=0A= + tmp =3D *cp;=0A= + *cp =3D '\0';=0A= + kdb_printprompt();=0A= + kdb_printf("%s", buffer);=0A= + *cp =3D tmp;=0A= + }=0A= + break;=0A= + }=0A= + }=0A= }=0A= =0A= /*=0A= @@ -206,7 +429,7 @@=0A= =0A= if (kdb_nextline =3D=3D linecount) {=0A= #ifdef KDB_HAVE_LONGJMP=0A= - char buf1[16];=0A= + char buf1[16]=3D"";=0A= #if defined(CONFIG_SMP)=0A= char buf2[32];=0A= #endif=0A= @@ -243,16 +466,19 @@=0A= c->write(c, moreprompt, strlen(moreprompt));=0A= c =3D c->next;=0A= }=0A= +=0A= if (logging)=0A= printk("%s", moreprompt);=0A= =0A= - kdb_read(buf1, sizeof(buf1));=0A= + kdb_read(buf1, 2); // '2' indicates to return immediately after = getting one key.=0A= kdb_nextline =3D 1; /* Really set output line 1 */=0A= =0A= - if ((buf1[0] =3D=3D 'q') || (buf1[0] =3D=3D 'Q'))=0A= + if ((buf1[0] =3D=3D 'q') || (buf1[0] =3D=3D 'Q')) {=0A= do_longjmp =3D 1;=0A= + kdb_printf("\n");=0A= + }=0A= else if (buf1[0] && buf1[0] !=3D '\n')=0A= - kdb_printf("Only 'q' or 'Q' are processed at more prompt, input = ignored\n");=0A= + kdb_printf("\nOnly 'q' or 'Q' are processed at more prompt, input = ignored\n");=0A= #endif /* KDB_HAVE_LONGJMP */=0A= }=0A= =0A= =0A= --- linux-kdb/include/linux/kallsyms.h Fri Dec 20 13:41:45 2002=0A= +++ linux-kdb-cmdline/include/linux/kallsyms.h Fri Dec 20 13:42:14 = 2002=0A= @@ -136,4 +136,12 @@=0A= )=0A= );=0A= =0A= +int kallsyms_symbol_complete(=0A= + char *prefix_name // Prefix of a symbol name to lookup=0A= + );=0A= +int kallsyms_symbol_next(=0A= + char *prefix_name, // Prefix of a symbol name to lookup=0A= + int flag // Indicate if search from the head=0A= + );=0A= +=0A= #endif /* kallsyms.h */=0A= =0A= =0A= --- linux-kdb/kernel/kallsyms.c Fri Dec 20 13:40:49 2002=0A= +++ linux-kdb-cmdline/kernel/kallsyms.c Fri Dec 20 13:42:39 2002=0A= @@ -38,6 +38,7 @@=0A= #include =0A= #include =0A= #include =0A= +#include =0A= =0A= /* These external symbols are only set on kernels compiled with=0A= * CONFIG_KALLSYMS.=0A= @@ -302,3 +303,118 @@=0A= }=0A= return(1);=0A= }=0A= +=0A= +=0A= +// paramter prefix_name is a buffer provided by the caller, it must = ends with '\0'.=0A= +// return the extra string together with the given prefix of a symbol = name.=0A= +// return 0 means no prefix string is found.=0A= +// return >0 means prefix string is found.=0A= +int kallsyms_symbol_complete(=0A= + char *prefix_name // Prefix of a symbol name to lookup=0A= + )=0A= +{=0A= + const struct kallsyms_header *ka_hdr =3D NULL; // stupid gcc=0A= + const struct kallsyms_symbol *ka_sym =3D NULL;=0A= + const char *ka_str =3D NULL;=0A= + const struct module *m;=0A= + int i =3D 0;=0A= + int prefix_len=3Dstrlen(prefix_name);=0A= + int cur_pos=3D0, last_pos=3D0;=0A= + int find=3D0;=0A= + int number=3D0;=0A= + const char *p;=0A= +=0A= + kallsyms_do_first_time();=0A= + if (!kallsyms_module_list)=0A= + return(0);=0A= +=0A= + for (m =3D *kallsyms_module_list; m; m =3D m->next) {=0A= + if (!mod_member_present(m, kallsyms_start) ||=0A= + !mod_member_present(m, kallsyms_end) ||=0A= + m->kallsyms_start >=3D m->kallsyms_end)=0A= + continue;=0A= + ka_hdr =3D (struct kallsyms_header *)m->kallsyms_start;=0A= + ka_sym =3D (struct kallsyms_symbol *)=0A= + ((char *)(ka_hdr) + ka_hdr->symbol_off);=0A= + ka_str =3D=0A= + ((char *)(ka_hdr) + ka_hdr->string_off);=0A= + for (i =3D 0; i < ka_hdr->symbols; ++i, kallsyms_next_sym(ka_hdr, = ka_sym)) {=0A= + p =3D ka_str + ka_sym->name_off;=0A= + if (strncmp(p, prefix_name,prefix_len) =3D=3D 0) {=0A= + ++number;=0A= + if (find =3D=3D 0) {=0A= + last_pos =3D strlen(p);=0A= + strncpy(prefix_name, p, last_pos+1);=0A= + find =3D 1;=0A= + }=0A= + else {=0A= + for (cur_pos =3D prefix_len ; cur_pos < last_pos; cur_pos++) {=0A= + if (*(p + cur_pos) =3D=3D '\0'=0A= + || *(p + cur_pos) !=3D prefix_name[cur_pos]) {=0A= + last_pos =3D cur_pos;=0A= + prefix_name[cur_pos] =3D '\0';=0A= + break;=0A= + }=0A= + }=0A= + }=0A= + }=0A= + }=0A= + }=0A= +=0A= + return number;=0A= +}=0A= +=0A= +// paramter prefix_name is a buffer provided by the caller, it must = ends with '\0'.=0A= +// parameter flag =3D 0 means search from the head, flag =3D 1 means = continue search.=0A= +// return a symbol string which matches the given prefix.=0A= +// return 0 means no prefix string is found.=0A= +// return >0 means prefix string is found.=0A= +int kallsyms_symbol_next(=0A= + char *prefix_name, // Prefix of a symbol name to lookup=0A= + int flag // Indicate if search from the head=0A= + )=0A= +{=0A= + const struct kallsyms_header *ka_hdr =3D NULL; // stupid gcc=0A= + const char *ka_str =3D NULL;=0A= + static const struct kallsyms_symbol *ka_sym;=0A= + static const struct module *m;=0A= + static int i;=0A= + int prefix_len=3Dstrlen(prefix_name);=0A= + const char *p;=0A= +=0A= + kallsyms_do_first_time();=0A= + if (!kallsyms_module_list)=0A= + return(0);=0A= +=0A= + if(!flag) {=0A= + m =3D *kallsyms_module_list;=0A= + }=0A= +=0A= + for (; m; m =3D m->next) {=0A= + if (!mod_member_present(m, kallsyms_start) ||=0A= + !mod_member_present(m, kallsyms_end) ||=0A= + m->kallsyms_start >=3D m->kallsyms_end)=0A= + continue;=0A= + ka_hdr =3D (struct kallsyms_header *)m->kallsyms_start;=0A= + if(!flag) {=0A= + ka_sym =3D (struct kallsyms_symbol *)=0A= + ((char *)(ka_hdr) + ka_hdr->symbol_off);=0A= + i =3D 0;=0A= + }=0A= + ka_str =3D ((char *)(ka_hdr) + ka_hdr->string_off);=0A= +=0A= + for (; i < ka_hdr->symbols; ++i, kallsyms_next_sym(ka_hdr, ka_sym)) = {=0A= + p =3D ka_str + ka_sym->name_off;=0A= + if (strncmp(p, prefix_name,prefix_len) =3D=3D 0) {=0A= + strncpy(prefix_name, p, strlen(p)+1);=0A= + ++i;=0A= + kallsyms_next_sym(ka_hdr, ka_sym);=0A= + return 1;=0A= + }=0A= + }=0A= + }=0A= +=0A= + return 0;=0A= +}=0A= +=0A= +=0A= =0A= --- linux-kdb/include/linux/kdbprivate.h Wed Jan 15 17:31:25 2003=0A= +++ linux-kdb-cmdline/include/linux/kdbprivate.h Wed Jan 17 11:55:12 = 2003=0A= @@ -160,7 +160,8 @@=0A= /*=0A= * Architecture specific function to read a string.=0A= */=0A= -extern char * kdba_read(char *, size_t);=0A= +typedef int (*get_char_func)(void);=0A= +extern get_char_func poll_funcs[];=0A= =0A= /*=0A= * Data for a single activation record on stack.=0A= ------_=_NextPart_000_01C2BDF2.38728600 Content-Type: application/octet-stream; name="kdb-cmdline-v2.5-2.4.19-ia64-4.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdb-cmdline-v2.5-2.4.19-ia64-4.patch" --- linux-kdb/arch/ia64/kdb/kdba_io.c Wed Jan 15 17:25:32 2003=0A= +++ linux-kdb-cmdline/arch/ia64/kdb/kdba_io.c Wed Jan 17 11:19:11 = 2003=0A= @@ -42,7 +42,6 @@=0A= #include =0A= #include =0A= #include =0A= -#include =0A= =0A= #include =0A= #include =0A= @@ -113,7 +112,6 @@=0A= {=0A= case 0x2:=0A= case 0x20: /* Shift */=0A= - kdb_printf("%c", shift_map[keycode]);=0A= return shift_map[keycode];=0A= case 0x1:=0A= case 0x10: /* Ctrl */=0A= @@ -128,7 +126,6 @@=0A= switch(keycode)=0A= {=0A= case 0x1C: /* Enter */=0A= - kdb_printf("\n");=0A= return 13;=0A= =0A= case 0x3A: /* Capslock */=0A= @@ -141,11 +138,9 @@=0A= break ;=0A= default:=0A= if(!usb_lock) {=0A= - kdb_printf("%c", plain_map[keycode]);=0A= return plain_map[keycode];=0A= }=0A= else {=0A= - kdb_printf("%c", shift_map[keycode]);=0A= return shift_map[keycode];=0A= }=0A= }=0A= @@ -222,15 +217,6 @@=0A= ch =3D 8;=0A= if (ch =3D=3D '\t')=0A= ch =3D ' ';=0A= - if (ch =3D=3D 8) { /* BS */=0A= - ;=0A= - } else if (ch =3D=3D 13) { /* Enter */=0A= - kdb_printf("\n");=0A= - } else {=0A= - if (!isprint(ch))=0A= - return(-1);=0A= - kdb_printf("%c", ch);=0A= - }=0A= return ch;=0A= }=0A= return -1;=0A= @@ -338,6 +324,26 @@=0A= return 8;=0A= }=0A= =0A= + // Special Key=0A= + switch (scancode) {=0A= + case 0xF: // Tab=0A= + return 9;=0A= + case 0x53: // Del=0A= + return 4;=0A= + case 0x47: // Home=0A= + return 1;=0A= + case 0x4F: // End=0A= + return 5;=0A= + case 0x4B: // Left=0A= + return 2;=0A= + case 0x48: // Up=0A= + return 16;=0A= + case 0x50: // Down=0A= + return 14;=0A= + case 0x4D: // Right=0A= + return 6;=0A= + }=0A= +=0A= if (scancode =3D=3D 0xe0) {=0A= return -1;=0A= }=0A= @@ -410,11 +416,6 @@=0A= return 13;=0A= }=0A= =0A= - /*=0A= - * echo the character.=0A= - */=0A= - kdb_printf("%c", keychar&0xff);=0A= -=0A= return keychar & 0xff;=0A= }=0A= #endif /* CONFIG_VT */=0A= @@ -465,15 +466,6 @@=0A= ch =3D 8;=0A= if (ch =3D=3D '\t')=0A= ch =3D ' ';=0A= - if (ch =3D=3D 8) { /* BS */=0A= - ;=0A= - } else if ((ch =3D=3D 13) || (ch =3D=3D 10)) { /* Enter */=0A= - kdb_printf("\n");=0A= - } else {=0A= - if (!isprint(ch))=0A= - return(-1);=0A= - kdb_printf("%c", ch);=0A= - }=0A= return ch;=0A= }=0A= return -1;=0A= @@ -511,9 +503,7 @@=0A= }=0A= #endif=0A= =0A= -typedef int (*get_char_func)(void);=0A= -=0A= -static get_char_func poll_funcs[] =3D {=0A= +get_char_func poll_funcs[] =3D {=0A= #if defined(CONFIG_VT)=0A= get_kbd_char,=0A= #endif=0A= @@ -531,44 +521,3 @@=0A= #endif=0A= NULL=0A= };=0A= -=0A= -char *=0A= -kdba_read(char *buffer, size_t bufsize)=0A= -{=0A= - char *cp =3D buffer;=0A= - char *bufend =3D buffer+bufsize-2; /* Reserve space for newline and = null byte */=0A= -=0A= - for (;;) {=0A= - int key;=0A= - get_char_func *f;=0A= - for (f =3D &poll_funcs[0]; ; ++f) {=0A= - if (*f =3D=3D NULL) {=0A= - /* Reset NMI watchdog once per poll loop */=0A= - touch_nmi_watchdog();=0A= - f =3D &poll_funcs[0];=0A= - }=0A= - key =3D (*f)();=0A= - if (key !=3D -1)=0A= - break;=0A= - }=0A= -=0A= - /* Echo is done in the low level functions */=0A= - switch (key) {=0A= - case 8: /* backspace */=0A= - if (cp > buffer) {=0A= - kdb_printf("\b \b");=0A= - --cp;=0A= - }=0A= - break;=0A= - case 10: /* enter */=0A= - case 13: /* enter */=0A= - *cp++ =3D '\n';=0A= - *cp++ =3D '\0';=0A= - return buffer;=0A= - default:=0A= - if (cp < bufend)=0A= - *cp++ =3D key;=0A= - break;=0A= - }=0A= - }=0A= -}=0A= ------_=_NextPart_000_01C2BDF2.38728600-- From isabelle@liveisabelle.com Fri Jan 17 11:12:13 2003 Received: with ECARTIS (v1.0.0; list kdb); Fri, 17 Jan 2003 11:12:17 -0800 (PST) Received: from ommo.net ([217.165.58.33]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0HJCB3v032766 for ; Fri, 17 Jan 2003 11:12:12 -0800 Message-Id: <200301171912.h0HJCB3v032766@oss.sgi.com> From: "Isabelle" Reply-To: isabelle@liveisabelle.com To: kdb@oss.sgi.com Date: Fri, 17 Jan 2003 23:08:05 +0400 Subject: Hi Remember me..!!? X-Mailer: Microsoft Outlook Express 5.00.2919.7000 MIME-Version: 1.0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-archive-position: 213 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: isabelle@liveisabelle.com Precedence: bulk X-list: kdb =3Chtml=3E =3Chead=3E =3Ctitle=3EDo you remember me=3F=3C=2Ftitle=3E =3Cmeta http-equiv=3D=22Content-Type=22 content=3D=22text=2Fhtml=3B charset=3Dwindows-1252=22=3E =3C=2Fhead=3E =3Cbody bgcolor=3D=22#FFFFFF=22 text=3D=22#000000=22=3E =3Cfont size=3D=225=22=3E=3Ca href=3D=22http=3A=2F=2Fwww=2Eliveisabelle=2Ecom=22=3Ehttp=3A=2F=2Fwww=2Emyfreelivecam=2Ecom=2Fisabelle=3C=2Fa=3E=3C=2Ffont=3E =3C=2Fbody=3E =3C=2Fhtml=3E From markafterdark@aol.com Sat Jan 18 10:39:54 2003 Received: with ECARTIS (v1.0.0; list kdb); Sat, 18 Jan 2003 10:39:57 -0800 (PST) Received: from 49.46.15.18 (ool-4350a01d.dyn.optonline.net [67.80.160.29]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0IIdn3v020164 for ; Sat, 18 Jan 2003 10:39:51 -0800 Message-Id: <200301181839.h0IIdn3v020164@oss.sgi.com> From: markafterdark To: kdb@oss.sgi.com Reply-To: markafterdark@aol.com Subject: BANDS WANTED FOR NEW YORK TV MUSIC SHOW Date: Sat, 18 Jan 2003 13:46:17 -0500 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="be0eec02-5284-401c-a6e9-465bd3ece32e" X-archive-position: 214 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: markafterdark@aol.com Precedence: bulk X-list: kdb This is a multi-part message in MIME format --be0eec02-5284-401c-a6e9-465bd3ece32e Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable The MARKafterDARK cable rock show is currently seeking bands to feature on = the new spring season of shows. For more details please go to http://www.markafterdark.com (no = emails please) Please note this mail is intended for musicians and bands who have openly = posted their contact email address for the purpose of receiving enquiries. Should you receive this mail and do not fall into this catagory, please = accept our apologies. --be0eec02-5284-401c-a6e9-465bd3ece32e-- From isabelle@liveisabelle.com Sat Jan 18 16:42:53 2003 Received: with ECARTIS (v1.0.0; list kdb); Sat, 18 Jan 2003 16:42:56 -0800 (PST) Received: from ommo.net ([217.165.58.33]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0J0gp3v024078 for ; Sat, 18 Jan 2003 16:42:52 -0800 Message-Id: <200301190042.h0J0gp3v024078@oss.sgi.com> From: "Isabelle" Reply-To: isabelle@liveisabelle.com To: kdb@oss.sgi.com Date: Sun, 19 Jan 2003 04:48:25 +0400 Subject: Hi Remember me..!!? X-Mailer: Microsoft Outlook Express 5.00.2919.7000 MIME-Version: 1.0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-archive-position: 215 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: isabelle@liveisabelle.com Precedence: bulk X-list: kdb =3Chtml=3E =3Chead=3E =3Ctitle=3EDo you remember me=3F=3C=2Ftitle=3E =3Cmeta http-equiv=3D=22Content-Type=22 content=3D=22text=2Fhtml=3B charset=3Dwindows-1252=22=3E =3C=2Fhead=3E =3Cbody bgcolor=3D=22#FFFFFF=22 text=3D=22#000000=22=3E =3Cfont size=3D=225=22=3E=3Ca href=3D=22http=3A=2F=2Fwww=2Eliveisabelle=2Ecom=22=3Ehttp=3A=2F=2Fwww=2Emyfreelivecam=2Ecom=2Fisabelle=3C=2Fa=3E=3C=2Ffont=3E =3C=2Fbody=3E =3C=2Fhtml=3E From kessler@us.ibm.com Tue Jan 21 13:53:48 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 21 Jan 2003 13:53:51 -0800 (PST) Received: from e6.ny.us.ibm.com (e6.ny.us.ibm.com [32.97.182.106]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0LLrk3v020254 for ; Tue, 21 Jan 2003 13:53:48 -0800 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e6.ny.us.ibm.com (8.12.2/8.12.2) with ESMTP id h0LM0Kix272300 for ; Tue, 21 Jan 2003 17:00:20 -0500 Received: from us.ibm.com (dyn9-47-18-221.beaverton.ibm.com [9.47.18.221]) by northrelay04.pok.ibm.com (8.12.3/NCO/VER6.4) with ESMTP id h0LM0HTw190258; Tue, 21 Jan 2003 17:00:17 -0500 Message-ID: <3E2DC2BD.CB489839@us.ibm.com> Date: Tue, 21 Jan 2003 13:59:25 -0800 From: Larry Kessler X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: kdb@oss.sgi.com CC: vamsi@in.ibm.com Subject: 2.4.20 kernel version of kdb ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 216 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kessler@us.ibm.com Precedence: bulk X-list: kdb Hi, Next month SuSE is planning an update release of SLES 8 for the 2.4.20 kernel. IBM has played a role as both contributor to KDB and liason to various Distros who we would like to include features like KDB. What they are requesting, by the end of _this_ week if possible, is answers to the following questions: 1) What is the URL for downloading the latest version ? ftp://oss.sgi.com/www/projects/kdb/download/v2.4/ ...is the URL, but a 2.4.20 version is not posted. 2) If a 2.4.20 version is not available now, when is it projected to be ? 3) Which of the following platforms are/will be supported ? i386 ia64 ppc ppc64 s390 s390x Sorry for the very short notice. I am not certain what SuSE will do if a 2.4.20 version is not provided...drop the feature ?...port it themselves ? If I find out, I'll let you know. Thanks, Larry Kessler IBM Linux Technology Center Beaverton, OR (503) 578-4095 From hch@infradead.org Tue Jan 21 14:02:20 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 21 Jan 2003 14:02:23 -0800 (PST) Received: from phoenix.infradead.org (carisma.slowglass.com [195.224.96.167]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0LM2I3v020304 for ; Tue, 21 Jan 2003 14:02:20 -0800 Received: from hch by phoenix.infradead.org with local (Exim 4.10) id 18b6Zj-00026j-00; Tue, 21 Jan 2003 22:08:55 +0000 Date: Tue, 21 Jan 2003 22:08:55 +0000 From: Christoph Hellwig To: Larry Kessler Cc: kdb@oss.sgi.com, vamsi@in.ibm.com Subject: Re: 2.4.20 kernel version of kdb ? Message-ID: <20030121220855.A7993@infradead.org> References: <3E2DC2BD.CB489839@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3E2DC2BD.CB489839@us.ibm.com>; from kessler@us.ibm.com on Tue, Jan 21, 2003 at 01:59:25PM -0800 X-archive-position: 217 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: kdb On Tue, Jan 21, 2003 at 01:59:25PM -0800, Larry Kessler wrote: > 1) What is the URL for downloading the latest version ? > > ftp://oss.sgi.com/www/projects/kdb/download/v2.4/ > ...is the URL, but a 2.4.20 version is not posted. You could try ftp://oss.sgi.com/www/projects/kdb/download/v2.5 8) > 3) Which of the following platforms are/will be supported ? SGI only releases i386 and ia64 patches as far as I can look back. There are a few other ports outside sgi. > Sorry for the very short notice. I am not certain what SuSE will do if a > 2.4.20 version is not provided...drop the feature ?...port it themselves ? > If I find out, I'll let you know. What about just asking SuSE? :) From kessler@us.ibm.com Tue Jan 21 14:13:03 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 21 Jan 2003 14:13:09 -0800 (PST) Received: from e3.ny.us.ibm.com (e3.ny.us.ibm.com [32.97.182.103]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0LMD23v020395 for ; Tue, 21 Jan 2003 14:13:03 -0800 Received: from northrelay01.pok.ibm.com (northrelay01.pok.ibm.com [9.56.224.149]) by e3.ny.us.ibm.com (8.12.2/8.12.2) with ESMTP id h0LMJ0MI143990; Tue, 21 Jan 2003 17:19:00 -0500 Received: from us.ibm.com (dyn9-47-18-221.beaverton.ibm.com [9.47.18.221]) by northrelay01.pok.ibm.com (8.12.3/NCO/VER6.4) with ESMTP id h0LMIvRJ057996; Tue, 21 Jan 2003 17:18:57 -0500 Message-ID: <3E2DC71D.C1114742@us.ibm.com> Date: Tue, 21 Jan 2003 14:18:05 -0800 From: Larry Kessler X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Christoph Hellwig CC: kdb@oss.sgi.com, vamsi@in.ibm.com Subject: Re: 2.4.20 kernel version of kdb ? References: <3E2DC2BD.CB489839@us.ibm.com> <20030121220855.A7993@infradead.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 218 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kessler@us.ibm.com Precedence: bulk X-list: kdb Christoph Hellwig wrote: > > You could try > > ftp://oss.sgi.com/www/projects/kdb/download/v2.5 8) Yes, its there. Thanks !! > > > 3) Which of the following platforms are/will be supported ? > > SGI only releases i386 and ia64 patches as far as I can look > back. There are a few other ports outside sgi. Vamsi, would you maybe know where these would be ? > > > Sorry for the very short notice. I am not certain what SuSE will do if a > > 2.4.20 version is not provided...drop the feature ?...port it themselves ? > > If I find out, I'll let you know. > > What about just asking SuSE? :) Sure, I will if it becomes necessary. Hopefully all projects already have 2.4.20 patches ;-) From kaos@sgi.com Tue Jan 21 14:15:12 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 21 Jan 2003 14:15:14 -0800 (PST) Received: from mail.ocs.com.au (mail.ocs.com.au [203.34.97.2]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0LMF93v020410 for ; Tue, 21 Jan 2003 14:15:11 -0800 Received: (qmail 26952 invoked from network); 21 Jan 2003 22:21:47 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 21 Jan 2003 22:21:47 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id C4DB83000B8; Wed, 22 Jan 2003 09:21:05 +1100 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id 4927085; Wed, 22 Jan 2003 09:21:05 +1100 (EST) X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Larry Kessler Cc: kdb@oss.sgi.com, vamsi@in.ibm.com Subject: Re: 2.4.20 kernel version of kdb ? In-reply-to: Your message of "Tue, 21 Jan 2003 13:59:25 -0800." <3E2DC2BD.CB489839@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 22 Jan 2003 09:20:59 +1100 Message-ID: <19031.1043187659@ocs3.intra.ocs.com.au> X-archive-position: 219 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Tue, 21 Jan 2003 13:59:25 -0800, Larry Kessler wrote: >1) What is the URL for downloading the latest version ? > > ftp://oss.sgi.com/www/projects/kdb/download/v2.4/ > ...is the URL, but a 2.4.20 version is not posted. See ftp://oss.sgi.com/www/projects/kdb/download/README. v2.4 is the kdb version, not the kernel version. Current kdb is v2.5, v3.0 will be out within 10 days. >3) Which of the following platforms are/will be supported ? > > i386 > ia64 > ppc > ppc64 > s390 > s390x I do patches for i386 and ia64. There are old patches for sparc which are not being maintained (I do not have sparc hardware). Somebody is working on ARM/XScale, but that code is not ready for release yet. People have expressed interest in porting kdb to ppc and s390 but nothing ever came of it. From kessler@us.ibm.com Tue Jan 21 14:31:05 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 21 Jan 2003 14:31:07 -0800 (PST) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0LMV43v020501 for ; Tue, 21 Jan 2003 14:31:04 -0800 Received: from westrelay01.boulder.ibm.com (westrelay01.boulder.ibm.com [9.17.194.22]) by e33.co.us.ibm.com (8.12.2/8.12.2) with ESMTP id h0LMbeY8035712; Tue, 21 Jan 2003 17:37:40 -0500 Received: from us.ibm.com (dyn9-47-18-221.beaverton.ibm.com [9.47.18.221]) by westrelay01.boulder.ibm.com (8.12.3/NCO/VER6.4) with ESMTP id h0LMbdYW029186; Tue, 21 Jan 2003 15:37:39 -0700 Message-ID: <3E2DCB7E.9A57D101@us.ibm.com> Date: Tue, 21 Jan 2003 14:36:46 -0800 From: Larry Kessler X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Keith Owens CC: vamsi@in.ibm.com, kdb@oss.sgi.com Subject: Re: 2.4.20 kernel version of kdb ? References: <19031.1043187659@ocs3.intra.ocs.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 220 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kessler@us.ibm.com Precedence: bulk X-list: kdb Keith Owens wrote: > See ftp://oss.sgi.com/www/projects/kdb/download/README. v2.4 is the > kdb version, not the kernel version. Current kdb is v2.5, v3.0 will be > out within 10 days. Thanks very much, Keith. Yes, I was confusing kernel version and KDB version. > People have expressed interest in porting kdb to ppc and s390 but > nothing ever came of it. Vamsi, do you have any other info about this ? From jim.houston@attbi.com Tue Jan 21 18:59:22 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 21 Jan 2003 18:59:27 -0800 (PST) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0M2xL3v022764 for ; Tue, 21 Jan 2003 18:59:22 -0800 Received: from attbi.com (h00e098094f32.ne.client2.attbi.com[24.60.234.83]) by sccrmhc02.attbi.com (sccrmhc02) with SMTP id <2003011900320000200mlac8e>; Sun, 19 Jan 2003 00:32:00 +0000 Message-ID: <3E29F206.C8D088CB@attbi.com> Date: Sat, 18 Jan 2003 19:32:06 -0500 From: Jim Houston Reply-To: jim.houston@attbi.com X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: kdb@oss.sgi.com Subject: kdb ack_APIC_irq() why? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 221 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jim.houston@attbi.com Precedence: bulk X-list: kdb Hi Everyone, I have been spending too much time reading IA32 System Programming Guide: http://www.intel.com/design/pentium4/manuals/245472.htm in particular section 8.8.5. I believe that kdb may be doing interrupt acknowledge writes to the EOI register which are not needed. It is using NMI delivery, and section 8.8.5 says that the EOI write should not be done for NMI interrupts. I have never seen any problems, but it seems that kdb could be acknowledging random interrupts which don't belong to it. I tried taking the ack_APIC_irq() out of do_ack_apic_irq(), and kdb works correctly. Jim Houston - Concurrent Computer Corp. From sonic.zhang@intel.com Wed Jan 22 01:29:12 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 22 Jan 2003 01:29:18 -0800 (PST) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0M9TB3v024281 for ; Wed, 22 Jan 2003 01:29:12 -0800 Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7]) by hermes.jf.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h0M9XqM13575 for ; Wed, 22 Jan 2003 09:33:52 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by talaria.jf.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.28 2003/01/13 19:44:39 dmccart Exp $) with SMTP id h0M9Gdj11601 for ; Wed, 22 Jan 2003 09:16:40 GMT Received: from pdsmsx17.pd.intel.com ([172.16.12.121]) by pdsmsxvs01.pd.intel.com (NAVGW 2.5.2.11) with SMTP id M2003012217354419801 for ; Wed, 22 Jan 2003 17:35:44 +0800 Received: by pdsmsx17.pd.intel.com with Internet Mail Service (5.5.2653.19) id ; Wed, 22 Jan 2003 17:34:49 +0800 Message-ID: <957BD1C2BF3CD411B6C500A0C944CA2602D9DA4F@pdsmsx32.pd.intel.com> From: "Zhang, Sonic" To: "KDB (E-mail)" Subject: 2 new bugs are fixed for KDB command line enhancement patch Date: Wed, 22 Jan 2003 17:33:34 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C2C1F9.55A465D0" X-archive-position: 222 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sonic.zhang@intel.com Precedence: bulk X-list: kdb 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_000_01C2C1F9.55A465D0 Content-Type: text/plain; charset="gb2312" Hi, I find 2 bugs in the former patch. 1. The extra prompt "[defcmd]" isn't printed, when the user enters the scope of command "defcmd" and "endefcmd". 2. If the user moves into the command line history records, he can't return to the latest command line. That means he can't move out of the history. No architecture dependent code is changed in this update. But the former IA64 and i386 patch files are still attached for integrity. Thanks ************************************* Sonic Zhang Software Engineer Intel China Software Lab Tel: 021-52574545-1667 iNet: 8-752-1667 ************************************* ------_=_NextPart_000_01C2C1F9.55A465D0 Content-Type: application/octet-stream; name="kdb-cmdline-v2.5-2.4.19-i386-5.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdb-cmdline-v2.5-2.4.19-i386-5.patch" --- linux-kdb/arch/i386/kdb/kdba_io.c Tue Dec 3 13:25:48 2002=0A= +++ linux-kdb-cmdline/arch/i386/kdb/kdba_io.c Fri Jan 17 13:55:55 = 2003=0A= @@ -42,7 +42,6 @@=0A= #include =0A= #include =0A= #include =0A= -#include =0A= =0A= #include =0A= #include =0A= @@ -110,7 +109,6 @@=0A= {=0A= case 0x2:=0A= case 0x20: /* Shift */=0A= - kdb_printf("%c", shift_map[keycode]);=0A= return shift_map[keycode];=0A= case 0x1:=0A= case 0x10: /* Ctrl */=0A= @@ -125,7 +123,6 @@=0A= switch(keycode)=0A= {=0A= case 0x1C: /* Enter */=0A= - kdb_printf("\n");=0A= return 13;=0A= =0A= case 0x3A: /* Capslock */=0A= @@ -134,15 +131,14 @@=0A= case 0x0E: /* Backspace */=0A= return 8;=0A= case 0x0F: /* TAB */=0A= + return 9;=0A= case 0x77: /* Pause */=0A= break ;=0A= default:=0A= if(!usb_lock) {=0A= - kdb_printf("%c", plain_map[keycode]);=0A= return plain_map[keycode];=0A= }=0A= else {=0A= - kdb_printf("%c", shift_map[keycode]);=0A= return shift_map[keycode];=0A= }=0A= }=0A= @@ -219,15 +215,6 @@=0A= ch =3D 8;=0A= if (ch =3D=3D '\t')=0A= ch =3D ' ';=0A= - if (ch =3D=3D 8) { /* BS */=0A= - ;=0A= - } else if (ch =3D=3D 13) { /* Enter */=0A= - kdb_printf("\n");=0A= - } else {=0A= - if (!isprint(ch))=0A= - return(-1);=0A= - kdb_printf("%c", ch);=0A= - }=0A= return ch;=0A= }=0A= return -1;=0A= @@ -335,6 +322,26 @@=0A= return 8;=0A= }=0A= =0A= + // Special Key=0A= + switch (scancode) {=0A= + case 0xF: // Tab=0A= + return 9;=0A= + case 0x53: // Del=0A= + return 4;=0A= + case 0x47: // Home=0A= + return 1;=0A= + case 0x4F: // End=0A= + return 5;=0A= + case 0x4B: // Left=0A= + return 2;=0A= + case 0x48: // Up=0A= + return 16;=0A= + case 0x50: // Down=0A= + return 14;=0A= + case 0x4D: // Right=0A= + return 6;=0A= + }=0A= +=0A= if (scancode =3D=3D 0xe0) {=0A= return -1;=0A= }=0A= @@ -407,11 +414,6 @@=0A= return 13;=0A= }=0A= =0A= - /*=0A= - * echo the character.=0A= - */=0A= - kdb_printf("%c", keychar&0xff);=0A= -=0A= return keychar & 0xff;=0A= }=0A= #endif /* CONFIG_VT_CONSOLE */=0A= @@ -442,9 +444,7 @@=0A= }=0A= #endif=0A= =0A= -typedef int (*get_char_func)(void);=0A= -=0A= -static get_char_func poll_funcs[] =3D {=0A= +get_char_func poll_funcs[] =3D {=0A= #if defined(CONFIG_VT_CONSOLE)=0A= get_kbd_char,=0A= #endif=0A= @@ -460,43 +460,3 @@=0A= NULL=0A= };=0A= =0A= -char *=0A= -kdba_read(char *buffer, size_t bufsize)=0A= -{=0A= - char *cp =3D buffer;=0A= - char *bufend =3D buffer+bufsize-2; /* Reserve space for newline and = null byte */=0A= -=0A= - for (;;) {=0A= - int key;=0A= - get_char_func *f;=0A= - for (f =3D &poll_funcs[0]; ; ++f) {=0A= - if (*f =3D=3D NULL) {=0A= - /* Reset NMI watchdog once per poll loop */=0A= - touch_nmi_watchdog();=0A= - f =3D &poll_funcs[0];=0A= - }=0A= - key =3D (*f)();=0A= - if (key !=3D -1)=0A= - break;=0A= - }=0A= -=0A= - /* Echo is done in the low level functions */=0A= - switch (key) {=0A= - case 8: /* backspace */=0A= - if (cp > buffer) {=0A= - kdb_printf("\b \b");=0A= - --cp;=0A= - }=0A= - break;=0A= - case 10: /* enter */=0A= - case 13: /* enter */=0A= - *cp++ =3D '\n';=0A= - *cp++ =3D '\0';=0A= - return buffer;=0A= - default:=0A= - if (cp < bufend)=0A= - *cp++ =3D key;=0A= - break;=0A= - }=0A= - }=0A= -}=0A= ------_=_NextPart_000_01C2C1F9.55A465D0 Content-Type: application/octet-stream; name="kdb-cmdline-v2.5-2.4.19-common-5.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdb-cmdline-v2.5-2.4.19-common-5.patch" --- linux-kdb/kdb/kdbmain.c Fri Dec 20 14:13:57 2002=0A= +++ linux-kdb-cmdline/kdb/kdbmain.c Wed Jan 22 17:07:44 2003=0A= @@ -157,7 +157,7 @@=0A= "MDCOUNT=3D8", /* lines of md output */=0A= "BTARGS=3D5", /* 5 possible args in bt */=0A= KDB_PLATFORM_ENV,=0A= - (char *)0,=0A= + "DTABCOUNT=3D30",=0A= (char *)0,=0A= (char *)0,=0A= (char *)0,=0A= @@ -691,9 +691,10 @@=0A= */=0A= #define KDB_CMD_HISTORY_COUNT 32=0A= #define CMD_BUFLEN 200 /* kdb_printf: max printline size =3D=3D 256 = */=0A= -static unsigned int cmd_head, cmd_tail;=0A= +static unsigned int cmd_head=3D0, cmd_tail=3D0;=0A= static unsigned int cmdptr;=0A= static char cmd_hist[KDB_CMD_HISTORY_COUNT][CMD_BUFLEN];=0A= +static char cmd_cur[CMD_BUFLEN];=0A= =0A= /*=0A= * kdb_parse=0A= @@ -811,7 +812,7 @@=0A= }=0A= }=0A= }=0A= - =0A= +=0A= /*=0A= * If we don't find a command by this name, see if the first=0A= * few characters of this match any of the known commands.=0A= @@ -887,22 +888,21 @@=0A= #define CTRL_N 14=0A= =0A= /* initial situation */=0A= - if (cmd_head =3D=3D cmd_tail) return 1;=0A= + if (cmd_head =3D=3D cmd_tail) return 0;=0A= =0A= switch(*cmd) {=0A= - case '\n':=0A= case CTRL_P:=0A= if (cmdptr !=3D cmd_tail)=0A= cmdptr =3D (cmdptr-1) % KDB_CMD_HISTORY_COUNT;=0A= - strcpy(cmd, cmd_hist[cmdptr]);=0A= - return 0; =0A= + strncpy(cmd_cur, cmd_hist[cmdptr], CMD_BUFLEN);=0A= + return 1;=0A= case CTRL_N:=0A= - if (cmdptr !=3D (cmd_head-1))=0A= + if (cmdptr !=3D cmd_head)=0A= cmdptr =3D (cmdptr+1) % KDB_CMD_HISTORY_COUNT;=0A= - strcpy(cmd, cmd_hist[cmdptr]);=0A= - return 0;=0A= + strncpy(cmd_cur, cmd_hist[cmdptr], CMD_BUFLEN);=0A= + return 1;=0A= }=0A= - return 1;=0A= + return 0;=0A= }=0A= =0A= =0A= @@ -934,6 +934,7 @@=0A= * Remarks:=0A= * none=0A= */=0A= +extern char prompt_str[];=0A= =0A= static int=0A= kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs, = kdb_dbtrap_t db_result)=0A= @@ -998,7 +999,7 @@=0A= return KDB_CMD_GO;=0A= }=0A= break;=0A= - case KDB_REASON_CALL: =0A= + case KDB_REASON_CALL:=0A= if (!regs)=0A= kdb_printf("kdb() called with no registers, restricted = function\n");=0A= break;=0A= @@ -1059,30 +1060,46 @@=0A= KDB_STATE_SET(LONGJMP);=0A= #endif /* KDB_HAVE_LONGJMP */=0A= =0A= +=0A= + cmdbuf =3D cmd_cur;=0A= + *cmdbuf =3D '\0';=0A= + *(cmd_hist[cmd_head])=3D'\0';=0A= +=0A= do_full_getstr:=0A= #if defined(CONFIG_SMP)=0A= - kdb_printf(kdbgetenv("PROMPT"), smp_processor_id());=0A= + snprintf(prompt_str, CMD_BUFLEN, kdbgetenv("PROMPT"), = smp_processor_id());=0A= #else=0A= - kdb_printf(kdbgetenv("PROMPT"));=0A= + snprintf(prompt_str, CMD_BUFLEN, kdbgetenv("PROMPT"));=0A= #endif=0A= + if(defcmd_in_progress)=0A= + strncat(prompt_str, "[defcmd]", CMD_BUFLEN);=0A= =0A= - cmdbuf =3D cmd_hist[cmd_head];=0A= - *cmdbuf =3D '\0';=0A= /*=0A= * Fetch command from keyboard=0A= */=0A= - cmdbuf =3D kdb_getstr(cmdbuf, CMD_BUFLEN, defcmd_in_progress ? = "[defcmd]" : "");=0A= - if (*cmdbuf < 32 && *cmdbuf !=3D '\n')=0A= - if (handle_ctrl_cmd(cmdbuf))=0A= - goto do_full_getstr;=0A= + cmdbuf =3D kdb_getstr(cmdbuf, CMD_BUFLEN, prompt_str);=0A= =0A= if (*cmdbuf !=3D '\n') {=0A= + if (*cmdbuf < 32) {=0A= + if(cmdptr =3D=3D cmd_head) {=0A= + strncpy(cmd_hist[cmd_head], cmd_cur, CMD_BUFLEN);=0A= + *(cmd_hist[cmd_head]+strlen(cmd_hist[cmd_head])-1) =3D '\0';=0A= + }=0A= + if(!handle_ctrl_cmd(cmdbuf))=0A= + *(cmd_cur+strlen(cmd_cur)-1) =3D '\0';=0A= + cmdbuf =3D cmd_cur;=0A= + goto do_full_getstr;=0A= + }=0A= + else=0A= + strncpy(cmd_hist[cmd_head], cmd_cur, CMD_BUFLEN);=0A= +=0A= cmd_head =3D (cmd_head+1) % KDB_CMD_HISTORY_COUNT;=0A= if (cmd_head =3D=3D cmd_tail) cmd_tail =3D (cmd_tail+1) % = KDB_CMD_HISTORY_COUNT;=0A= =0A= }=0A= =0A= cmdptr =3D cmd_head;=0A= + printk(cmdbuf);=0A= diag =3D kdb_parse(cmdbuf, regs);=0A= if (diag =3D=3D KDB_NOTFOUND) {=0A= kdb_printf("Unknown kdb command: '%s'\n", cmdbuf);=0A= =0A= --- linux-kdb/kdb/kdb_io.c Wed Dec 4 16:09:02 2002=0A= +++ linux-kdb-cmdline/kdb/kdb_io.c Wed Jan 22 12:03:11 2003=0A= @@ -42,9 +42,11 @@=0A= #include =0A= #include =0A= #include =0A= +#include =0A= =0A= #include =0A= #include =0A= +#include =0A= =0A= #ifdef CONFIG_SPARC64=0A= #include =0A= @@ -52,6 +54,10 @@=0A= static struct console *kdbcons;=0A= #endif=0A= =0A= +=0A= +#define CMD_BUFLEN 256=0A= +char prompt_str[CMD_BUFLEN];=0A= +=0A= /*=0A= * kdb_read=0A= *=0A= @@ -95,10 +101,208 @@=0A= * The bulk of this function is architecture dependent.=0A= */=0A= =0A= +// The bufsize must >=3D 2 .=0A= +// If bufsize =3D=3D 2, that means this routine returns immediately = after receiving one key.=0A= +=0A= char *=0A= kdb_read(char *buffer, size_t bufsize)=0A= {=0A= - return(kdba_read(buffer, bufsize));=0A= + char *cp =3D buffer;=0A= + char *bufend =3D buffer+bufsize-2; /* Reserve space for newline and = null byte */=0A= +=0A= + char *lastchar;=0A= + char *p_tmp;=0A= + char tmp;=0A= + static char tmpbuffer[CMD_BUFLEN];=0A= + int len =3D strlen(buffer);=0A= + int len_tmp;=0A= + int tab=3D0;=0A= + int count;=0A= + int i;=0A= + int diag, dtab_count;=0A= +=0A= + diag =3D kdbgetintenv("DTABCOUNT",&dtab_count);=0A= + if (diag)=0A= + dtab_count =3D 30;=0A= +=0A= + if (len > 0 ) {=0A= + cp +=3D len;=0A= + if (*(buffer+len-1) =3D=3D '\n')=0A= + cp--;=0A= + }=0A= +=0A= + lastchar =3D cp;=0A= + *cp =3D '\0';=0A= + kdb_printf("%s", buffer);=0A= +=0A= + for (;;) {=0A= + int key;=0A= + get_char_func *f;=0A= + for (f =3D &poll_funcs[0]; ; ++f) {=0A= + if (*f =3D=3D NULL) {=0A= + /* Reset NMI watchdog once per poll loop */=0A= + touch_nmi_watchdog();=0A= + f =3D &poll_funcs[0];=0A= + }=0A= + key =3D (*f)();=0A= +=0A= + if (key !=3D -1) {=0A= + if (key =3D=3D 9){=0A= + if (dtab_count>0) {=0A= + if(tab<2)++tab;=0A= + }=0A= + }=0A= + else {=0A= + tab =3D 0;=0A= + }=0A= + break;=0A= + }=0A= + }=0A= + if (bufsize <=3D 2) {=0A= + *buffer++ =3D (char)key;=0A= + *buffer =3D '\0';=0A= + return buffer;=0A= + }=0A= +=0A= + switch (key) {=0A= + case 8: /* backspace */=0A= + if (cp > buffer) {=0A= + if (cp < lastchar) {=0A= + memcpy(tmpbuffer, cp, lastchar - cp);=0A= + memcpy(cp-1, tmpbuffer, lastchar - cp);=0A= + }=0A= + *(--lastchar) =3D '\0';=0A= + --cp;=0A= + kdb_printf("\b%s \r", cp);=0A= + tmp =3D *cp;=0A= + *cp =3D '\0';=0A= + kdb_printf(prompt_str);=0A= + kdb_printf("%s", buffer);=0A= + *cp =3D tmp;=0A= + }=0A= + break;=0A= + case 13: /* enter */=0A= + *lastchar++ =3D '\n';=0A= + *lastchar++ =3D '\0';=0A= + kdb_printf("\n");=0A= + return buffer;=0A= + case 4: /* Del */=0A= + if(cp < lastchar) {=0A= + memcpy(tmpbuffer, cp+1, lastchar - cp -1);=0A= + memcpy(cp, tmpbuffer, lastchar - cp -1);=0A= + *(--lastchar) =3D '\0';=0A= + kdb_printf("%s \r", cp);=0A= + tmp =3D *cp;=0A= + *cp =3D '\0';=0A= + kdb_printf(prompt_str);=0A= + kdb_printf("%s", buffer);=0A= + *cp =3D tmp;=0A= + }=0A= + break;=0A= + case 1: /* Home */=0A= + if(cp > buffer) {=0A= + kdb_printf("\r");=0A= + kdb_printf(prompt_str);=0A= + cp =3D buffer;=0A= + }=0A= + break;=0A= + case 5: /* End */=0A= + if(cp < lastchar) {=0A= + kdb_printf("%s", cp);=0A= + cp =3D lastchar;=0A= + }=0A= + break;=0A= + case 2: /* Left */=0A= + if (cp > buffer) {=0A= + kdb_printf("\b");=0A= + --cp;=0A= + }=0A= + break;=0A= + case 14: /* Down */=0A= + memset(tmpbuffer, ' ', strlen(prompt_str)+(lastchar-buffer));=0A= + *(tmpbuffer+strlen(prompt_str)+(lastchar-buffer)) =3D '\0';=0A= + kdb_printf("\r%s\r", tmpbuffer);=0A= + *lastchar =3D (char)key;=0A= + *(lastchar+1) =3D '\0';=0A= + return lastchar;=0A= + case 6: /* Right */=0A= + if (cp < lastchar) {=0A= + kdb_printf("%c", *cp);=0A= + ++cp;=0A= + }=0A= + break;=0A= + case 16: /* Up */=0A= + memset(tmpbuffer, ' ', strlen(prompt_str)+(lastchar-buffer));=0A= + *(tmpbuffer+strlen(prompt_str)+(lastchar-buffer)) =3D '\0';=0A= + kdb_printf("\r%s\r", tmpbuffer);=0A= + *lastchar =3D (char)key;=0A= + *(lastchar+1) =3D '\0';=0A= + return lastchar;=0A= + case 9: /* Tab */=0A= + p_tmp =3D buffer;=0A= + while(*p_tmp=3D=3D' ') p_tmp++;=0A= + if (p_tmp<=3Dcp) {=0A= + memcpy(tmpbuffer, p_tmp, cp-p_tmp);=0A= + *(tmpbuffer + (cp-p_tmp)) =3D '\0';=0A= + p_tmp =3D strrchr(tmpbuffer, ' ');=0A= + if (p_tmp !=3D NULL) {=0A= + ++p_tmp;=0A= + len =3D strlen(p_tmp);=0A= + if (tab =3D=3D 2) {=0A= + if((count=3Dkallsyms_symbol_complete(p_tmp))>0) {=0A= + kdb_printf("\n%d symbols are found.", count);=0A= + if(count>dtab_count) {=0A= + count=3Ddtab_count;=0A= + kdb_printf(" But only first %d symbols will be printed.\nYou = can change the environment variable DTABCOUNT.", count);=0A= + }=0A= + kdb_printf("\n");=0A= + for(i=3D0;i=3Ddtab_count)kdb_printf("...");=0A= + kdb_printf("\n");=0A= + kdb_printf(prompt_str);=0A= + kdb_printf("%s", buffer);=0A= + }=0A= + }=0A= + else {=0A= + if(kallsyms_symbol_complete(p_tmp)>0) {=0A= + len_tmp =3D strlen(p_tmp);=0A= + strncpy(p_tmp+len_tmp,cp, lastchar-cp+1);=0A= + len_tmp =3D strlen(p_tmp);=0A= + strncpy(cp, p_tmp+len, len_tmp-len+1);=0A= + len =3D len_tmp - len;=0A= + kdb_printf("%s", cp);=0A= + cp+=3Dlen;=0A= + lastchar+=3Dlen;=0A= + }=0A= + }=0A= + kdb_nextline =3D 1; // reset output line number=0A= + }=0A= + }=0A= + break;=0A= + default:=0A= + if (key >=3D 32 &&lastchar < bufend) {=0A= + if (cp < lastchar) {=0A= + memcpy(tmpbuffer, cp, lastchar - cp);=0A= + memcpy(cp+1, tmpbuffer, lastchar - cp);=0A= + }=0A= + *(++lastchar) =3D '\0';=0A= + *cp =3D key;=0A= + kdb_printf("%s\r", cp);=0A= + ++cp;=0A= + tmp =3D *cp;=0A= + *cp =3D '\0';=0A= + kdb_printf(prompt_str);=0A= + kdb_printf("%s", buffer);=0A= + *cp =3D tmp;=0A= + }=0A= + break;=0A= + }=0A= + }=0A= }=0A= =0A= /*=0A= @@ -123,11 +327,9 @@=0A= char *=0A= kdb_getstr(char *buffer, size_t bufsize, char *prompt)=0A= {=0A= -#if defined(CONFIG_SMP)=0A= - kdb_printf(prompt, smp_processor_id());=0A= -#else=0A= - kdb_printf("%s", prompt);=0A= -#endif=0A= + if(prompt && prompt_str!=3Dprompt)=0A= + strncpy(prompt_str, prompt, CMD_BUFLEN);=0A= + kdb_printf(prompt_str);=0A= kdb_nextline =3D 1; /* Prompt and input resets line number */=0A= return kdb_read(buffer, bufsize);=0A= }=0A= @@ -206,7 +408,7 @@=0A= =0A= if (kdb_nextline =3D=3D linecount) {=0A= #ifdef KDB_HAVE_LONGJMP=0A= - char buf1[16];=0A= + char buf1[16]=3D"";=0A= #if defined(CONFIG_SMP)=0A= char buf2[32];=0A= #endif=0A= @@ -243,16 +445,19 @@=0A= c->write(c, moreprompt, strlen(moreprompt));=0A= c =3D c->next;=0A= }=0A= +=0A= if (logging)=0A= printk("%s", moreprompt);=0A= =0A= - kdb_read(buf1, sizeof(buf1));=0A= + kdb_read(buf1, 2); // '2' indicates to return immediately after = getting one key.=0A= kdb_nextline =3D 1; /* Really set output line 1 */=0A= =0A= - if ((buf1[0] =3D=3D 'q') || (buf1[0] =3D=3D 'Q'))=0A= + if ((buf1[0] =3D=3D 'q') || (buf1[0] =3D=3D 'Q')) {=0A= do_longjmp =3D 1;=0A= + kdb_printf("\n");=0A= + }=0A= else if (buf1[0] && buf1[0] !=3D '\n')=0A= - kdb_printf("Only 'q' or 'Q' are processed at more prompt, input = ignored\n");=0A= + kdb_printf("\nOnly 'q' or 'Q' are processed at more prompt, input = ignored\n");=0A= #endif /* KDB_HAVE_LONGJMP */=0A= }=0A= =0A= =0A= --- linux-kdb/include/linux/kallsyms.h Fri Dec 20 13:41:45 2002=0A= +++ linux-kdb-cmdline/include/linux/kallsyms.h Fri Dec 20 13:42:14 = 2002=0A= @@ -136,4 +136,12 @@=0A= )=0A= );=0A= =0A= +int kallsyms_symbol_complete(=0A= + char *prefix_name // Prefix of a symbol name to lookup=0A= + );=0A= +int kallsyms_symbol_next(=0A= + char *prefix_name, // Prefix of a symbol name to lookup=0A= + int flag // Indicate if search from the head=0A= + );=0A= +=0A= #endif /* kallsyms.h */=0A= =0A= =0A= --- linux-kdb/kernel/kallsyms.c Fri Dec 20 13:40:49 2002=0A= +++ linux-kdb-cmdline/kernel/kallsyms.c Fri Dec 20 13:42:39 2002=0A= @@ -38,6 +38,7 @@=0A= #include =0A= #include =0A= #include =0A= +#include =0A= =0A= /* These external symbols are only set on kernels compiled with=0A= * CONFIG_KALLSYMS.=0A= @@ -302,3 +303,118 @@=0A= }=0A= return(1);=0A= }=0A= +=0A= +=0A= +// paramter prefix_name is a buffer provided by the caller, it must = ends with '\0'.=0A= +// return the extra string together with the given prefix of a symbol = name.=0A= +// return 0 means no prefix string is found.=0A= +// return >0 means prefix string is found.=0A= +int kallsyms_symbol_complete(=0A= + char *prefix_name // Prefix of a symbol name to lookup=0A= + )=0A= +{=0A= + const struct kallsyms_header *ka_hdr =3D NULL; // stupid gcc=0A= + const struct kallsyms_symbol *ka_sym =3D NULL;=0A= + const char *ka_str =3D NULL;=0A= + const struct module *m;=0A= + int i =3D 0;=0A= + int prefix_len=3Dstrlen(prefix_name);=0A= + int cur_pos=3D0, last_pos=3D0;=0A= + int find=3D0;=0A= + int number=3D0;=0A= + const char *p;=0A= +=0A= + kallsyms_do_first_time();=0A= + if (!kallsyms_module_list)=0A= + return(0);=0A= +=0A= + for (m =3D *kallsyms_module_list; m; m =3D m->next) {=0A= + if (!mod_member_present(m, kallsyms_start) ||=0A= + !mod_member_present(m, kallsyms_end) ||=0A= + m->kallsyms_start >=3D m->kallsyms_end)=0A= + continue;=0A= + ka_hdr =3D (struct kallsyms_header *)m->kallsyms_start;=0A= + ka_sym =3D (struct kallsyms_symbol *)=0A= + ((char *)(ka_hdr) + ka_hdr->symbol_off);=0A= + ka_str =3D=0A= + ((char *)(ka_hdr) + ka_hdr->string_off);=0A= + for (i =3D 0; i < ka_hdr->symbols; ++i, kallsyms_next_sym(ka_hdr, = ka_sym)) {=0A= + p =3D ka_str + ka_sym->name_off;=0A= + if (strncmp(p, prefix_name,prefix_len) =3D=3D 0) {=0A= + ++number;=0A= + if (find =3D=3D 0) {=0A= + last_pos =3D strlen(p);=0A= + strncpy(prefix_name, p, last_pos+1);=0A= + find =3D 1;=0A= + }=0A= + else {=0A= + for (cur_pos =3D prefix_len ; cur_pos < last_pos; cur_pos++) {=0A= + if (*(p + cur_pos) =3D=3D '\0'=0A= + || *(p + cur_pos) !=3D prefix_name[cur_pos]) {=0A= + last_pos =3D cur_pos;=0A= + prefix_name[cur_pos] =3D '\0';=0A= + break;=0A= + }=0A= + }=0A= + }=0A= + }=0A= + }=0A= + }=0A= +=0A= + return number;=0A= +}=0A= +=0A= +// paramter prefix_name is a buffer provided by the caller, it must = ends with '\0'.=0A= +// parameter flag =3D 0 means search from the head, flag =3D 1 means = continue search.=0A= +// return a symbol string which matches the given prefix.=0A= +// return 0 means no prefix string is found.=0A= +// return >0 means prefix string is found.=0A= +int kallsyms_symbol_next(=0A= + char *prefix_name, // Prefix of a symbol name to lookup=0A= + int flag // Indicate if search from the head=0A= + )=0A= +{=0A= + const struct kallsyms_header *ka_hdr =3D NULL; // stupid gcc=0A= + const char *ka_str =3D NULL;=0A= + static const struct kallsyms_symbol *ka_sym;=0A= + static const struct module *m;=0A= + static int i;=0A= + int prefix_len=3Dstrlen(prefix_name);=0A= + const char *p;=0A= +=0A= + kallsyms_do_first_time();=0A= + if (!kallsyms_module_list)=0A= + return(0);=0A= +=0A= + if(!flag) {=0A= + m =3D *kallsyms_module_list;=0A= + }=0A= +=0A= + for (; m; m =3D m->next) {=0A= + if (!mod_member_present(m, kallsyms_start) ||=0A= + !mod_member_present(m, kallsyms_end) ||=0A= + m->kallsyms_start >=3D m->kallsyms_end)=0A= + continue;=0A= + ka_hdr =3D (struct kallsyms_header *)m->kallsyms_start;=0A= + if(!flag) {=0A= + ka_sym =3D (struct kallsyms_symbol *)=0A= + ((char *)(ka_hdr) + ka_hdr->symbol_off);=0A= + i =3D 0;=0A= + }=0A= + ka_str =3D ((char *)(ka_hdr) + ka_hdr->string_off);=0A= +=0A= + for (; i < ka_hdr->symbols; ++i, kallsyms_next_sym(ka_hdr, ka_sym)) = {=0A= + p =3D ka_str + ka_sym->name_off;=0A= + if (strncmp(p, prefix_name,prefix_len) =3D=3D 0) {=0A= + strncpy(prefix_name, p, strlen(p)+1);=0A= + ++i;=0A= + kallsyms_next_sym(ka_hdr, ka_sym);=0A= + return 1;=0A= + }=0A= + }=0A= + }=0A= +=0A= + return 0;=0A= +}=0A= +=0A= +=0A= =0A= --- linux-kdb/include/linux/kdbprivate.h Wed Jan 15 17:31:25 2003=0A= +++ linux-kdb-cmdline/include/linux/kdbprivate.h Wed Jan 17 11:55:12 = 2003=0A= @@ -160,7 +160,8 @@=0A= /*=0A= * Architecture specific function to read a string.=0A= */=0A= -extern char * kdba_read(char *, size_t);=0A= +typedef int (*get_char_func)(void);=0A= +extern get_char_func poll_funcs[];=0A= =0A= /*=0A= * Data for a single activation record on stack.=0A= ------_=_NextPart_000_01C2C1F9.55A465D0 Content-Type: application/octet-stream; name="kdb-cmdline-v2.5-2.4.19-ia64-5.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdb-cmdline-v2.5-2.4.19-ia64-5.patch" --- linux-kdb/arch/ia64/kdb/kdba_io.c Wed Jan 15 17:25:32 2003=0A= +++ linux-kdb-cmdline/arch/ia64/kdb/kdba_io.c Wed Jan 17 11:19:11 = 2003=0A= @@ -42,7 +42,6 @@=0A= #include =0A= #include =0A= #include =0A= -#include =0A= =0A= #include =0A= #include =0A= @@ -113,7 +112,6 @@=0A= {=0A= case 0x2:=0A= case 0x20: /* Shift */=0A= - kdb_printf("%c", shift_map[keycode]);=0A= return shift_map[keycode];=0A= case 0x1:=0A= case 0x10: /* Ctrl */=0A= @@ -128,7 +126,6 @@=0A= switch(keycode)=0A= {=0A= case 0x1C: /* Enter */=0A= - kdb_printf("\n");=0A= return 13;=0A= =0A= case 0x3A: /* Capslock */=0A= @@ -141,11 +138,9 @@=0A= break ;=0A= default:=0A= if(!usb_lock) {=0A= - kdb_printf("%c", plain_map[keycode]);=0A= return plain_map[keycode];=0A= }=0A= else {=0A= - kdb_printf("%c", shift_map[keycode]);=0A= return shift_map[keycode];=0A= }=0A= }=0A= @@ -222,15 +217,6 @@=0A= ch =3D 8;=0A= if (ch =3D=3D '\t')=0A= ch =3D ' ';=0A= - if (ch =3D=3D 8) { /* BS */=0A= - ;=0A= - } else if (ch =3D=3D 13) { /* Enter */=0A= - kdb_printf("\n");=0A= - } else {=0A= - if (!isprint(ch))=0A= - return(-1);=0A= - kdb_printf("%c", ch);=0A= - }=0A= return ch;=0A= }=0A= return -1;=0A= @@ -338,6 +324,26 @@=0A= return 8;=0A= }=0A= =0A= + // Special Key=0A= + switch (scancode) {=0A= + case 0xF: // Tab=0A= + return 9;=0A= + case 0x53: // Del=0A= + return 4;=0A= + case 0x47: // Home=0A= + return 1;=0A= + case 0x4F: // End=0A= + return 5;=0A= + case 0x4B: // Left=0A= + return 2;=0A= + case 0x48: // Up=0A= + return 16;=0A= + case 0x50: // Down=0A= + return 14;=0A= + case 0x4D: // Right=0A= + return 6;=0A= + }=0A= +=0A= if (scancode =3D=3D 0xe0) {=0A= return -1;=0A= }=0A= @@ -410,11 +416,6 @@=0A= return 13;=0A= }=0A= =0A= - /*=0A= - * echo the character.=0A= - */=0A= - kdb_printf("%c", keychar&0xff);=0A= -=0A= return keychar & 0xff;=0A= }=0A= #endif /* CONFIG_VT */=0A= @@ -465,15 +466,6 @@=0A= ch =3D 8;=0A= if (ch =3D=3D '\t')=0A= ch =3D ' ';=0A= - if (ch =3D=3D 8) { /* BS */=0A= - ;=0A= - } else if ((ch =3D=3D 13) || (ch =3D=3D 10)) { /* Enter */=0A= - kdb_printf("\n");=0A= - } else {=0A= - if (!isprint(ch))=0A= - return(-1);=0A= - kdb_printf("%c", ch);=0A= - }=0A= return ch;=0A= }=0A= return -1;=0A= @@ -511,9 +503,7 @@=0A= }=0A= #endif=0A= =0A= -typedef int (*get_char_func)(void);=0A= -=0A= -static get_char_func poll_funcs[] =3D {=0A= +get_char_func poll_funcs[] =3D {=0A= #if defined(CONFIG_VT)=0A= get_kbd_char,=0A= #endif=0A= @@ -531,44 +521,3 @@=0A= #endif=0A= NULL=0A= };=0A= -=0A= -char *=0A= -kdba_read(char *buffer, size_t bufsize)=0A= -{=0A= - char *cp =3D buffer;=0A= - char *bufend =3D buffer+bufsize-2; /* Reserve space for newline and = null byte */=0A= -=0A= - for (;;) {=0A= - int key;=0A= - get_char_func *f;=0A= - for (f =3D &poll_funcs[0]; ; ++f) {=0A= - if (*f =3D=3D NULL) {=0A= - /* Reset NMI watchdog once per poll loop */=0A= - touch_nmi_watchdog();=0A= - f =3D &poll_funcs[0];=0A= - }=0A= - key =3D (*f)();=0A= - if (key !=3D -1)=0A= - break;=0A= - }=0A= -=0A= - /* Echo is done in the low level functions */=0A= - switch (key) {=0A= - case 8: /* backspace */=0A= - if (cp > buffer) {=0A= - kdb_printf("\b \b");=0A= - --cp;=0A= - }=0A= - break;=0A= - case 10: /* enter */=0A= - case 13: /* enter */=0A= - *cp++ =3D '\n';=0A= - *cp++ =3D '\0';=0A= - return buffer;=0A= - default:=0A= - if (cp < bufend)=0A= - *cp++ =3D key;=0A= - break;=0A= - }=0A= - }=0A= -}=0A= ------_=_NextPart_000_01C2C1F9.55A465D0-- From kaos@sgi.com Wed Jan 22 17:42:35 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 22 Jan 2003 17:42:39 -0800 (PST) Received: from zok.sgi.com (zok.sgi.com [204.94.215.101]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0N1gY3v025937 for ; Wed, 22 Jan 2003 17:42:35 -0800 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by zok.sgi.com (8.12.2/8.12.2/linux-outbound_gateway-1.2) with SMTP id h0N0tbKp002797 for ; Wed, 22 Jan 2003 16:55:38 -0800 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 MAA29914; Thu, 23 Jan 2003 12:47:57 +1100 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 54F35300087; Thu, 23 Jan 2003 12:47:56 +1100 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 3A8DD85; Thu, 23 Jan 2003 12:47:56 +1100 (EST) X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 From: Keith Owens To: kdb@oss.sgi.com Cc: linux-kernel@vger.kernel.org Subject: Re: Announce: kdb v2.5 is available for kernel 2.4.20 In-Reply-To: Your message of "Fri, 29 Nov 2002 13:20:22 +1100." <4644.1038536422@kao2.melbourne.sgi.com> Date: Thu, 23 Jan 2003 12:47:51 +1100 Message-ID: <3566.1043286471@kao2.melbourne.sgi.com> X-archive-position: 223 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-Type: text/plain; charset=us-ascii On Fri, 29 Nov 2002 13:20:22 +1100, Keith Owens wrote: >ftp://oss.sgi.com/projects/kdb/download/v2.5/ > > kdb-v2.5-2.4.20-common-1.bz2 > kdb-v2.5-2.4.20-i386-1.bz2 > No kdb ia64-2.4.20 patch yet, waiting for base 2.4.20-ia64 patch. kdb-v2.5-2.4.20-ia64-021210-1.bz2 is now available. I am working on kdb v3.0 which will include lots of patches from the kdb backlog, including breakpoint serialization, command editing, assorted bugfixes etc. kdb v3.0 should be out within 9 days. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Exmh version 2.1.1 10/15/1999 iD8DBQE+L0nFi4UHNye0ZOoRApzwAKDKrj1/5hyyCWtaG6bvUuZTxoWJIACeMyAY wB6XpdkXgZDqVycNcQQ/qzA= =JQN+ -----END PGP SIGNATURE----- From sagupta@iPolicyNet.COM Thu Jan 23 20:19:58 2003 Received: with ECARTIS (v1.0.0; list kdb); Thu, 23 Jan 2003 20:20:02 -0800 (PST) Received: from mail.iPolicyNet.COM (mail.policyone.com [63.199.81.149]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0O4Jv3v012612 for ; Thu, 23 Jan 2003 20:19:58 -0800 Received: from cinthol.India.iPolicyNet.COM ([172.16.4.21]) by mail.iPolicyNet.COM (8.9.3+Sun/8.9.3) with ESMTP id UAA26012; Thu, 23 Jan 2003 20:04:41 -0800 (PST) Received: by cinthol.india.ipolicynet.com with Internet Mail Service (5.5.2650.21) id ; Fri, 24 Jan 2003 09:55:32 +0530 Message-ID: <4FB6F321746ED4118A0500508BD8A240844B5D@cinthol.india.ipolicynet.com> From: "Gupta, Saurabh" To: "'kdb@oss.sgi.com'" Cc: "'srbhg@yahoo.com'" , "Gupta, Saurabh" Subject: 2.4.7-10 kdb patch Date: Fri, 24 Jan 2003 09:55:32 +0530 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2C360.A2415EA8" X-archive-position: 224 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sagupta@iPolicyNet.COM Precedence: bulk X-list: kdb 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_01C2C360.A2415EA8 Content-Type: text/plain; charset="iso-8859-1" Hi, I am looking for kdb patch for 2.4.7-10 kernel version for i386. Can somebody suggest a pointer? Thanks, Saurabh ------_=_NextPart_001_01C2C360.A2415EA8 Content-Type: text/html; charset="iso-8859-1" 2.4.7-10 kdb patch

Hi,

I am looking for kdb patch for 2.4.7-10 kernel version for i386.
Can somebody suggest a pointer?

Thanks,
Saurabh
 

------_=_NextPart_001_01C2C360.A2415EA8-- From kaos@sgi.com Thu Jan 23 20:45:39 2003 Received: with ECARTIS (v1.0.0; list kdb); Thu, 23 Jan 2003 20:45:41 -0800 (PST) Received: from tolkor.sgi.com (tolkor.sgi.com [198.149.18.6]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0O4jb3v012714 for ; Thu, 23 Jan 2003 20:45:38 -0800 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by tolkor.sgi.com (8.12.2/8.12.2/linux-outbound_gateway-1.2) with SMTP id h0O50Nkq010853 for ; Thu, 23 Jan 2003 23:00:24 -0600 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 PAA12547; Fri, 24 Jan 2003 15:51:01 +1100 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 052973000B8; Fri, 24 Jan 2003 15:50:59 +1100 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id CE881178; Fri, 24 Jan 2003 15:50:59 +1100 (EST) X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 From: Keith Owens To: "Gupta, Saurabh" Cc: "'kdb@oss.sgi.com'" , "'srbhg@yahoo.com'" Subject: Re: 2.4.7-10 kdb patch In-reply-to: Your message of "Fri, 24 Jan 2003 09:55:32 +0530." <4FB6F321746ED4118A0500508BD8A240844B5D@cinthol.india.ipolicynet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 24 Jan 2003 15:50:54 +1100 Message-ID: <4938.1043383854@kao2.melbourne.sgi.com> X-archive-position: 225 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Fri, 24 Jan 2003 09:55:32 +0530, "Gupta, Saurabh" wrote: >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. Please do not send HTML+text to this list, just plain text. >I am looking for kdb patch for 2.4.7-10 kernel version for i386. >Can somebody suggest a pointer? 2.4.7-10 is a Redhat kernel with lots of extra patches that get in the way of kdb. Ask Redhat for a version of kdb that fits their kernel. From sonic.zhang@intel.com Mon Jan 27 22:14:45 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 27 Jan 2003 22:14:48 -0800 (PST) Received: from caduceus.jf.intel.com (fmr06.intel.com [134.134.136.7]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0S6Ei3v012518 for ; Mon, 27 Jan 2003 22:14:45 -0800 Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7]) by caduceus.jf.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h0S6I1o03922 for ; Tue, 28 Jan 2003 06:18:01 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by talaria.jf.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.28 2003/01/13 19:44:39 dmccart Exp $) with SMTP id h0S627D19662 for ; Tue, 28 Jan 2003 06:02:07 GMT Received: from pdsmsx17.pd.intel.com ([172.16.12.121]) by pdsmsxvs01.pd.intel.com (NAVGW 2.5.2.11) with SMTP id M2003012814214208539 for ; Tue, 28 Jan 2003 14:21:42 +0800 Received: by pdsmsx17.pd.intel.com with Internet Mail Service (5.5.2653.19) id ; Tue, 28 Jan 2003 14:20:45 +0800 Message-ID: <957BD1C2BF3CD411B6C500A0C944CA2602E94B6E@pdsmsx32.pd.intel.com> From: "Zhang, Sonic" To: "KDB (E-mail)" Subject: I forgot to remove one debug code line in my last kdb command lin e editing patch. Date: Tue, 28 Jan 2003 14:19:27 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="gb2312" X-archive-position: 226 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sonic.zhang@intel.com Precedence: bulk X-list: kdb Hi, I am sorry I forgot to remove one debug code line in last patch "kdb-cmdline-v2.5-2.4.19-common-5.patch". This debug code line is in file /kdb/kdbmain.c , see bellow. Thanks. ------------------------------------------------------- --- linux-kdb/kdb/kdbmain.c Tue Jan 28 13:51:51 2003 +++ linux-kdb-cmdline/kdb/kdbmain.c Tue Jan 28 13:52:09 2003 @@ -1099,7 +1099,6 @@ } cmdptr = cmd_head; - printk(cmdbuf); diag = kdb_parse(cmdbuf, regs); if (diag == KDB_NOTFOUND) { ************************************* Sonic Zhang Software Engineer Intel China Software Lab Tel: 021-52574545-1667 iNet: 8-752-1667 ************************************* From ifyoudie@businessvvorld.com Thu Jan 30 01:54:19 2003 Received: with ECARTIS (v1.0.0; list kdb); Thu, 30 Jan 2003 01:54:23 -0800 (PST) Received: from 128.167.58.27 (rrcs-se-24-73-146-7.biz.rr.com [24.73.146.7]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h0U9sI3v001339; Thu, 30 Jan 2003 01:54:19 -0800 Received: from [66.250.20.122] by 128.167.58.27 with ESMTP id QIFKSX; Thu, 30 Jan 03 05:00:46 +0400 Received: from [124.180.230.165] by 66.250.20.122 with ESMTP id OLPTSB; Thu, 30 Jan 03 04:51:46 +0400 From: "Royce Key" Message-ID: To: hawkes@oss.sgi.com, kdb@oss.sgi.com, cvs@oss.sgi.com Date: Thu, 30 Jan 03 04:51:46 GMT X-Priority: 3 X-MSMail-Priority: Normal Subject: Get Ins protection cqu dijot cf X-Mailer: MIME-tools 5.503 (Entity 5.501) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_73B._.F5C_2" X-archive-position: 227 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: ifyoudie@businessvvorld.com Precedence: bulk X-list: kdb This is a multi-part message in MIME format. --_73B._.F5C_2 Content-Type: text/html Content-Transfer-Encoding: quoted-printable d wqvshco e xzqaf j jnlcnbu oruyzhfis blvq wg zaywku we d j o ci p --_73B._.F5C_2--