From anehori@checkpoint.com Mon May 5 03:25:31 2008 Received: with ECARTIS (v1.0.0; list kdb); Mon, 05 May 2008 03:25:39 -0700 (PDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m45APSdF016184 for ; Mon, 5 May 2008 03:25:31 -0700 X-ASG-Debug-ID: 1209983170-213601970000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 30B1FB01DAB for ; Mon, 5 May 2008 03:26:11 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id EiiS4zYP5zMlcGel for ; Mon, 05 May 2008 03:26:11 -0700 (PDT) Received: from [91.90.139.139] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m45A6CfU006375 for ; Mon, 5 May 2008 13:06:13 +0300 (IDT) Message-ID: <481EDC13.1040504@checkpoint.com> Date: Mon, 05 May 2008 13:06:11 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: kdb@oss.sgi.com X-ASG-Orig-Subj: bph / bpha not working. Subject: bph / bpha not working. Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1209983174 X-Barracuda-Bayes: INNOCENT GLOBAL 0.4999 1.0000 0.0000 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.49713 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1347 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb Hi, I'm trying to set a watch point with bpha as follows : bpha address dataw 4 but the watchpoint is never called when the memory address is changed. is it a know bug ? is there a patch ? Thanks. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jlan@sgi.com Tue May 6 13:02:57 2008 Received: with ECARTIS (v1.0.0; list kdb); Tue, 06 May 2008 13:03:10 -0700 (PDT) Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m46K2smP018974 for ; Tue, 6 May 2008 13:02:57 -0700 Received: from [127.0.0.1] (sshgate.corp.sgi.com [198.149.36.12]) by cthulhu.engr.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m46K3bBC017442; Tue, 6 May 2008 13:03:37 -0700 Message-ID: <4820B9EA.3060002@sgi.com> Date: Tue, 06 May 2008 13:04:58 -0700 From: Jay Lan User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: Avi Nehori CC: kdb@oss.sgi.com Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> In-Reply-To: <481EDC13.1040504@checkpoint.com> X-Enigmail-Version: 0.94.0.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 1348 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jlan@sgi.com Precedence: bulk X-list: kdb Avi Nehori wrote: > Hi, > I'm trying to set a watch point with bpha as follows : > bpha address dataw 4 > but the watchpoint is never called when the memory address is changed. > is it a know bug ? > is there a patch ? I heard bph/bpha worked on x86_64. However, hardware breakpoint was not implemented on IA64. Were you on IA64? Greg Banks of SGI (gnb@sgi.com) provided patches for IA64. Many thanks to Greg! 1) gnb-kdb-implement-bpha-v3 This patch implemented bph/bpha on IA64. 2) gnb-test-kdb-bph This patch provided a test infrastructure to test all the ia64 data* breakpoint features. I have uploaded the patches to the download area. ftp://oss.sgi.com/projects/kdb/download/v4.4 Cheers, - jay > > > Thanks. > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From anehori@checkpoint.com Tue May 6 23:41:18 2008 Received: with ECARTIS (v1.0.0; list kdb); Tue, 06 May 2008 23:41:37 -0700 (PDT) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m476fFIA009208 for ; Tue, 6 May 2008 23:41:18 -0700 X-ASG-Debug-ID: 1210142517-6b56023d0000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id E79181658172; Tue, 6 May 2008 23:41:57 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id yGi1DxUzNB3yZJs6; Tue, 06 May 2008 23:41:57 -0700 (PDT) Received: from [172.31.21.39] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m476ftfU013121; Wed, 7 May 2008 09:41:56 +0300 (IDT) Message-ID: <48214F33.1000006@checkpoint.com> Date: Wed, 07 May 2008 09:41:55 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Jay Lan CC: kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> In-Reply-To: <4820B9EA.3060002@sgi.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1210142520 X-Barracuda-Bayes: INNOCENT GLOBAL 0.4049 1.0000 0.0000 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.49762 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1349 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb Thanks for your reply Jay, I'm running i386 and the thing is that when i set the breakpoint on a memory address(trying to catch a memory corruption bug) the watch point is not getting hit when the memory is written. I'm following the kdb documentation which says : "The |bph| and |bpha| commands can be used (provided the architecture supports use of hardware registers) to apply read and write breakpoints. This means we can get control whenever data is read from or written into a particular address. This can be extremely handy when debugging data/memory corruption problems, where you can use it to identify the corrupting code/process." *Examples* *To enter the kernel debugger whenever four bytes are written into address 0xc0204060:* | [0]kdb> bph 0xc0204060 dataw 4 so i followed the documentation and set a breakpoint using bph (and also bpha) on a memory address exactly as the above example ,but when i modify the memory address ,the breakpoint does not hit.... any idea what is wrong here ? any help will be very appreciated . Thanks! || || | Jay Lan wrote: > Avi Nehori wrote: > >> Hi, >> I'm trying to set a watch point with bpha as follows : >> bpha address dataw 4 >> but the watchpoint is never called when the memory address is changed. >> is it a know bug ? >> is there a patch ? >> > > I heard bph/bpha worked on x86_64. However, hardware breakpoint > was not implemented on IA64. Were you on IA64? > > Greg Banks of SGI (gnb@sgi.com) provided patches for IA64. Many > thanks to Greg! > 1) gnb-kdb-implement-bpha-v3 > This patch implemented bph/bpha on IA64. > 2) gnb-test-kdb-bph > This patch provided a test infrastructure to test all the ia64 > data* breakpoint features. > > I have uploaded the patches to the download area. > ftp://oss.sgi.com/projects/kdb/download/v4.4 > > > Cheers, > - jay > > >> Thanks. >> --------------------------- >> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >> > > > > Scanned by Check Point Total Security Gateway. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jidong.xiao@gmail.com Wed May 7 00:00:20 2008 Received: with ECARTIS (v1.0.0; list kdb); Wed, 07 May 2008 00:01:03 -0700 (PDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4770CVW010784 for ; Wed, 7 May 2008 00:00:17 -0700 X-ASG-Debug-ID: 1210143657-7f1500bf0000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from rv-out-0708.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 8B015137785 for ; Wed, 7 May 2008 00:00:57 -0700 (PDT) Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.245]) by cuda.sgi.com with ESMTP id 62dnbzVMLjrPluuV for ; Wed, 07 May 2008 00:00:57 -0700 (PDT) Received: by rv-out-0708.google.com with SMTP id f25so168865rvb.32 for ; Wed, 07 May 2008 00:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=SmrTF7h4uZanayZPYqN+OYbHVQsLRssdNeJi553V23k=; b=SnJZorRyZkacwZx8h9snnJx0PnPt5WxGgFTJLkkojMpsOVHezxIziBwEoIIGFi7kVxXDZipr0toMzYItaGP83Oju4At21ImqgW3CMko8i2y5j9WW/jDL4++CVta2jQk7UtgdFBjjPlv7CB9AyqyuNINtTiYHhj4dopXp6nSkllE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RYu7YIYMzlMBnFs701rN2qhOxWKJnJTqRxvdnyH/RKHS+auzQKwILdULUI9eBBBvaAL2HGbLcYlEidFpAr1q4KAPCO/41bAwEH079em+bJcsQjEnZ6H/Hm+X2H8zxdlnIQyhfIocRk+OrBF4NOvsohhOGObijX//D12AWmF7HMI= Received: by 10.142.232.20 with SMTP id e20mr722626wfh.59.1210143656607; Wed, 07 May 2008 00:00:56 -0700 (PDT) Received: by 10.142.237.13 with HTTP; Wed, 7 May 2008 00:00:56 -0700 (PDT) Message-ID: <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> Date: Wed, 7 May 2008 15:00:56 +0800 From: "jidong xiao" To: "Avi Nehori" X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. Cc: "Jay Lan" , kdb@oss.sgi.com In-Reply-To: <48214F33.1000006@checkpoint.com> MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> X-Barracuda-Connect: rv-out-0708.google.com[209.85.198.245] X-Barracuda-Start-Time: 1210143658 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.49762 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1350 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jidong.xiao@gmail.com Precedence: bulk X-list: kdb On Wed, May 7, 2008 at 2:41 PM, Avi Nehori wrote: > Thanks for your reply Jay, > I'm running i386 and the thing is that when i set the breakpoint on a > memory address(trying to catch a memory > corruption bug) the watch point is not getting hit when the memory is > written. > I'm following the kdb documentation which says : > > "The |bph| and |bpha| commands can be used (provided the architecture > supports use of hardware registers) to apply read and write breakpoints. > This means we can get control whenever data is read from or written into > a particular address. This can be extremely handy when debugging > data/memory corruption problems, where you can use it to identify the > corrupting code/process." > > *Examples* > > *To enter the kernel debugger whenever four bytes are written into > address 0xc0204060:* > | [0]kdb> bph 0xc0204060 dataw 4 > > > so i followed the documentation and set a breakpoint using bph (and > also bpha) on a memory address > exactly as the above example ,but when i modify the memory address > ,the breakpoint does not hit.... > any idea what is wrong here ? > any help will be very appreciated . > Thanks! > What the kernel version are you using? and how do you modify the memory address? Regards Jason Xiao > || > > > || > | > > > > > Jay Lan wrote: > > Avi Nehori wrote: > > > >> Hi, > >> I'm trying to set a watch point with bpha as follows : > >> bpha address dataw 4 > >> but the watchpoint is never called when the memory address is changed. > >> is it a know bug ? > >> is there a patch ? > >> > > > > I heard bph/bpha worked on x86_64. However, hardware breakpoint > > was not implemented on IA64. Were you on IA64? > > > > Greg Banks of SGI (gnb@sgi.com) provided patches for IA64. Many > > thanks to Greg! > > 1) gnb-kdb-implement-bpha-v3 > > This patch implemented bph/bpha on IA64. > > 2) gnb-test-kdb-bph > > This patch provided a test infrastructure to test all the ia64 > > data* breakpoint features. > > > > I have uploaded the patches to the download area. > > ftp://oss.sgi.com/projects/kdb/download/v4.4 > > > > > > Cheers, > > - jay > > > > > >> Thanks. > >> --------------------------- > >> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. > >> > > > > > > > > Scanned by Check Point Total Security Gateway. > > > > > > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From anehori@checkpoint.com Wed May 7 00:06:57 2008 Received: with ECARTIS (v1.0.0; list kdb); Wed, 07 May 2008 00:07:25 -0700 (PDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4776tYs013264 for ; Wed, 7 May 2008 00:06:56 -0700 X-ASG-Debug-ID: 1210144059-128a00410000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 4573112F249; Wed, 7 May 2008 00:07:39 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id OWYRHkHtpU6PA3A4; Wed, 07 May 2008 00:07:39 -0700 (PDT) Received: from [192.168.252.58] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m4777ZfU023419; Wed, 7 May 2008 10:07:35 +0300 (IDT) Message-ID: <48215537.3040901@checkpoint.com> Date: Wed, 07 May 2008 10:07:35 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: jidong xiao CC: Jay Lan , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> In-Reply-To: <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1210144061 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.49762 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1351 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb I'm using 2.4.21 kernel (and also tried 2.6.18 with the same behavior). the memory address is being written through a kernel module . please see below : [0]kdb> md 0xa0f7bc94 0xa0f7bc94 00000000 00000001 00000003 00000000 ................ [0]kdb> bpha 0xa0f7bc94 dataw 4 [0]kdb> go the breakpoint is not called even though the memory address being changed: [0]kdb> md 0xa0f7bc94 0xa0f7bc94 00000064 00000001 00000003 00000000 d............... jidong xiao wrote: > On Wed, May 7, 2008 at 2:41 PM, Avi Nehori wrote: > >> Thanks for your reply Jay, >> I'm running i386 and the thing is that when i set the breakpoint on a >> memory address(trying to catch a memory >> corruption bug) the watch point is not getting hit when the memory is >> written. >> I'm following the kdb documentation which says : >> >> "The |bph| and |bpha| commands can be used (provided the architecture >> supports use of hardware registers) to apply read and write breakpoints. >> This means we can get control whenever data is read from or written into >> a particular address. This can be extremely handy when debugging >> data/memory corruption problems, where you can use it to identify the >> corrupting code/process." >> >> *Examples* >> >> *To enter the kernel debugger whenever four bytes are written into >> address 0xc0204060:* >> | [0]kdb> bph 0xc0204060 dataw 4 >> >> >> so i followed the documentation and set a breakpoint using bph (and >> also bpha) on a memory address >> exactly as the above example ,but when i modify the memory address >> ,the breakpoint does not hit.... >> any idea what is wrong here ? >> any help will be very appreciated . >> Thanks! >> >> > > What the kernel version are you using? and how do you modify the memory address? > > Regards > Jason Xiao > > >> || >> >> >> || >> | >> >> >> >> >> Jay Lan wrote: >> >>> Avi Nehori wrote: >>> >>> >>>> Hi, >>>> I'm trying to set a watch point with bpha as follows : >>>> bpha address dataw 4 >>>> but the watchpoint is never called when the memory address is changed. >>>> is it a know bug ? >>>> is there a patch ? >>>> >>>> >>> I heard bph/bpha worked on x86_64. However, hardware breakpoint >>> was not implemented on IA64. Were you on IA64? >>> >>> Greg Banks of SGI (gnb@sgi.com) provided patches for IA64. Many >>> thanks to Greg! >>> 1) gnb-kdb-implement-bpha-v3 >>> This patch implemented bph/bpha on IA64. >>> 2) gnb-test-kdb-bph >>> This patch provided a test infrastructure to test all the ia64 >>> data* breakpoint features. >>> >>> I have uploaded the patches to the download area. >>> ftp://oss.sgi.com/projects/kdb/download/v4.4 >>> >>> >>> Cheers, >>> - jay >>> >>> >>> >>>> Thanks. >>>> --------------------------- >>>> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >>>> >>>> >>> >>> Scanned by Check Point Total Security Gateway. >>> >>> >> --------------------------- >> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >> >> > > Scanned by Check Point Total Security Gateway. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jidong.xiao@gmail.com Wed May 7 02:52:02 2008 Received: with ECARTIS (v1.0.0; list kdb); Wed, 07 May 2008 02:52:16 -0700 (PDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m479pw8e000407 for ; Wed, 7 May 2008 02:52:01 -0700 X-ASG-Debug-ID: 1210153962-1817031a0000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from rv-out-0708.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 986B213B0F3 for ; Wed, 7 May 2008 02:52:42 -0700 (PDT) Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.249]) by cuda.sgi.com with ESMTP id DhEQLnXOb4s0rzFZ for ; Wed, 07 May 2008 02:52:42 -0700 (PDT) Received: by rv-out-0708.google.com with SMTP id f25so221170rvb.32 for ; Wed, 07 May 2008 02:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=hQmJkpjPlK3G/RSRHHhPRVrQjRzABsoEzum+xXr4mrc=; b=B8YLslUlRvaHOlnfKdKGMS7N5E4vOobNhQ7GCi7rvJ5hS+enDKqAw5HhHgMJVWaaW6Y0jxI19/YrJzj274BbsSO0dNTvzCJXUXYXJ/Ff9/2INtuK3CTMLGin1XOR0jSWFW71NGbqp2o0900vjYJx+E7MR0ALdqZ+0spWLPPuyDo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=laaMAYQzrdVfFDj8/UdSMO0eJ2EgtmWb+R17Ya/uHNbY40JVNwq70fNKhtDFVCx9gH8BFskiFyddAhIZPrnxxpAKBPsgorX2YI0m/KKQtarOCsdJQwodqwo29xzeSyiAaH+9o6MJp7xQg7LvgrfOTBpCKXkJsf/A5U5zNFxVLG4= Received: by 10.143.19.16 with SMTP id w16mr769126wfi.294.1210153962229; Wed, 07 May 2008 02:52:42 -0700 (PDT) Received: by 10.142.237.13 with HTTP; Wed, 7 May 2008 02:52:42 -0700 (PDT) Message-ID: <4104961b0805070252j7f08e321re73f995f4554b140@mail.gmail.com> Date: Wed, 7 May 2008 17:52:42 +0800 From: "jidong xiao" To: "Avi Nehori" X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. Cc: "Jay Lan" , kdb@oss.sgi.com In-Reply-To: <48215537.3040901@checkpoint.com> MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> X-Barracuda-Connect: rv-out-0708.google.com[209.85.198.249] X-Barracuda-Start-Time: 1210153964 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.49762 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1352 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jidong.xiao@gmail.com Precedence: bulk X-list: kdb On Wed, May 7, 2008 at 3:07 PM, Avi Nehori wrote: > I'm using 2.4.21 kernel (and also tried 2.6.18 with the same behavior). > the memory address is being written through a kernel module . > please see below : > > [0]kdb> md 0xa0f7bc94 > 0xa0f7bc94 00000000 00000001 00000003 00000000 ................ > [0]kdb> bpha 0xa0f7bc94 dataw 4 Okay, please can you run "rd d" at this moment to display the debug registers(and paste out the result of course), I somewhat feel DR0-DR3 were not changed but actually they are supposed to represent the breakpoint location virtual address. Regards Jason > [0]kdb> go > > > the breakpoint is not called even though the memory address being changed: > [0]kdb> md 0xa0f7bc94 > 0xa0f7bc94 00000064 00000001 00000003 00000000 d............... > > > > > jidong xiao wrote: > > On Wed, May 7, 2008 at 2:41 PM, Avi Nehori wrote: > > > > > > > Thanks for your reply Jay, > > > I'm running i386 and the thing is that when i set the breakpoint on a > > > memory address(trying to catch a memory > > > corruption bug) the watch point is not getting hit when the memory is > > > written. > > > I'm following the kdb documentation which says : > > > > > > "The |bph| and |bpha| commands can be used (provided the architecture > > > supports use of hardware registers) to apply read and write breakpoints. > > > This means we can get control whenever data is read from or written into > > > a particular address. This can be extremely handy when debugging > > > data/memory corruption problems, where you can use it to identify the > > > corrupting code/process." > > > > > > *Examples* > > > > > > *To enter the kernel debugger whenever four bytes are written into > > > address 0xc0204060:* > > > | [0]kdb> bph 0xc0204060 dataw 4 > > > > > > > > > so i followed the documentation and set a breakpoint using bph (and > > > also bpha) on a memory address > > > exactly as the above example ,but when i modify the memory address > > > ,the breakpoint does not hit.... > > > any idea what is wrong here ? > > > any help will be very appreciated . > > > Thanks! > > > > > > > > > > > > > What the kernel version are you using? and how do you modify the memory > address? > > > > Regards > > Jason Xiao > > > > > > > > > || > > > > > > > > > || > > > | > > > > > > > > > > > > > > > Jay Lan wrote: > > > > > > > > > > Avi Nehori wrote: > > > > > > > > > > > > > > > > > Hi, > > > > > I'm trying to set a watch point with bpha as follows : > > > > > bpha address dataw 4 > > > > > but the watchpoint is never called when the memory address is > changed. > > > > > is it a know bug ? > > > > > is there a patch ? > > > > > > > > > > > > > > > > > > > I heard bph/bpha worked on x86_64. However, hardware breakpoint > > > > was not implemented on IA64. Were you on IA64? > > > > > > > > Greg Banks of SGI (gnb@sgi.com) provided patches for IA64. Many > > > > thanks to Greg! > > > > 1) gnb-kdb-implement-bpha-v3 > > > > This patch implemented bph/bpha on IA64. > > > > 2) gnb-test-kdb-bph > > > > This patch provided a test infrastructure to test all the ia64 > > > > data* breakpoint features. > > > > > > > > I have uploaded the patches to the download area. > > > > ftp://oss.sgi.com/projects/kdb/download/v4.4 > > > > > > > > > > > > Cheers, > > > > - jay > > > > > > > > > > > > > > > > > > > > > Thanks. > > > > > --------------------------- > > > > > Use http://oss.sgi.com/ecartis to modify your settings or to > unsubscribe. > > > > > > > > > > > > > > > > > > > > > > > Scanned by Check Point Total Security Gateway. > > > > > > > > > > > --------------------------- > > > Use http://oss.sgi.com/ecartis to modify your settings or to > unsubscribe. > > > > > > > > > > > > > Scanned by Check Point Total Security Gateway. > > > > > > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From Scott.Lurndal@3leafsystems.com Wed May 7 09:11:11 2008 Received: with ECARTIS (v1.0.0; list kdb); Wed, 07 May 2008 09:11:25 -0700 (PDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m47GBAdk007506 for ; Wed, 7 May 2008 09:11:11 -0700 X-ASG-Debug-ID: 1210176711-5987016b0000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from barracuda.3leafnetworks.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 8076FB2866A for ; Wed, 7 May 2008 09:11:53 -0700 (PDT) Received: from barracuda.3leafnetworks.com (chronus.3leafnetworks.com [71.129.195.180]) by cuda.sgi.com with ESMTP id u1S22TBTBjYJmGjF for ; Wed, 07 May 2008 09:11:53 -0700 (PDT) Received: from chronus.3leafnetworks.corp (chronus.3leafnetworks.corp [10.16.16.17]) by barracuda.3leafnetworks.com (Spam Firewall) with ESMTP id 4D7663E0D3 for ; Wed, 7 May 2008 09:11:29 -0700 (PDT) Received: from pendragon.3leafnetworks.com ([10.32.0.1]) by chronus.3leafnetworks.corp with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 May 2008 09:11:45 -0700 Received: from pendragon.3leafnetworks.com (localhost.localdomain [127.0.0.1]) by pendragon.3leafnetworks.com (8.13.8/8.13.8) with ESMTP id m47GBj7n004419; Wed, 7 May 2008 09:11:45 -0700 Received: (from slurndal@localhost) by pendragon.3leafnetworks.com (8.13.8/8.13.8/Submit) id m47GBjli004418; Wed, 7 May 2008 09:11:45 -0700 Date: Wed, 7 May 2008 09:11:45 -0700 From: Scott Lurndal To: Avi Nehori Cc: jidong xiao , Jay Lan , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. Message-ID: <20080507161145.GA4398@pendragon.3leafnetworks.com> References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48215537.3040901@checkpoint.com> User-Agent: Mutt/1.4.2.2i X-OriginalArrivalTime: 07 May 2008 16:11:45.0764 (UTC) FILETIME=[0BDE8A40:01C8B05D] X-Barracuda-Connect: chronus.3leafnetworks.com[71.129.195.180] X-Barracuda-Start-Time: 1210176716 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0196 1.0000 -1.8933 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -1.89 X-Barracuda-Spam-Status: No, SCORE=-1.89 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.49788 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Content-Transfer-Encoding: 8bit X-archive-position: 1353 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: scott.lurndal@3leafsystems.com Precedence: bulk X-list: kdb On Wed, May 07, 2008 at 10:07:35AM +0300, Avi Nehori wrote: > I'm using 2.4.21 kernel (and also tried 2.6.18 with the same behavior). > the memory address is being written through a kernel module . > please see below : > > [0]kdb> md 0xa0f7bc94 > 0xa0f7bc94 00000000 00000001 00000003 00000000 ................ > [0]kdb> bpha 0xa0f7bc94 dataw 4 > [0]kdb> go > > > the breakpoint is not called even though the memory address being changed: > [0]kdb> md 0xa0f7bc94 > 0xa0f7bc94 00000064 00000001 00000003 00000000 d............... > What does the 'bl' command show? It should show the debug register that the breakpoint was assigned to. You'll want to check it on all processors if you have a SMP machine. Please also use the 'rd d' command to display the contents of the debug registers on all processors. scott --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kbaidarov@ru.mvista.com Wed May 7 16:50:45 2008 Received: with ECARTIS (v1.0.0; list kdb); Wed, 07 May 2008 16:51:04 -0700 (PDT) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m45AlCl2017369 for ; Mon, 5 May 2008 03:47:13 -0700 X-ASG-Debug-ID: 1209984474-524103450000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.dev.rtsoft.ru (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with SMTP id C28C4D55EF8 for ; Mon, 5 May 2008 03:47:54 -0700 (PDT) Received: from mail.dev.rtsoft.ru (rtsoft2.corbina.net [85.21.88.2]) by cuda.sgi.com with SMTP id gmgzhzENVOadDT2A for ; Mon, 05 May 2008 03:47:54 -0700 (PDT) Received: (qmail 30669 invoked from network); 5 May 2008 10:47:53 -0000 Received: from windmill.dev.rtsoft.ru.dev.rtsoft.ru (HELO windmill.dev.rtsoft.ru) (192.168.1.124) by mail.dev.rtsoft.ru with SMTP; 5 May 2008 10:47:53 -0000 Date: Mon, 5 May 2008 14:44:19 +0400 From: Konstantin Baydarov To: Avi Nehori Cc: kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. Message-ID: <20080505144419.759ec2fc@windmill.dev.rtsoft.ru> In-Reply-To: <481EDC13.1040504@checkpoint.com> References: <481EDC13.1040504@checkpoint.com> X-Mailer: Claws Mail 3.1.0 (GTK+ 2.12.1; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Barracuda-Connect: rtsoft2.corbina.net[85.21.88.2] X-Barracuda-Start-Time: 1209984475 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -1.52 X-Barracuda-Spam-Status: No, SCORE=-1.52 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.49714 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-archive-position: 1354 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kbaidarov@ru.mvista.com Precedence: bulk X-list: kdb Yes It's known issue. On Mon, 05 May 2008 13:06:11 +0300 Avi Nehori wrote: > Hi, > I'm trying to set a watch point with bpha as follows : > bpha address dataw 4 > but the watchpoint is never called when the memory address is changed. > is it a know bug ? > is there a patch ? Here is my previous mail (http://oss.sgi.com/archives/kdb/2007-11/msg00037.html) with patch that fixes bpha problem: Global HW BP don't work: 1) Install global HW BP root@192.168.2.10:~# root@192.168.2.10:~# D Entering kdb (current=0xc04433a0, pid 0) on processor 0 due to Keyboard Entry [0]kdb> bpha do_sync Forced Instruction(Register) BP #0 at 0xc0181539 (do_sync) is enabled in dr0 globally [0]kdb> go -bash: D: command not found root@192.168.2.10:~# 1) Try CPU 0 root@192.168.2.10:~# root@192.168.2.10:~# taskset -c 0 sync Instruction(Register) breakpoint #0 at 0xc0181539 0xc0181539 do_sync: push %ebx Entering kdb (0xc1b6d030, pid 1319) on processor 0 due to Debug @ 0xc0181539 [0]kdb> go root@192.168.2.10:~# - OK 1) Try CPU 1 root@192.168.2.10:~# root@192.168.2.10:~# taskset -c 1 sync root@192.168.2.10:~# - Doesn't work. Signed-off-by: Konstantin Baydarov Description: This patch adds support for global hardware breakpoints to KDB on x86 targets. Hardware breakpoints are installed by setting per CPU db registers. So to make a hardware breakpoint global it should be installed in db registers on every CPU in system. So global hw bp can't be handle by kdb_bp_install_global and kdb_bp_remove_global because these functions are called only on "monarch" CPU, kdb_bp_install_local and kdb_bp_remove_local should be used instead because these are called for all CPUs. Main changes: - kdb_hardbreaks[KDB_MAXHARDBPT] - The processor architecture hardware breakpoint registers descriptors is defined for every CPU: static kdbhard_bp_t kdb_hardbreaks[NR_CPUS][KDB_MAXHARDBPT]; - "kdb_bp_t" (main breakpint structure) contains hardware breakpoint registers for every CPU: kdbhard_bp_t* bp_hard[NR_CPUS]; - global hardware breakpoint installation and removal is handled by kdb_bp_install_local and kdb_bp_remove_local which are executed on every CPU - kdba_allocbp andkdba_freebp are static, now kdba_alloc_hwbp and kdba_free_hwbp are used for allocating/freeing hardware breakpoint registers. If the hardware breakpoint is global then kdba_alloc_hwbp tries to allocate hardware breakpoint registers on every CPU. If there is no free hardware breakpoint on a CPU the allocation fails. - bph_installed was added to the hardware breakpoint descriptor to track per CPU hardware breakpoint installation. Patch against kernel 2.6.24-rc2 Index: linux-2.6.24-rc2/arch/x86/kdb/kdba_bp_32.c =================================================================== --- linux-2.6.24-rc2.orig/arch/x86/kdb/kdba_bp_32.c +++ linux-2.6.24-rc2/arch/x86/kdb/kdba_bp_32.c @@ -22,10 +22,10 @@ static char *kdba_rwtypes[] = { "Instruc /* * Table describing processor architecture hardware - * breakpoint registers. + * breakpoint registers for every CPU. */ -static kdbhard_bp_t kdb_hardbreaks[KDB_MAXHARDBPT]; +static kdbhard_bp_t kdb_hardbreaks[NR_CPUS][KDB_MAXHARDBPT]; /* * kdba_db_trap @@ -75,6 +75,7 @@ kdba_db_trap(struct pt_regs *regs, int e int i; kdb_dbtrap_t rv = KDB_DB_BPT; kdb_bp_t *bp; + int cpu = smp_processor_id(); if (KDB_NULL_REGS(regs)) return KDB_DB_NOBPT; @@ -103,8 +104,12 @@ kdba_db_trap(struct pt_regs *regs, int e kdb_printf("bp for this cpu\n"); if (bp->bp_delayed) { bp->bp_delayed = 0; - if (KDB_DEBUG(BP)) + if (KDB_DEBUG(BP)){ + /* Can't be hw breakpoint */ + if (bp->bp_hardtype) + kdb_printf("kdb: Error - hw bp delayed\n"); kdb_printf("kdba_installbp\n"); + } kdba_installbp(regs, bp); if (!KDB_STATE(DOING_SS)) { regs->eflags &= ~EF_TF; @@ -211,8 +216,8 @@ handle: for(i=0, bp=kdb_breakpoints; ibp_free) && (bp->bp_global || bp->bp_cpu == smp_processor_id()) - && (bp->bp_hard) - && (bp->bp_hard->bph_reg == reg)) { + && (bp->bp_hard[cpu]) + && (bp->bp_hard[cpu]->bph_reg == reg)) { /* * Hit this breakpoint. */ @@ -438,12 +443,18 @@ kdba_printbpreg(kdbhard_bp_t *bph) void kdba_printbp(kdb_bp_t *bp) { + int cpu; + kdb_printf("\n is enabled"); if (bp->bp_hardtype) { - kdba_printbpreg(bp->bp_hard); - if (bp->bp_hard->bph_mode != 0) { + if (bp->bp_global) + cpu = smp_processor_id(); + else + cpu = bp->bp_cpu; + kdba_printbpreg(bp->bp_hard[cpu]); + if (bp->bp_hard[cpu]->bph_mode != 0) { kdb_printf(" for %d bytes", - bp->bp_hard->bph_length+1); + bp->bp_hard[cpu]->bph_length+1); } } } @@ -556,7 +567,7 @@ kdba_parsebp(int argc, const char **argv /* * kdba_allocbp * - * Associate a hardware register with a breakpoint. + * Allocate hw register for bp on specific CPU * * Parameters: * None. @@ -570,13 +581,14 @@ kdba_parsebp(int argc, const char **argv * Remarks: */ -kdbhard_bp_t * -kdba_allocbp(kdbhard_bp_t *bph, int *diagp) +static kdbhard_bp_t * +kdba_allocbp(kdbhard_bp_t *bph, int *diagp, unsigned int cpu) { int i; kdbhard_bp_t *newbph; - for(i=0,newbph=kdb_hardbreaks; i < KDB_MAXHARDBPT; i++, newbph++) { + for(i=0; i < KDB_MAXHARDBPT; i++) { + newbph=&(kdb_hardbreaks[cpu][i]); if (newbph->bph_free) { break; } @@ -608,9 +620,49 @@ kdba_allocbp(kdbhard_bp_t *bph, int *dia } /* + * kdba_alloc_hwbp + * + * Associate a hardware registers with a breakpoint. + * If hw bp is global hw registers descriptor will be allocated + * on every CPU. + * + * Parameters: + * bp - hardware bp + * diagp - pointer to variable that will store error when + * function complete + * Outputs: + * None. + * Returns: + * None + * Locking: + * None. + * Remarks: + * Should be called with correct bp->bp_template + */ + +void +kdba_alloc_hwbp(kdb_bp_t *bp, int *diagp) +{ + int i; + + if (bp->bp_global){ + for (i = 0; i < NR_CPUS; ++i) { + if (!cpu_online(i)) + continue; + bp->bp_hard[i] = kdba_allocbp(&bp->bp_template, diagp, i); + if (*diagp) + break; + } + } else { + bp->bp_hard[bp->bp_cpu] = kdba_allocbp(&bp->bp_template, diagp, bp->bp_cpu); + } + bp->bp_hardtype = 1; +} + +/* * kdba_freebp * - * Deallocate a hardware breakpoint + * Deallocate hw registers descriptor for bp on specific CPU * * Parameters: * None. @@ -623,13 +675,57 @@ kdba_allocbp(kdbhard_bp_t *bph, int *dia * Remarks: */ -void +static void kdba_freebp(kdbhard_bp_t *bph) { bph->bph_free = 1; } /* + * kdba_free_hwbp + * + * Frees allocated hw registers descriptors for bp. + * If hw bp is global, hw registers descriptors will be freed + * on every CPU. + * + * Parameters: + * bp - hardware bp + * Outputs: + * None. + * Returns: + * None + * Locking: + * None. + * Remarks: + * Should be called with correct bp->bp_template + */ + +void +kdba_free_hwbp(kdb_bp_t *bp) +{ + int i; + + /* When kernel enters KDB, first, all local bps + * are removed, so here we don't need to clear + * debug registers. + */ + + if (bp->bp_global){ + for (i = 0; i < NR_CPUS; ++i) { + if (!cpu_online(i)) + continue; + if (bp->bp_hard[i]) + kdba_freebp(bp->bp_hard[i]); + bp->bp_hard[i] = 0; + } + } else { + kdba_freebp(bp->bp_hard[bp->bp_cpu]); + bp->bp_hard[bp->bp_cpu] = NULL; + } + bp->bp_hardtype = 0; +} + +/* * kdba_initbp * * Initialize the breakpoint table for the hardware breakpoint @@ -653,7 +749,7 @@ kdba_freebp(kdbhard_bp_t *bph) void kdba_initbp(void) { - int i; + int i,j; kdbhard_bp_t *bph; /* @@ -662,9 +758,15 @@ kdba_initbp(void) memset(kdb_hardbreaks, '\0', sizeof(kdb_hardbreaks)); - for(i=0,bph=kdb_hardbreaks; ibph_reg = i; - bph->bph_free = 1; + for (i = 0; i < NR_CPUS; ++i) { + /* Called early so we don't know actual + * ammount of CPUs + */ + for(j=0; j < KDB_MAXHARDBPT; j++) { + bph=&(kdb_hardbreaks[i][j]); + bph->bph_reg = j; + bph->bph_free = 1; + } } } @@ -698,6 +800,8 @@ kdba_initbp(void) int kdba_installbp(struct pt_regs *regs, kdb_bp_t *bp) { + int cpu = smp_processor_id(); + /* * Install the breakpoint, if it is not already installed. */ @@ -707,15 +811,27 @@ kdba_installbp(struct pt_regs *regs, kdb } if (!KDB_STATE(SSBPT)) bp->bp_delay = 0; - if (!bp->bp_installed) { - if (bp->bp_hardtype) { + + if (bp->bp_hardtype) { + if (KDB_DEBUG(BP) && !bp->bp_global && cpu != bp->bp_cpu){ + kdb_printf("kdba_removebp: cpu != bp->bp_cpu for local hw bp\n"); + } + + if (KDB_DEBUG(BP) && !bp->bp_hard[cpu]){ + kdb_printf("kdba_removebp: Error - bp_hard[smp_processor_id()] is emply\n"); + return 1; + } + + if (!bp->bp_hard[cpu]->bph_installed){ kdba_installdbreg(bp); - bp->bp_installed = 1; + bp->bp_hard[cpu]->bph_installed = 1; if (KDB_DEBUG(BP)) { kdb_printf("kdba_installbp hardware reg %ld at " kdb_bfd_vma_fmt "\n", - bp->bp_hard->bph_reg, bp->bp_addr); + bp->bp_hard[cpu]->bph_reg, bp->bp_addr); } - } else if (bp->bp_delay) { + } + } else if (!bp->bp_installed) { + if (bp->bp_delay) { if (KDB_DEBUG(BP)) kdb_printf("kdba_installbp delayed bp\n"); kdba_handle_bp(regs, bp); @@ -753,6 +869,8 @@ kdba_installbp(struct pt_regs *regs, kdb int kdba_removebp(kdb_bp_t *bp) { + int cpu = smp_processor_id(); + /* * For hardware breakpoints, remove it from the active register, * for software breakpoints, restore the instruction stream. @@ -760,20 +878,36 @@ kdba_removebp(kdb_bp_t *bp) if (KDB_DEBUG(BP)) { kdb_printf("kdba_removebp bp_installed %d\n", bp->bp_installed); } - if (bp->bp_installed) { - if (bp->bp_hardtype) { + + if (bp->bp_hardtype) { + if (KDB_DEBUG(BP) && !bp->bp_global && cpu != bp->bp_cpu){ + kdb_printf("kdba_removebp: cpu != bp->bp_cpu for local hw bp\n"); + } + + if (KDB_DEBUG(BP) && !bp->bp_hard[cpu]){ + kdb_printf("kdba_removebp: Error - bp_hard[smp_processor_id()] is emply\n"); + return 1; + } + + if (KDB_DEBUG(BP)) { + kdb_printf("kdb: removing hardware reg %ld at " kdb_bfd_vma_fmt "\n", + bp->bp_hard[cpu]->bph_reg, bp->bp_addr); + } + + if (bp->bp_hard[cpu]->bph_installed){ if (KDB_DEBUG(BP)) { - kdb_printf("kdb: removing hardware reg %ld at " kdb_bfd_vma_fmt "\n", - bp->bp_hard->bph_reg, bp->bp_addr); + kdb_printf("kdba_installbp hardware reg %ld at " kdb_bfd_vma_fmt "\n", + bp->bp_hard[cpu]->bph_reg, bp->bp_addr); } kdba_removedbreg(bp); - } else { - if (KDB_DEBUG(BP)) - kdb_printf("kdb: restoring instruction 0x%x at " kdb_bfd_vma_fmt "\n", - bp->bp_inst, bp->bp_addr); - if (kdb_putword(bp->bp_addr, bp->bp_inst, 1)) - return(1); + bp->bp_hard[cpu]->bph_installed = 0; } + } else if (bp->bp_installed) { + if (KDB_DEBUG(BP)) + kdb_printf("kdb: restoring instruction 0x%x at " kdb_bfd_vma_fmt "\n", + bp->bp_inst, bp->bp_addr); + if (kdb_putword(bp->bp_addr, bp->bp_inst, 1)) + return(1); bp->bp_installed = 0; } return(0); Index: linux-2.6.24-rc2/arch/x86/kdb/kdbasupport_32.c =================================================================== --- linux-2.6.24-rc2.orig/arch/x86/kdb/kdbasupport_32.c +++ linux-2.6.24-rc2/arch/x86/kdb/kdbasupport_32.c @@ -82,7 +82,7 @@ kdba_putdr(int regnum, kdb_machreg_t con } } -static kdb_machreg_t +kdb_machreg_t kdba_getdr(int regnum) { kdb_machreg_t contents = 0; @@ -142,40 +142,42 @@ kdba_putdr7(kdb_machreg_t contents) void kdba_installdbreg(kdb_bp_t *bp) { + int cpu = smp_processor_id(); + kdb_machreg_t dr7; dr7 = kdba_getdr7(); - kdba_putdr(bp->bp_hard->bph_reg, bp->bp_addr); + kdba_putdr(bp->bp_hard[cpu]->bph_reg, bp->bp_addr); dr7 |= DR7_GE; if (cpu_has_de) set_in_cr4(X86_CR4_DE); - switch (bp->bp_hard->bph_reg){ + switch (bp->bp_hard[cpu]->bph_reg){ case 0: - DR7_RW0SET(dr7,bp->bp_hard->bph_mode); - DR7_LEN0SET(dr7,bp->bp_hard->bph_length); + DR7_RW0SET(dr7,bp->bp_hard[cpu]->bph_mode); + DR7_LEN0SET(dr7,bp->bp_hard[cpu]->bph_length); DR7_G0SET(dr7); break; case 1: - DR7_RW1SET(dr7,bp->bp_hard->bph_mode); - DR7_LEN1SET(dr7,bp->bp_hard->bph_length); + DR7_RW1SET(dr7,bp->bp_hard[cpu]->bph_mode); + DR7_LEN1SET(dr7,bp->bp_hard[cpu]->bph_length); DR7_G1SET(dr7); break; case 2: - DR7_RW2SET(dr7,bp->bp_hard->bph_mode); - DR7_LEN2SET(dr7,bp->bp_hard->bph_length); + DR7_RW2SET(dr7,bp->bp_hard[cpu]->bph_mode); + DR7_LEN2SET(dr7,bp->bp_hard[cpu]->bph_length); DR7_G2SET(dr7); break; case 3: - DR7_RW3SET(dr7,bp->bp_hard->bph_mode); - DR7_LEN3SET(dr7,bp->bp_hard->bph_length); + DR7_RW3SET(dr7,bp->bp_hard[cpu]->bph_mode); + DR7_LEN3SET(dr7,bp->bp_hard[cpu]->bph_length); DR7_G3SET(dr7); break; default: kdb_printf("kdb: Bad debug register!! %ld\n", - bp->bp_hard->bph_reg); + bp->bp_hard[cpu]->bph_reg); break; } @@ -188,11 +190,12 @@ kdba_removedbreg(kdb_bp_t *bp) { int regnum; kdb_machreg_t dr7; + int cpu = smp_processor_id(); - if (!bp->bp_hard) + if (!bp->bp_hard[cpu]) return; - regnum = bp->bp_hard->bph_reg; + regnum = bp->bp_hard[cpu]->bph_reg; dr7 = kdba_getdr7(); Index: linux-2.6.24-rc2/include/linux/kdbprivate.h =================================================================== --- linux-2.6.24-rc2.orig/include/linux/kdbprivate.h +++ linux-2.6.24-rc2/include/linux/kdbprivate.h @@ -204,7 +204,7 @@ typedef struct _kdb_bp { int bp_cpu; /* Cpu # (if bp_global == 0) */ kdbhard_bp_t bp_template; /* Hardware breakpoint template */ - kdbhard_bp_t *bp_hard; /* Hardware breakpoint structure */ + kdbhard_bp_t* bp_hard[NR_CPUS]; /* Hardware breakpoint structure */ int bp_adjust; /* Adjustment to PC for real instruction */ } kdb_bp_t; @@ -219,8 +219,8 @@ extern kdb_bp_t kdb_breakpoints[/* KDB_M */ extern void kdba_initbp(void); extern void kdba_printbp(kdb_bp_t *); -extern kdbhard_bp_t *kdba_allocbp(kdbhard_bp_t *, int *); -extern void kdba_freebp(kdbhard_bp_t *); +extern void kdba_alloc_hwbp(kdb_bp_t *bp, int *diagp); +extern void kdba_free_hwbp(kdb_bp_t *bp); extern int kdba_parsebp(int, const char**, int *, kdb_bp_t*); extern char *kdba_bptype(kdbhard_bp_t *); extern void kdba_setsinglestep(struct pt_regs *); Index: linux-2.6.24-rc2/kdb/kdb_bp.c =================================================================== --- linux-2.6.24-rc2.orig/kdb/kdb_bp.c +++ linux-2.6.24-rc2/kdb/kdb_bp.c @@ -54,8 +54,9 @@ kdb_bp_install_global(struct pt_regs *re kdb_printf("kdb_bp_install_global bp %d bp_enabled %d bp_global %d\n", i, kdb_breakpoints[i].bp_enabled, kdb_breakpoints[i].bp_global); } + /* Hw breakpoints local or global are installed in kdb_bp_install_local() */ if (kdb_breakpoints[i].bp_enabled - && kdb_breakpoints[i].bp_global) { + && (kdb_breakpoints[i].bp_global && !kdb_breakpoints[i].bp_hardtype)) { kdba_installbp(regs, &kdb_breakpoints[i]); } } @@ -86,18 +87,32 @@ void kdb_bp_install_local(struct pt_regs *regs) { int i; + int do_install; for(i=0; i=0; i--) { + do_remove = 0; + if (KDB_DEBUG(BP)) { kdb_printf("kdb_bp_remove_local bp %d bp_enabled %d bp_global %d cpu %d bp_cpu %d\n", i, kdb_breakpoints[i].bp_enabled, kdb_breakpoints[i].bp_global, smp_processor_id(), kdb_breakpoints[i].bp_cpu); } - if (kdb_breakpoints[i].bp_enabled - && kdb_breakpoints[i].bp_cpu == smp_processor_id() - && !kdb_breakpoints[i].bp_global){ - kdba_removebp(&kdb_breakpoints[i]); + + if (!kdb_breakpoints[i].bp_enabled) + continue; + + if (kdb_breakpoints[i].bp_hardtype){ + if((kdb_breakpoints[i].bp_cpu == smp_processor_id()) || + kdb_breakpoints[i].bp_global) + do_remove = 1; + } else { + if(kdb_breakpoints[i].bp_cpu == smp_processor_id() && + !kdb_breakpoints[i].bp_global) + do_remove = 1; } + + if (do_remove) + kdba_removebp(&kdb_breakpoints[i]); } } @@ -332,12 +362,13 @@ kdb_bp(int argc, const char **argv) * attempt to allocate a hardware register for it. */ if (!bp->bp_template.bph_free) { - bp->bp_hard = kdba_allocbp(&bp->bp_template, &diag); - if (diag) { + kdba_alloc_hwbp(bp, &diag); + if (diag){ bp->bp_enabled = 0; + bp->bp_hardtype = 0; + kdba_free_hwbp(bp); return diag; } - bp->bp_hardtype = 1; } kdb_printbp(bp, bpno); @@ -432,11 +463,8 @@ kdb_bc(int argc, const char **argv) switch (cmd) { case KDBCMD_BC: - if (bp->bp_hardtype) { - kdba_freebp(bp->bp_hard); - bp->bp_hard = NULL; - bp->bp_hardtype = 0; - } + if (bp->bp_hardtype) + kdba_free_hwbp(bp); bp->bp_enabled = 0; bp->bp_global = 0; @@ -455,12 +483,14 @@ kdb_bc(int argc, const char **argv) */ if (!bp->bp_template.bph_free && !bp->bp_hardtype) { - bp->bp_hard = kdba_allocbp(&bp->bp_template, &diag); - if (diag) { + kdba_alloc_hwbp(bp, &diag); + if (diag){ bp->bp_enabled = 0; + bp->bp_hardtype = 0; + kdba_free_hwbp(bp); return diag; } - bp->bp_hardtype = 1; + } bp->bp_enabled = 1; @@ -479,11 +509,9 @@ kdb_bc(int argc, const char **argv) * give up the hardware register which is allocated * to it. */ - if (bp->bp_hardtype) { - kdba_freebp(bp->bp_hard); - bp->bp_hard = NULL; - bp->bp_hardtype = 0; - } + + if (bp->bp_hardtype) + kdba_free_hwbp(bp); bp->bp_enabled = 0; Index: linux-2.6.24-rc2/include/asm-x86/kdbprivate_32.h =================================================================== --- linux-2.6.24-rc2.orig/include/asm-x86/kdbprivate_32.h +++ linux-2.6.24-rc2/include/asm-x86/kdbprivate_32.h @@ -45,6 +45,7 @@ typedef struct _kdbhard_bp { unsigned int bph_write:1; /* Write Data breakpoint */ unsigned int bph_mode:2; /* 0=inst, 1=write, 2=io, 3=read */ unsigned int bph_length:2; /* 0=1, 1=2, 2=BAD, 3=4 (bytes) */ + unsigned int bph_installed; /* flag: hw bp is installed */ } kdbhard_bp_t; #define IA32_BREAKPOINT_INSTRUCTION 0xcc Index: linux-2.6.24-rc2/arch/x86/kdb/kdba_bp_64.c =================================================================== --- linux-2.6.24-rc2.orig/arch/x86/kdb/kdba_bp_64.c +++ linux-2.6.24-rc2/arch/x86/kdb/kdba_bp_64.c @@ -22,10 +22,10 @@ static char *kdba_rwtypes[] = { "Instruc /* * Table describing processor architecture hardware - * breakpoint registers. + * breakpoint registers for every CPU. */ -kdbhard_bp_t kdb_hardbreaks[KDB_MAXHARDBPT]; +static kdbhard_bp_t kdb_hardbreaks[NR_CPUS][KDB_MAXHARDBPT]; /* * kdba_db_trap @@ -75,6 +75,7 @@ kdba_db_trap(struct pt_regs *regs, int e int i; kdb_dbtrap_t rv = KDB_DB_BPT; kdb_bp_t *bp; + int cpu = smp_processor_id(); if (KDB_NULL_REGS(regs)) return KDB_DB_NOBPT; @@ -103,8 +104,12 @@ kdba_db_trap(struct pt_regs *regs, int e kdb_printf("bp for this cpu\n"); if (bp->bp_delayed) { bp->bp_delayed = 0; - if (KDB_DEBUG(BP)) + if (KDB_DEBUG(BP)){ + /* Can't be hw breakpoint */ + if (bp->bp_hardtype) + kdb_printf("kdb: Error - hw bp delayed\n"); kdb_printf("kdba_installbp\n"); + } kdba_installbp(regs, bp); if (!KDB_STATE(DOING_SS)) { regs->eflags &= ~EF_TF; @@ -211,8 +216,8 @@ handle: for(i=0, bp=kdb_breakpoints; ibp_free) && (bp->bp_global || bp->bp_cpu == smp_processor_id()) - && (bp->bp_hard) - && (bp->bp_hard->bph_reg == reg)) { + && (bp->bp_hard[cpu]) + && (bp->bp_hard[cpu]->bph_reg == reg)) { /* * Hit this breakpoint. */ @@ -437,12 +442,18 @@ kdba_printbpreg(kdbhard_bp_t *bph) void kdba_printbp(kdb_bp_t *bp) { + int cpu; + kdb_printf("\n is enabled"); if (bp->bp_hardtype) { - kdba_printbpreg(bp->bp_hard); - if (bp->bp_hard->bph_mode != 0) { + if (bp->bp_global) + cpu = smp_processor_id(); + else + cpu = bp->bp_cpu; + kdba_printbpreg(bp->bp_hard[cpu]); + if (bp->bp_hard[cpu]->bph_mode != 0) { kdb_printf(" for %d bytes", - bp->bp_hard->bph_length+1); + bp->bp_hard[cpu]->bph_length+1); } } } @@ -555,7 +566,7 @@ kdba_parsebp(int argc, const char **argv /* * kdba_allocbp * - * Associate a hardware register with a breakpoint. + * Allocate hw register for bp on specific CPU * * Parameters: * None. @@ -569,13 +580,14 @@ kdba_parsebp(int argc, const char **argv * Remarks: */ -kdbhard_bp_t * -kdba_allocbp(kdbhard_bp_t *bph, int *diagp) +static kdbhard_bp_t * +kdba_allocbp(kdbhard_bp_t *bph, int *diagp, unsigned int cpu) { int i; kdbhard_bp_t *newbph; - for(i=0,newbph=kdb_hardbreaks; i < KDB_MAXHARDBPT; i++, newbph++) { + for(i=0; i < KDB_MAXHARDBPT; i++) { + newbph=&(kdb_hardbreaks[cpu][i]); if (newbph->bph_free) { break; } @@ -607,9 +619,49 @@ kdba_allocbp(kdbhard_bp_t *bph, int *dia } /* + * kdba_alloc_hwbp + * + * Associate a hardware registers with a breakpoint. + * If hw bp is global hw registers descriptor will be allocated + * on every CPU. + * + * Parameters: + * bp - hardware bp + * diagp - pointer to variable that will store error when + * function complete + * Outputs: + * None. + * Returns: + * None + * Locking: + * None. + * Remarks: + * Should be called with correct bp->bp_template + */ + +void +kdba_alloc_hwbp(kdb_bp_t *bp, int *diagp) +{ + int i; + + if (bp->bp_global){ + for (i = 0; i < NR_CPUS; ++i) { + if (!cpu_online(i)) + continue; + bp->bp_hard[i] = kdba_allocbp(&bp->bp_template, diagp, i); + if (*diagp) + break; + } + } else { + bp->bp_hard[bp->bp_cpu] = kdba_allocbp(&bp->bp_template, diagp, bp->bp_cpu); + } + bp->bp_hardtype = 1; +} + +/* * kdba_freebp * - * Deallocate a hardware breakpoint + * Deallocate hw registers descriptor for bp on specific CPU * * Parameters: * None. @@ -622,13 +674,57 @@ kdba_allocbp(kdbhard_bp_t *bph, int *dia * Remarks: */ -void +static void kdba_freebp(kdbhard_bp_t *bph) { bph->bph_free = 1; } /* + * kdba_free_hwbp + * + * Frees allocated hw registers descriptors for bp. + * If hw bp is global, hw registers descriptors will be freed + * on every CPU. + * + * Parameters: + * bp - hardware bp + * Outputs: + * None. + * Returns: + * None + * Locking: + * None. + * Remarks: + * Should be called with correct bp->bp_template + */ + +void +kdba_free_hwbp(kdb_bp_t *bp) +{ + int i; + + /* When kernel enters KDB, first, all local bps + * are removed, so here we don't need to clear + * debug registers. + */ + + if (bp->bp_global){ + for (i = 0; i < NR_CPUS; ++i) { + if (!cpu_online(i)) + continue; + if (bp->bp_hard[i]) + kdba_freebp(bp->bp_hard[i]); + bp->bp_hard[i] = 0; + } + } else { + kdba_freebp(bp->bp_hard[bp->bp_cpu]); + bp->bp_hard[bp->bp_cpu] = NULL; + } + bp->bp_hardtype = 0; +} + +/* * kdba_initbp * * Initialize the breakpoint table for the hardware breakpoint @@ -652,7 +748,7 @@ kdba_freebp(kdbhard_bp_t *bph) void kdba_initbp(void) { - int i; + int i,j; kdbhard_bp_t *bph; /* @@ -661,9 +757,15 @@ kdba_initbp(void) memset(kdb_hardbreaks, '\0', sizeof(kdb_hardbreaks)); - for(i=0,bph=kdb_hardbreaks; ibph_reg = i; - bph->bph_free = 1; + for (i = 0; i < NR_CPUS; ++i) { + /* Called early so we don't know actual + * ammount of CPUs + */ + for(j=0; j < KDB_MAXHARDBPT; j++) { + bph=&(kdb_hardbreaks[i][j]); + bph->bph_reg = j; + bph->bph_free = 1; + } } } @@ -695,6 +797,8 @@ kdba_initbp(void) int kdba_installbp(struct pt_regs *regs, kdb_bp_t *bp) { + int cpu = smp_processor_id(); + /* * Install the breakpoint, if it is not already installed. */ @@ -704,15 +808,27 @@ kdba_installbp(struct pt_regs *regs, kdb } if (!KDB_STATE(SSBPT)) bp->bp_delay = 0; - if (!bp->bp_installed) { - if (bp->bp_hardtype) { + + if (bp->bp_hardtype) { + if (KDB_DEBUG(BP) && !bp->bp_global && cpu != bp->bp_cpu){ + kdb_printf("kdba_removebp: cpu != bp->bp_cpu for local hw bp\n"); + } + + if (KDB_DEBUG(BP) && !bp->bp_hard[cpu]){ + kdb_printf("kdba_removebp: Error - bp_hard[smp_processor_id()] is emply\n"); + return 1; + } + + if (!bp->bp_hard[cpu]->bph_installed){ kdba_installdbreg(bp); - bp->bp_installed = 1; + bp->bp_hard[cpu]->bph_installed = 1; if (KDB_DEBUG(BP)) { kdb_printf("kdba_installbp hardware reg %ld at " kdb_bfd_vma_fmt "\n", - bp->bp_hard->bph_reg, bp->bp_addr); + bp->bp_hard[cpu]->bph_reg, bp->bp_addr); } - } else if (bp->bp_delay) { + } + } else if (!bp->bp_installed) { + if (bp->bp_delay) { if (KDB_DEBUG(BP)) kdb_printf("kdba_installbp delayed bp\n"); kdba_handle_bp(regs, bp); @@ -750,6 +866,8 @@ kdba_installbp(struct pt_regs *regs, kdb int kdba_removebp(kdb_bp_t *bp) { + int cpu = smp_processor_id(); + /* * For hardware breakpoints, remove it from the active register, * for software breakpoints, restore the instruction stream. @@ -757,20 +875,36 @@ kdba_removebp(kdb_bp_t *bp) if (KDB_DEBUG(BP)) { kdb_printf("kdba_removebp bp_installed %d\n", bp->bp_installed); } - if (bp->bp_installed) { - if (bp->bp_hardtype) { + + if (bp->bp_hardtype) { + if (KDB_DEBUG(BP) && !bp->bp_global && cpu != bp->bp_cpu){ + kdb_printf("kdba_removebp: cpu != bp->bp_cpu for local hw bp\n"); + } + + if (KDB_DEBUG(BP) && !bp->bp_hard[cpu]){ + kdb_printf("kdba_removebp: Error - bp_hard[smp_processor_id()] is emply\n"); + return 1; + } + + if (KDB_DEBUG(BP)) { + kdb_printf("kdb: removing hardware reg %ld at " kdb_bfd_vma_fmt "\n", + bp->bp_hard[cpu]->bph_reg, bp->bp_addr); + } + + if (bp->bp_hard[cpu]->bph_installed){ if (KDB_DEBUG(BP)) { - kdb_printf("kdb: removing hardware reg %ld at " kdb_bfd_vma_fmt "\n", - bp->bp_hard->bph_reg, bp->bp_addr); + kdb_printf("kdba_installbp hardware reg %ld at " kdb_bfd_vma_fmt "\n", + bp->bp_hard[cpu]->bph_reg, bp->bp_addr); } kdba_removedbreg(bp); - } else { - if (KDB_DEBUG(BP)) - kdb_printf("kdb: restoring instruction 0x%x at " kdb_bfd_vma_fmt "\n", - bp->bp_inst, bp->bp_addr); - if (kdb_putword(bp->bp_addr, bp->bp_inst, 1)) - return(1); + bp->bp_hard[cpu]->bph_installed = 0; } + } else if (bp->bp_installed) { + if (KDB_DEBUG(BP)) + kdb_printf("kdb: restoring instruction 0x%x at " kdb_bfd_vma_fmt "\n", + bp->bp_inst, bp->bp_addr); + if (kdb_putword(bp->bp_addr, bp->bp_inst, 1)) + return(1); bp->bp_installed = 0; } return(0); Index: linux-2.6.24-rc2/arch/x86/kdb/kdbasupport_64.c =================================================================== --- linux-2.6.24-rc2.orig/arch/x86/kdb/kdbasupport_64.c +++ linux-2.6.24-rc2/arch/x86/kdb/kdbasupport_64.c @@ -55,40 +55,42 @@ kdba_putdr7(kdb_machreg_t contents) void kdba_installdbreg(kdb_bp_t *bp) { + int cpu = smp_processor_id(); + kdb_machreg_t dr7; dr7 = kdba_getdr7(); - kdba_putdr(bp->bp_hard->bph_reg, bp->bp_addr); + kdba_putdr(bp->bp_hard[cpu]->bph_reg, bp->bp_addr); dr7 |= DR7_GE; if (cpu_has_de) set_in_cr4(X86_CR4_DE); - switch (bp->bp_hard->bph_reg){ + switch (bp->bp_hard[cpu]->bph_reg){ case 0: - DR7_RW0SET(dr7,bp->bp_hard->bph_mode); - DR7_LEN0SET(dr7,bp->bp_hard->bph_length); + DR7_RW0SET(dr7,bp->bp_hard[cpu]->bph_mode); + DR7_LEN0SET(dr7,bp->bp_hard[cpu]->bph_length); DR7_G0SET(dr7); break; case 1: - DR7_RW1SET(dr7,bp->bp_hard->bph_mode); - DR7_LEN1SET(dr7,bp->bp_hard->bph_length); + DR7_RW1SET(dr7,bp->bp_hard[cpu]->bph_mode); + DR7_LEN1SET(dr7,bp->bp_hard[cpu]->bph_length); DR7_G1SET(dr7); break; case 2: - DR7_RW2SET(dr7,bp->bp_hard->bph_mode); - DR7_LEN2SET(dr7,bp->bp_hard->bph_length); + DR7_RW2SET(dr7,bp->bp_hard[cpu]->bph_mode); + DR7_LEN2SET(dr7,bp->bp_hard[cpu]->bph_length); DR7_G2SET(dr7); break; case 3: - DR7_RW3SET(dr7,bp->bp_hard->bph_mode); - DR7_LEN3SET(dr7,bp->bp_hard->bph_length); + DR7_RW3SET(dr7,bp->bp_hard[cpu]->bph_mode); + DR7_LEN3SET(dr7,bp->bp_hard[cpu]->bph_length); DR7_G3SET(dr7); break; default: kdb_printf("kdb: Bad debug register!! %ld\n", - bp->bp_hard->bph_reg); + bp->bp_hard[cpu]->bph_reg); break; } @@ -101,11 +103,12 @@ kdba_removedbreg(kdb_bp_t *bp) { int regnum; kdb_machreg_t dr7; + int cpu = smp_processor_id(); - if (!bp->bp_hard) + if (!bp->bp_hard[cpu]) return; - regnum = bp->bp_hard->bph_reg; + regnum = bp->bp_hard[cpu]->bph_reg; dr7 = kdba_getdr7(); Index: linux-2.6.24-rc2/include/asm-x86/kdbprivate_64.h =================================================================== --- linux-2.6.24-rc2.orig/include/asm-x86/kdbprivate_64.h +++ linux-2.6.24-rc2/include/asm-x86/kdbprivate_64.h @@ -45,10 +45,9 @@ typedef struct _kdbhard_bp { unsigned int bph_write:1; /* Write Data breakpoint */ unsigned int bph_mode:2; /* 0=inst, 1=write, 2=io, 3=read */ unsigned int bph_length:2; /* 0=1, 1=2, 2=BAD, 3=4 (bytes) */ + unsigned int bph_installed; /* flag: hw bp is installed */ } kdbhard_bp_t; -extern kdbhard_bp_t kdb_hardbreaks[/* KDB_MAXHARDBPT */]; - #define IA32_BREAKPOINT_INSTRUCTION 0xcc #define DR6_BT 0x00008000 --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jidong.xiao@gmail.com Thu May 8 02:02:55 2008 Received: with ECARTIS (v1.0.0; list kdb); Thu, 08 May 2008 02:03:07 -0700 (PDT) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4892pI1026987 for ; Thu, 8 May 2008 02:02:54 -0700 X-ASG-Debug-ID: 1210237416-3f4400810000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from wf-out-1314.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 492D0166F78A for ; Thu, 8 May 2008 02:03:36 -0700 (PDT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by cuda.sgi.com with ESMTP id fxGr6oR5eK9re75j for ; Thu, 08 May 2008 02:03:36 -0700 (PDT) Received: by wf-out-1314.google.com with SMTP id 26so643382wfd.32 for ; Thu, 08 May 2008 02:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=ZsFeW57RqCNWqI7wsw9HZS4jJQZWvYmFgXbAjPmEIQI=; b=UBIcHlCOesoE1Q2S1C6ns/m5mYzG6jtVO8Va5KMIPXs58ygAzvNnuRiThi5ebUnpx/G+LuCvl/2j4RHbkkDTRp0o2fgXnaHdVVVYP0NeS6aZ6TYvIWtyVkEZy0sGsRStdTVsXe/euPdr6t0Lxzzdb4VSHDF7aAr7eiULS8M9zYc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eT+ijhxV/1B7S2cWSwiSoEPk1FV5HjEvm+MY7NyzynYEa77riOgJNpVeNbbPwvBJaA5AyOQ2pRA0HhsCAFRGS6k8fgoae4AWOULxYa9sqItGEz9vme67l+6CtIAlUHNM4g+WB2uEoW5do7zj4B9bYXYyYa5nfpsUrifOLRL4YdQ= Received: by 10.142.43.7 with SMTP id q7mr1300120wfq.67.1210237415919; Thu, 08 May 2008 02:03:35 -0700 (PDT) Received: by 10.142.237.13 with HTTP; Thu, 8 May 2008 02:03:35 -0700 (PDT) Message-ID: <4104961b0805080203o4be5dfbw8a3f903b27ec2c29@mail.gmail.com> Date: Thu, 8 May 2008 17:03:35 +0800 From: "jidong xiao" To: "Konstantin Baydarov" X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. Cc: "Avi Nehori" , kdb@oss.sgi.com In-Reply-To: <20080505144419.759ec2fc@windmill.dev.rtsoft.ru> MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline References: <481EDC13.1040504@checkpoint.com> <20080505144419.759ec2fc@windmill.dev.rtsoft.ru> X-Barracuda-Connect: wf-out-1314.google.com[209.85.200.170] X-Barracuda-Start-Time: 1210237417 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.49802 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1355 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jidong.xiao@gmail.com Precedence: bulk X-list: kdb On Mon, May 5, 2008 at 6:44 PM, Konstantin Baydarov wrote: > Yes It's known issue. > On Mon, 05 May 2008 13:06:11 +0300 > Avi Nehori wrote: > > > Hi, > > I'm trying to set a watch point with bpha as follows : > > bpha address dataw 4 > > but the watchpoint is never called when the memory address is changed. > > is it a know bug ? > > is there a patch ? > > Here is my previous mail (http://oss.sgi.com/archives/kdb/2007-11/msg00037.html) with patch that fixes bpha problem: > Global HW BP don't work: > 1) Install global HW BP > root@192.168.2.10:~# > root@192.168.2.10:~# D > Entering kdb (current=0xc04433a0, pid 0) on processor 0 due to Keyboard Entry > [0]kdb> bpha do_sync > Forced Instruction(Register) BP #0 at 0xc0181539 (do_sync) > is enabled in dr0 globally > [0]kdb> go > > -bash: D: command not found > root@192.168.2.10:~# > > 1) Try CPU 0 > root@192.168.2.10:~# > root@192.168.2.10:~# taskset -c 0 sync > Instruction(Register) breakpoint #0 at 0xc0181539 > 0xc0181539 do_sync: push %ebx > > Entering kdb (0xc1b6d030, pid 1319) on processor 0 due to Debug @ 0xc0181539 > [0]kdb> go > root@192.168.2.10:~# > - OK > > 1) Try CPU 1 > root@192.168.2.10:~# > root@192.168.2.10:~# taskset -c 1 sync > root@192.168.2.10:~# > - Doesn't work. > > Signed-off-by: Konstantin Baydarov > Description: > This patch adds support for global hardware breakpoints to KDB on x86 > targets. Hardware breakpoints are installed by setting per CPU db > registers. So to make a hardware breakpoint global it should be > installed in db registers on every CPU in system. So global hw bp > can't be handle by kdb_bp_install_global and kdb_bp_remove_global > because these functions are called only on "monarch" CPU, > kdb_bp_install_local and kdb_bp_remove_local should be used instead > because these are called for all CPUs. > > Main changes: > - kdb_hardbreaks[KDB_MAXHARDBPT] - The processor architecture > hardware breakpoint registers descriptors is defined for every > CPU: > static kdbhard_bp_t kdb_hardbreaks[NR_CPUS][KDB_MAXHARDBPT]; > > - "kdb_bp_t" (main breakpint structure) contains hardware > breakpoint registers for every CPU: > kdbhard_bp_t* bp_hard[NR_CPUS]; > > - global hardware breakpoint installation and removal is handled > by kdb_bp_install_local and kdb_bp_remove_local which are > executed on every CPU > > - kdba_allocbp andkdba_freebp are static, now kdba_alloc_hwbp and > kdba_free_hwbp are used for allocating/freeing hardware breakpoint > registers. If the hardware breakpoint is global then > kdba_alloc_hwbp tries to allocate hardware breakpoint registers on > every CPU. If there is no free hardware breakpoint on a CPU the > allocation fails. > > - bph_installed was added to the hardware breakpoint descriptor to > track per CPU hardware breakpoint installation. > > Patch against kernel 2.6.24-rc2 > > Index: linux-2.6.24-rc2/arch/x86/kdb/kdba_bp_32.c > =================================================================== > --- linux-2.6.24-rc2.orig/arch/x86/kdb/kdba_bp_32.c > +++ linux-2.6.24-rc2/arch/x86/kdb/kdba_bp_32.c > @@ -22,10 +22,10 @@ static char *kdba_rwtypes[] = { "Instruc > > /* > * Table describing processor architecture hardware > - * breakpoint registers. > + * breakpoint registers for every CPU. > */ > > -static kdbhard_bp_t kdb_hardbreaks[KDB_MAXHARDBPT]; > +static kdbhard_bp_t kdb_hardbreaks[NR_CPUS][KDB_MAXHARDBPT]; > > /* > + * kdba_free_hwbp > + * > + * Frees allocated hw registers descriptors for bp. > + * If hw bp is global, hw registers descriptors will be freed > + * on every CPU. > + * > + * Parameters: > + * bp - hardware bp > + * Outputs: > + * None. > + * Returns: > + * None > + * Locking: > + * None. > + * Remarks: > + * Should be called with correct bp->bp_template > + */ > + > +void > +kdba_free_hwbp(kdb_bp_t *bp) > +{ > + int i; > + > + /* When kernel enters KDB, first, all local bps > + * are removed, so here we don't need to clear > + * debug registers. > + */ > + > + if (bp->bp_global){ > + for (i = 0; i < NR_CPUS; ++i) { > + if (!cpu_online(i)) > + continue; > + if (bp->bp_hard[i]) > + kdba_freebp(bp->bp_hard[i]); > + bp->bp_hard[i] = 0; > + } > + } else { > + kdba_freebp(bp->bp_hard[bp->bp_cpu]); > + bp->bp_hard[bp->bp_cpu] = NULL; > + } > + bp->bp_hardtype = 0; > +} > + > +/* > * kdba_initbp > * > * Initialize the breakpoint table for the hardware breakpoint > @@ -653,7 +749,7 @@ kdba_freebp(kdbhard_bp_t *bph) > void > kdba_initbp(void) > { > - int i; > + int i,j; > kdbhard_bp_t *bph; > > /* > @@ -662,9 +758,15 @@ kdba_initbp(void) > > memset(kdb_hardbreaks, '\0', sizeof(kdb_hardbreaks)); > > - for(i=0,bph=kdb_hardbreaks; i - bph->bph_reg = i; > - bph->bph_free = 1; > + for (i = 0; i < NR_CPUS; ++i) { > + /* Called early so we don't know actual > + * ammount of CPUs > + */ > + for(j=0; j < KDB_MAXHARDBPT; j++) { > + bph=&(kdb_hardbreaks[i][j]); > + bph->bph_reg = j; > + bph->bph_free = 1; > + } > } > } > > @@ -698,6 +800,8 @@ kdba_initbp(void) > int > kdba_installbp(struct pt_regs *regs, kdb_bp_t *bp) > { > + int cpu = smp_processor_id(); > + > /* > * Install the breakpoint, if it is not already installed. > */ > @@ -707,15 +811,27 @@ kdba_installbp(struct pt_regs *regs, kdb > } > if (!KDB_STATE(SSBPT)) > bp->bp_delay = 0; > - if (!bp->bp_installed) { > - if (bp->bp_hardtype) { > + > + if (bp->bp_hardtype) { > + if (KDB_DEBUG(BP) && !bp->bp_global && cpu != bp->bp_cpu){ > + kdb_printf("kdba_removebp: cpu != bp->bp_cpu for local hw bp\n"); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "s/kdba_removebp/kdba_installbp/", right? > + } > + > + if (KDB_DEBUG(BP) && !bp->bp_hard[cpu]){ > + kdb_printf("kdba_removebp: Error - bp_hard[smp_processor_id()] is emply\n"); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ And here. > + return 1; > + } > + > + if (!bp->bp_hard[cpu]->bph_installed){ > kdba_installdbreg(bp); > - bp->bp_installed = 1; > + bp->bp_hard[cpu]->bph_installed = 1; > if (KDB_DEBUG(BP)) { > kdb_printf("kdba_installbp hardware reg %ld at " kdb_bfd_vma_fmt "\n", > - bp->bp_hard->bph_reg, bp->bp_addr); > + bp->bp_hard[cpu]->bph_reg, bp->bp_addr); > } > - } else if (bp->bp_delay) { > + } > + } else if (!bp->bp_installed) { > + if (bp->bp_delay) { > if (KDB_DEBUG(BP)) > kdb_printf("kdba_installbp delayed bp\n"); > kdba_handle_bp(regs, bp); > @@ -753,6 +869,8 @@ kdba_installbp(struct pt_regs *regs, kdb > int > kdba_removebp(kdb_bp_t *bp) > { > + int cpu = smp_processor_id(); > + > /* > * For hardware breakpoints, remove it from the active register, > * for software breakpoints, restore the instruction stream. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kbaidarov@ru.mvista.com Thu May 8 04:12:14 2008 Received: with ECARTIS (v1.0.0; list kdb); Thu, 08 May 2008 04:12:27 -0700 (PDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m48BCAC7003498 for ; Thu, 8 May 2008 04:12:14 -0700 X-ASG-Debug-ID: 1210245174-0e59014c0000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.dev.rtsoft.ru (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with SMTP id 406C510FA3F9 for ; Thu, 8 May 2008 04:12:54 -0700 (PDT) Received: from mail.dev.rtsoft.ru (rtsoft2.corbina.net [85.21.88.2]) by cuda.sgi.com with SMTP id 7MbpgZLIE1o9PoJB for ; Thu, 08 May 2008 04:12:54 -0700 (PDT) Received: (qmail 28349 invoked from network); 8 May 2008 11:12:53 -0000 Received: from windmill.dev.rtsoft.ru.dev.rtsoft.ru (HELO windmill.dev.rtsoft.ru) (192.168.1.124) by mail.dev.rtsoft.ru with SMTP; 8 May 2008 11:12:53 -0000 Date: Thu, 8 May 2008 15:08:32 +0400 From: Konstantin Baydarov To: "jidong xiao" Cc: "Avi Nehori" , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. Message-ID: <20080508150832.3a6890df@windmill.dev.rtsoft.ru> In-Reply-To: <4104961b0805080203o4be5dfbw8a3f903b27ec2c29@mail.gmail.com> References: <481EDC13.1040504@checkpoint.com> <20080505144419.759ec2fc@windmill.dev.rtsoft.ru> <4104961b0805080203o4be5dfbw8a3f903b27ec2c29@mail.gmail.com> X-Mailer: Claws Mail 3.1.0 (GTK+ 2.12.1; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Barracuda-Connect: rtsoft2.corbina.net[85.21.88.2] X-Barracuda-Start-Time: 1210245176 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.49802 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1356 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kbaidarov@ru.mvista.com Precedence: bulk X-list: kdb Correct. On Thu, 8 May 2008 17:03:35 +0800 "jidong xiao" wrote: > On Mon, May 5, 2008 at 6:44 PM, Konstantin Baydarov > wrote: > > Yes It's known issue. > > On Mon, 05 May 2008 13:06:11 +0300 > > Avi Nehori wrote: > > > > > Hi, > > > I'm trying to set a watch point with bpha as follows : > > > bpha address dataw 4 > > > but the watchpoint is never called when the memory address is > > > changed. is it a know bug ? > > > is there a patch ? > > > > Here is my previous mail > > (http://oss.sgi.com/archives/kdb/2007-11/msg00037.html) with patch > > that fixes bpha problem: Global HW BP don't work: 1) Install global > > HW BP root@192.168.2.10:~# > > root@192.168.2.10:~# D > > Entering kdb (current=0xc04433a0, pid 0) on processor 0 due to > > Keyboard Entry [0]kdb> bpha do_sync > > Forced Instruction(Register) BP #0 at 0xc0181539 (do_sync) > > is enabled in dr0 globally > > [0]kdb> go > > > > -bash: D: command not found > > root@192.168.2.10:~# > > > > 1) Try CPU 0 > > root@192.168.2.10:~# > > root@192.168.2.10:~# taskset -c 0 sync > > Instruction(Register) breakpoint #0 at 0xc0181539 > > 0xc0181539 do_sync: push %ebx > > > > Entering kdb (0xc1b6d030, pid 1319) on processor 0 due to Debug @ > > 0xc0181539 [0]kdb> go > > root@192.168.2.10:~# > > - OK > > > > 1) Try CPU 1 > > root@192.168.2.10:~# > > root@192.168.2.10:~# taskset -c 1 sync > > root@192.168.2.10:~# > > - Doesn't work. > > > > Signed-off-by: Konstantin Baydarov > > Description: > > This patch adds support for global hardware breakpoints to KDB on > > x86 targets. Hardware breakpoints are installed by setting per CPU > > db registers. So to make a hardware breakpoint global it should be > > installed in db registers on every CPU in system. So global hw bp > > can't be handle by kdb_bp_install_global and kdb_bp_remove_global > > because these functions are called only on "monarch" CPU, > > kdb_bp_install_local and kdb_bp_remove_local should be used instead > > because these are called for all CPUs. > > > > Main changes: > > - kdb_hardbreaks[KDB_MAXHARDBPT] - The processor architecture > > hardware breakpoint registers descriptors is defined for every > > CPU: > > static kdbhard_bp_t kdb_hardbreaks[NR_CPUS][KDB_MAXHARDBPT]; > > > > - "kdb_bp_t" (main breakpint structure) contains hardware > > breakpoint registers for every CPU: > > kdbhard_bp_t* bp_hard[NR_CPUS]; > > > > - global hardware breakpoint installation and removal is handled > > by kdb_bp_install_local and kdb_bp_remove_local which are > > executed on every CPU > > > > - kdba_allocbp andkdba_freebp are static, now kdba_alloc_hwbp and > > kdba_free_hwbp are used for allocating/freeing hardware > > breakpoint registers. If the hardware breakpoint is global then > > kdba_alloc_hwbp tries to allocate hardware breakpoint registers > > on every CPU. If there is no free hardware breakpoint on a CPU the > > allocation fails. > > > > - bph_installed was added to the hardware breakpoint descriptor to > > track per CPU hardware breakpoint installation. > > > > Patch against kernel 2.6.24-rc2 > > > > Index: linux-2.6.24-rc2/arch/x86/kdb/kdba_bp_32.c > > =================================================================== > > --- linux-2.6.24-rc2.orig/arch/x86/kdb/kdba_bp_32.c > > +++ linux-2.6.24-rc2/arch/x86/kdb/kdba_bp_32.c > > @@ -22,10 +22,10 @@ static char *kdba_rwtypes[] = { "Instruc > > > > /* > > * Table describing processor architecture hardware > > - * breakpoint registers. > > + * breakpoint registers for every CPU. > > */ > > > > -static kdbhard_bp_t kdb_hardbreaks[KDB_MAXHARDBPT]; > > +static kdbhard_bp_t kdb_hardbreaks[NR_CPUS][KDB_MAXHARDBPT]; > > > > /* > > + * kdba_free_hwbp > > + * > > + * Frees allocated hw registers descriptors for bp. > > + * If hw bp is global, hw registers descriptors will be freed > > + * on every CPU. > > + * > > + * Parameters: > > + * bp - hardware bp > > + * Outputs: > > + * None. > > + * Returns: > > + * None > > + * Locking: > > + * None. > > + * Remarks: > > + * Should be called with correct bp->bp_template > > + */ > > + > > +void > > +kdba_free_hwbp(kdb_bp_t *bp) > > +{ > > + int i; > > + > > + /* When kernel enters KDB, first, all local bps > > + * are removed, so here we don't need to clear > > + * debug registers. > > + */ > > + > > + if (bp->bp_global){ > > + for (i = 0; i < NR_CPUS; ++i) { > > + if (!cpu_online(i)) > > + continue; > > + if (bp->bp_hard[i]) > > + kdba_freebp(bp->bp_hard[i]); > > + bp->bp_hard[i] = 0; > > + } > > + } else { > > + kdba_freebp(bp->bp_hard[bp->bp_cpu]); > > + bp->bp_hard[bp->bp_cpu] = NULL; > > + } > > + bp->bp_hardtype = 0; > > +} > > + > > +/* > > * kdba_initbp > > * > > * Initialize the breakpoint table for the hardware breakpoint > > @@ -653,7 +749,7 @@ kdba_freebp(kdbhard_bp_t *bph) > > void > > kdba_initbp(void) > > { > > - int i; > > + int i,j; > > kdbhard_bp_t *bph; > > > > /* > > @@ -662,9 +758,15 @@ kdba_initbp(void) > > > > memset(kdb_hardbreaks, '\0', sizeof(kdb_hardbreaks)); > > > > - for(i=0,bph=kdb_hardbreaks; i > - bph->bph_reg = i; > > - bph->bph_free = 1; > > + for (i = 0; i < NR_CPUS; ++i) { > > + /* Called early so we don't know actual > > + * ammount of CPUs > > + */ > > + for(j=0; j < KDB_MAXHARDBPT; j++) { > > + bph=&(kdb_hardbreaks[i][j]); > > + bph->bph_reg = j; > > + bph->bph_free = 1; > > + } > > } > > } > > > > @@ -698,6 +800,8 @@ kdba_initbp(void) > > int > > kdba_installbp(struct pt_regs *regs, kdb_bp_t *bp) > > { > > + int cpu = smp_processor_id(); > > + > > /* > > * Install the breakpoint, if it is not already installed. > > */ > > @@ -707,15 +811,27 @@ kdba_installbp(struct pt_regs *regs, kdb > > } > > if (!KDB_STATE(SSBPT)) > > bp->bp_delay = 0; > > - if (!bp->bp_installed) { > > - if (bp->bp_hardtype) { > > + > > + if (bp->bp_hardtype) { > > + if (KDB_DEBUG(BP) && !bp->bp_global && cpu != > > bp->bp_cpu){ > > + kdb_printf("kdba_removebp: cpu != > > bp->bp_cpu for local hw bp\n"); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > "s/kdba_removebp/kdba_installbp/", right? > > + } > > + > > + if (KDB_DEBUG(BP) && !bp->bp_hard[cpu]){ > > + kdb_printf("kdba_removebp: Error - > > bp_hard[smp_processor_id()] is emply\n"); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > And here. > > + return 1; > > + } > > + > > + if (!bp->bp_hard[cpu]->bph_installed){ > > kdba_installdbreg(bp); > > - bp->bp_installed = 1; > > + bp->bp_hard[cpu]->bph_installed = 1; > > if (KDB_DEBUG(BP)) { > > kdb_printf("kdba_installbp hardware > > reg %ld at " kdb_bfd_vma_fmt "\n", > > - bp->bp_hard->bph_reg, > > bp->bp_addr); > > + bp->bp_hard[cpu]->bph_reg, > > bp->bp_addr); } > > - } else if (bp->bp_delay) { > > + } > > + } else if (!bp->bp_installed) { > > + if (bp->bp_delay) { > > if (KDB_DEBUG(BP)) > > kdb_printf("kdba_installbp delayed > > bp\n"); kdba_handle_bp(regs, bp); > > @@ -753,6 +869,8 @@ kdba_installbp(struct pt_regs *regs, kdb > > int > > kdba_removebp(kdb_bp_t *bp) > > { > > + int cpu = smp_processor_id(); > > + > > /* > > * For hardware breakpoints, remove it from the active > > register, > > * for software breakpoints, restore the instruction stream. > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to > unsubscribe. -- With Best Regards, Konstantin Baydarov, Software Engineer Montavista Russia mail-to: kbaidarov@ru.mvista.com --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From anehori@checkpoint.com Sat May 10 23:48:10 2008 Received: with ECARTIS (v1.0.0; list kdb); Sat, 10 May 2008 23:48:20 -0700 (PDT) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4B6m6xi027764 for ; Sat, 10 May 2008 23:48:10 -0700 X-ASG-Debug-ID: 1210488529-490700e60000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 397DE169012A; Sat, 10 May 2008 23:48:50 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id IKLh6eYAg8K8P2Wj; Sat, 10 May 2008 23:48:50 -0700 (PDT) Received: from [91.90.139.139] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m4B6mhfU028659; Sun, 11 May 2008 09:48:43 +0300 (IDT) Message-ID: <482696C7.5010002@checkpoint.com> Date: Sun, 11 May 2008 09:48:39 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: jidong xiao CC: Jay Lan , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> <4104961b0805070252j7f08e321re73f995f4554b140@mail.gmail.com> In-Reply-To: <4104961b0805070252j7f08e321re73f995f4554b140@mail.gmail.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1210488533 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -1.52 X-Barracuda-Spam-Status: No, SCORE=-1.52 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.50030 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-archive-position: 1357 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb seems like DR0-DR3 are not changed : [0]kdb> md 0xa0f7bc94 0xa0f7bc94 00000000 00000001 00000003 00000000 ................ 0xa0f7bca4 00000000 a0e1c70d a0e1c722 a0e1c72a .....Çá "Çá *Çá 0xa0f7bcb4 a0e6a7e0 a0e6a820 00000028 0000001c à§æ ¨æ (....... 0xa0f7bcc4 00000000 00000000 00000000 00000000 ................ 0xa0f7bcd4 00000000 00000000 00000000 a0e1ca05 .............Êá 0xa0f7bce4 a0e1ca08 a0e1ca1a a0e1ca28 a0e1ca3c .Êá .Êá (Êá <Êá 0xa0f7bcf4 a0e1ca4e 00000000 00000000 03020100 NÊá ............ 0xa0f7bd04 07060504 0b0a0908 0f0e0d0c 13121110 ................ [0]kdb> bpha 0xa0f7bc94 dataw 4 [0]kdb> bpha 0xa0f7bc94 dataw 4 Forced Data Write BP #0 at 0xa0f7bc94 is enabled in dr0 for 4 bytes globally [0]kdb> rd d [0]kdb> rd d dr0 = 0x00000000 dr1 = 0x00000000 dr2 = 0x00000000 dr3 = 0x00000000 dr6 = 0xffff0ff0 dr7 = 0x00000400 [0]kdb> jidong xiao wrote: > On Wed, May 7, 2008 at 3:07 PM, Avi Nehori wrote: > >> I'm using 2.4.21 kernel (and also tried 2.6.18 with the same behavior). >> the memory address is being written through a kernel module . >> please see below : >> >> [0]kdb> md 0xa0f7bc94 >> 0xa0f7bc94 00000000 00000001 00000003 00000000 ................ >> [0]kdb> bpha 0xa0f7bc94 dataw 4 >> > Okay, please can you run "rd d" at this moment to display the debug > registers(and paste out the result of course), I somewhat feel DR0-DR3 > were not changed but actually they are supposed to represent the > breakpoint location virtual address. > > Regards > Jason > > >> [0]kdb> go >> >> >> the breakpoint is not called even though the memory address being changed: >> [0]kdb> md 0xa0f7bc94 >> 0xa0f7bc94 00000064 00000001 00000003 00000000 d............... >> >> >> >> >> jidong xiao wrote: >> >>> On Wed, May 7, 2008 at 2:41 PM, Avi Nehori wrote: >>> >>> >>> >>>> Thanks for your reply Jay, >>>> I'm running i386 and the thing is that when i set the breakpoint on a >>>> memory address(trying to catch a memory >>>> corruption bug) the watch point is not getting hit when the memory is >>>> written. >>>> I'm following the kdb documentation which says : >>>> >>>> "The |bph| and |bpha| commands can be used (provided the architecture >>>> supports use of hardware registers) to apply read and write breakpoints. >>>> This means we can get control whenever data is read from or written into >>>> a particular address. This can be extremely handy when debugging >>>> data/memory corruption problems, where you can use it to identify the >>>> corrupting code/process." >>>> >>>> *Examples* >>>> >>>> *To enter the kernel debugger whenever four bytes are written into >>>> address 0xc0204060:* >>>> | [0]kdb> bph 0xc0204060 dataw 4 >>>> >>>> >>>> so i followed the documentation and set a breakpoint using bph (and >>>> also bpha) on a memory address >>>> exactly as the above example ,but when i modify the memory address >>>> ,the breakpoint does not hit.... >>>> any idea what is wrong here ? >>>> any help will be very appreciated . >>>> Thanks! >>>> >>>> >>>> >>>> >>> What the kernel version are you using? and how do you modify the memory >>> >> address? >> >>> Regards >>> Jason Xiao >>> >>> >>> >>> >>>> || >>>> >>>> >>>> || >>>> | >>>> >>>> >>>> >>>> >>>> Jay Lan wrote: >>>> >>>> >>>> >>>>> Avi Nehori wrote: >>>>> >>>>> >>>>> >>>>> >>>>>> Hi, >>>>>> I'm trying to set a watch point with bpha as follows : >>>>>> bpha address dataw 4 >>>>>> but the watchpoint is never called when the memory address is >>>>>> >> changed. >> >>>>>> is it a know bug ? >>>>>> is there a patch ? >>>>>> >>>>>> >>>>>> >>>>>> >>>>> I heard bph/bpha worked on x86_64. However, hardware breakpoint >>>>> was not implemented on IA64. Were you on IA64? >>>>> >>>>> Greg Banks of SGI (gnb@sgi.com) provided patches for IA64. Many >>>>> thanks to Greg! >>>>> 1) gnb-kdb-implement-bpha-v3 >>>>> This patch implemented bph/bpha on IA64. >>>>> 2) gnb-test-kdb-bph >>>>> This patch provided a test infrastructure to test all the ia64 >>>>> data* breakpoint features. >>>>> >>>>> I have uploaded the patches to the download area. >>>>> ftp://oss.sgi.com/projects/kdb/download/v4.4 >>>>> >>>>> >>>>> Cheers, >>>>> - jay >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> Thanks. >>>>>> --------------------------- >>>>>> Use http://oss.sgi.com/ecartis to modify your settings or to >>>>>> >> unsubscribe. >> >>>>>> >>>>>> >>>>> Scanned by Check Point Total Security Gateway. >>>>> >>>>> >>>>> >>>> --------------------------- >>>> Use http://oss.sgi.com/ecartis to modify your settings or to >>>> >> unsubscribe. >> >>>> >>>> >>> Scanned by Check Point Total Security Gateway. >>> >>> >>> >>> > > Scanned by Check Point Total Security Gateway. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From anehori@checkpoint.com Sat May 10 23:53:16 2008 Received: with ECARTIS (v1.0.0; list kdb); Sat, 10 May 2008 23:53:24 -0700 (PDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4B6rFuK028073 for ; Sat, 10 May 2008 23:53:16 -0700 X-ASG-Debug-ID: 1210488841-6a97014e0000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id AF7921130F01; Sat, 10 May 2008 23:54:01 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id rGKCTP64becSITmv; Sat, 10 May 2008 23:54:01 -0700 (PDT) Received: from [91.90.139.139] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m4B6rrfU000681; Sun, 11 May 2008 09:53:53 +0300 (IDT) Message-ID: <482697FD.7030900@checkpoint.com> Date: Sun, 11 May 2008 09:53:49 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Scott Lurndal CC: jidong xiao , Jay Lan , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> In-Reply-To: <20080507161145.GA4398@pendragon.3leafnetworks.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1210488842 X-Barracuda-Bayes: INNOCENT GLOBAL 0.1804 1.0000 -0.9326 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -0.43 X-Barracuda-Spam-Status: No, SCORE=-0.43 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.50031 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-archive-position: 1358 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb Scott, seems like the DR0-DR3 are not set : [0]kdb> md 0xa0f7bc94 0xa0f7bc94 00000007 00000001 00000003 00000000 ................ 0xa0f7bca4 00000000 a0e1c70d a0e1c722 a0e1c72a .....Çá "Çá *Çá 0xa0f7bcb4 a0e6a7e0 a0e6a820 00000028 0000001c à§æ ¨æ (....... 0xa0f7bcc4 00000000 00000000 00000000 00000000 ................ 0xa0f7bcd4 00000000 00000000 00000000 a0e1ca05 .............Êá 0xa0f7bce4 a0e1ca08 a0e1ca1a a0e1ca28 a0e1ca3c .Êá .Êá (Êá <Êá 0xa0f7bcf4 a0e1ca4e 00000000 00000000 03020100 NÊá ............ 0xa0f7bd04 07060504 0b0a0908 0f0e0d0c 13121110 ................ [0]kdb> bpha 0xa0f7bc94 dataw 4 Forced Data Write BP #0 at 0xa0f7bc94 is enabled in dr0 for 4 bytes globally [0]kdb> bl [0]kdb> bl Forced Data Write BP #0 at 0xa0f7bc94 ([fwmod_smp.2.4.21.cp.i686]asm_fp_alt_ttl) is enabled in dr0 for 4 bytes globally [0]kdb> rd d dr0 = 0x00000000 dr1 = 0x00000000 dr2 = 0x00000000 dr3 = 0x00000000 dr6 = 0xffff0ff0 dr7 = 0x00000400 Scott Lurndal wrote: > On Wed, May 07, 2008 at 10:07:35AM +0300, Avi Nehori wrote: > >> I'm using 2.4.21 kernel (and also tried 2.6.18 with the same behavior). >> the memory address is being written through a kernel module . >> please see below : >> >> [0]kdb> md 0xa0f7bc94 >> 0xa0f7bc94 00000000 00000001 00000003 00000000 ................ >> [0]kdb> bpha 0xa0f7bc94 dataw 4 >> [0]kdb> go >> >> >> the breakpoint is not called even though the memory address being changed: >> [0]kdb> md 0xa0f7bc94 >> 0xa0f7bc94 00000064 00000001 00000003 00000000 d............... >> >> > > What does the 'bl' command show? It should show the debug register that > the breakpoint was assigned to. You'll want to check it on all processors > if you have a SMP machine. > > Please also use the 'rd d' command to display the contents of the debug > registers on all processors. > > scott > > > Scanned by Check Point Total Security Gateway. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From dwight@supercomputer.org Tue May 13 09:08:50 2008 Received: with ECARTIS (v1.0.0; list kdb); Tue, 13 May 2008 09:09:02 -0700 (PDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4DG8loM019743 for ; Tue, 13 May 2008 09:08:50 -0700 X-ASG-Debug-ID: 1210694971-110100870000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from supercomputer.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 68072115CCAE for ; Tue, 13 May 2008 09:09:31 -0700 (PDT) Received: from supercomputer.org (supercomputer.org [209.204.141.244]) by cuda.sgi.com with ESMTP id QB6XOKplEJxdR3t9 for ; Tue, 13 May 2008 09:09:31 -0700 (PDT) Received: by supercomputer.org (Postfix, from userid 32767) id CC5CF613F3; Tue, 13 May 2008 08:37:54 -0700 (PDT) Received: from [192.168.169.81] (unknown [192.168.169.81]) by supercomputer.org (Postfix) with ESMTP id C46F6613F1 for ; Tue, 13 May 2008 08:37:14 -0700 (PDT) From: "dwight at supercomputer.org" To: kdb@oss.sgi.com X-ASG-Orig-Subj: kdb available for F9 (Fedora 9) Subject: kdb available for F9 (Fedora 9) Date: Tue, 13 May 2008 07:39:52 -0800 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200805130839.52854.dwight@supercomputer.org> X-Barracuda-Connect: supercomputer.org[209.204.141.244] X-Barracuda-Start-Time: 1210694974 X-Barracuda-Bayes: INNOCENT GLOBAL 0.5000 1.0000 0.0000 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.50255 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1359 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: dwight@supercomputer.org Precedence: bulk X-list: kdb For those of you who follow Fedora, you'll know that F9 came out a couple of hours ago. I've put a first pass of a port of kdb to F9 up for general availability, and have announced this to the general Fedora list. Since this might also be of interest here, I'm reposting the announcement below. It's been years since kdb was available for a Fedora kernel. That situation has now been corrected. -dwight- ---- Original message --- I've ported kdb over to Fedora 9 and am making this available to those who might find it useful with today's release of F9. kdb is the kernel debugger from SGI, from http://oss.sgi.com/projects/kdb/ It's not gkdb nor kgdb, nor kbd. This port is preliminary; more changes are required. Nonetheless, since it's starting to work, and it might be helpful to others, I'm making it available before it has been fully tested. I.e. I'm taking the approach of "Publish early, publish often". Feedback is appreciated. NOTE WELL: Getting this to run on Fedora 9 has been a non-trivial effort, due to the differences between the stock kernel.org kernel and F9. Also note that, since F9 was only released about an hour ago, I'm still downloading all the ISO's like everyone else. I.e. I haven't had time to test this properly on a complete F9 system, only some testing on the F9 pre system. Nonetheless, I'll be updating these patches until they are well enough along to push upstream. A copy of the patches, and instructions on how to apply them to the F9 kernel source, can be found at: http://www.supercomputer.org/public/fedora/f9/kdb See the README file there for directions. -dwight- --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From matt@linuxbox.com Tue May 13 09:30:59 2008 Received: with ECARTIS (v1.0.0; list kdb); Tue, 13 May 2008 09:31:08 -0700 (PDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4DGUwJr021124 for ; Tue, 13 May 2008 09:30:59 -0700 X-ASG-Debug-ID: 1210696303-2ff900820000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from aa.linuxbox.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 33BB215FA8E for ; Tue, 13 May 2008 09:31:43 -0700 (PDT) Received: from aa.linuxbox.com (aa.linuxbox.com [134.215.213.37]) by cuda.sgi.com with ESMTP id 3kSsc6hEmnPpQF5v for ; Tue, 13 May 2008 09:31:43 -0700 (PDT) Received: from trosper.private.linuxbox.com (trosper.private.linuxbox.com [10.1.1.45]) by aa.linuxbox.com (8.13.1/8.13.1/SuSE Linux 0.7) with ESMTP id m4DGVgnc001470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 13 May 2008 12:31:43 -0400 Received: by trosper.private.linuxbox.com (Postfix, from userid 65534) id DFE71D9CAFF1; Tue, 13 May 2008 12:31:42 -0400 (EDT) Received: from secant.private.linuxbox.com (unknown [10.1.1.217]) by trosper.private.linuxbox.com (Postfix) with ESMTP id EA100C0A3BA5; Tue, 13 May 2008 12:31:34 -0400 (EDT) Message-ID: <4829C265.6010805@linuxbox.com> Date: Tue, 13 May 2008 12:31:33 -0400 From: Matt Benjamin User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: "dwight at supercomputer.org" Cc: kdb@oss.sgi.com X-ASG-Orig-Subj: Re: kdb available for F9 (Fedora 9) Subject: Re: kdb available for F9 (Fedora 9) References: <200805130839.52854.dwight@supercomputer.org> In-Reply-To: <200805130839.52854.dwight@supercomputer.org> X-Enigmail-Version: 0.95.6 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (aa.linuxbox.com [10.1.1.1]); Tue, 13 May 2008 12:31:43 -0400 (EDT) X-Barracuda-Connect: aa.linuxbox.com[134.215.213.37] X-Barracuda-Start-Time: 1210696305 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.50256 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1360 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: matt@linuxbox.com Precedence: bulk X-list: kdb -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Thanks for doing this. Matt dwight at supercomputer.org wrote: | For those of you who follow Fedora, you'll know that F9 came out a | couple of hours ago. I've put a first pass of a port of kdb to F9 up | for general availability, and have announced this to the general | Fedora list. - -- Matt Benjamin The Linux Box 206 South Fifth Ave. Suite 150 Ann Arbor, MI 48104 http://linuxbox.com tel. 734-761-4689 fax. 734-769-8938 cel. 734-216-5309 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIKcJlJiSUUSaRdSURCDc8AJ9t9HpjFPf+BvUH098VgpaVtttUBQCffCvy EUKI4mWpUgszohg8nqFWTAM= =oBLj -----END PGP SIGNATURE----- --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jlan@sgi.com Wed May 14 10:17:25 2008 Received: with ECARTIS (v1.0.0; list kdb); Wed, 14 May 2008 10:17:37 -0700 (PDT) Received: from kluge.engr.sgi.com (kluge.engr.sgi.com [192.102.96.102]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4EHHNlQ009185 for ; Wed, 14 May 2008 10:17:25 -0700 Received: from [150.166.8.78] (aware.engr.sgi.com [150.166.8.78]) by kluge.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id m4EHICYm055508; Wed, 14 May 2008 10:18:12 -0700 (PDT) Message-ID: <482B1ED3.7000603@sgi.com> Date: Wed, 14 May 2008 10:18:11 -0700 From: Jay Lan User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: "dwight at supercomputer.org" CC: kdb@oss.sgi.com Subject: Re: kdb available for F9 (Fedora 9) References: <200805130839.52854.dwight@supercomputer.org> In-Reply-To: <200805130839.52854.dwight@supercomputer.org> Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-archive-position: 1361 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jlan@sgi.com Precedence: bulk X-list: kdb dwight at supercomputer.org wrote: > For those of you who follow Fedora, you'll know that F9 came out a > couple of hours ago. I've put a first pass of a port of kdb to F9 up > for general availability, and have announced this to the general > Fedora list. Since this might also be of interest here, I'm > reposting the announcement below. > > It's been years since kdb was available for a Fedora kernel. That > situation has now been corrected. Thanks! Hmm, any plan to provide ia64 port as well? ;) Cheers, - jay > > -dwight- > > > ---- Original message --- > I've ported kdb over to Fedora 9 and am making this available to > those who might find it useful with today's release of F9. > > kdb is the kernel debugger from SGI, from > http://oss.sgi.com/projects/kdb/ > It's not gkdb nor kgdb, nor kbd. > > This port is preliminary; more changes are required. Nonetheless, > since it's starting to work, and it might be helpful to others, > I'm making it available before it has been fully tested. I.e. I'm > taking the approach of "Publish early, publish often". Feedback is > appreciated. > > NOTE WELL: Getting this to run on Fedora 9 has been a non-trivial > effort, due to the differences between the stock kernel.org kernel > and F9. > > Also note that, since F9 was only released about an hour ago, I'm > still downloading all the ISO's like everyone else. I.e. I haven't > had time to test this properly on a complete F9 system, only some > testing on the F9 pre system. Nonetheless, I'll be updating these > patches until they are well enough along to push upstream. > > A copy of the patches, and instructions on how to apply them to > the F9 kernel source, can be found at: > http://www.supercomputer.org/public/fedora/f9/kdb > > See the README file there for directions. > > -dwight- > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From dwight@supercomputer.org Wed May 14 12:23:27 2008 Received: with ECARTIS (v1.0.0; list kdb); Wed, 14 May 2008 12:23:36 -0700 (PDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4EJNOXM021105 for ; Wed, 14 May 2008 12:23:27 -0700 X-ASG-Debug-ID: 1210793050-7c3801b80000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from supercomputer.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 9FA6716CCC9 for ; Wed, 14 May 2008 12:24:11 -0700 (PDT) Received: from supercomputer.org (supercomputer.org [209.204.141.244]) by cuda.sgi.com with ESMTP id 7QaqLcIDc9cAf3i0 for ; Wed, 14 May 2008 12:24:11 -0700 (PDT) Received: by supercomputer.org (Postfix, from userid 32767) id E9B2C61402; Wed, 14 May 2008 11:52:21 -0700 (PDT) Received: from [192.168.169.81] (unknown [192.168.169.81]) by supercomputer.org (Postfix) with ESMTP id 8ACAF61402; Wed, 14 May 2008 11:51:56 -0700 (PDT) From: "dwight at supercomputer.org" To: Jay Lan X-ASG-Orig-Subj: Re: kdb available for F9 (Fedora 9) Subject: Re: kdb available for F9 (Fedora 9) Date: Wed, 14 May 2008 10:54:41 -0800 Cc: kdb@oss.sgi.com References: <200805130839.52854.dwight@supercomputer.org> <482B1ED3.7000603@sgi.com> In-Reply-To: <482B1ED3.7000603@sgi.com> MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200805141154.41998.dwight@supercomputer.org> X-Barracuda-Connect: supercomputer.org[209.204.141.244] X-Barracuda-Start-Time: 1210793052 X-Barracuda-Bayes: INNOCENT GLOBAL 0.4874 1.0000 0.0000 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.50360 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1362 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: dwight@supercomputer.org Precedence: bulk X-list: kdb On Wednesday 14 May 2008 10:18:11 am Jay Lan wrote: > dwight at supercomputer.org wrote: > > For those of you who follow Fedora, you'll know that F9 came out > > a couple of hours ago. I've put a first pass of a port of kdb to > > F9 up for general availability, and have announced this to the > > general Fedora list. Since this might also be of interest here, > > I'm reposting the announcement below. > > > > It's been years since kdb was available for a Fedora kernel. > > That situation has now been corrected. > > Thanks! > > Hmm, any plan to provide ia64 port as well? ;) > > Cheers, > - jay You are most welcome; I'm glad to hear people are finding it useful. I've create a "News" file under the kdb directory to post the latest information. In short, it seems to work fine so far with i386 and x86_64 F9. There was one bit of functionality that I had to #ifdef out in order to get it running in time for the F9 release. But I'm going to fix that, as well as cut over to the latest 2.6.25 kernel.org patches, since I now have the final official F9 kernel source. It's a tad painful, but hopefully once it's done it will be easier to maintain. I might even throw in a kdb.spec file in order to generate a kdb RPM. Even better would be the mods to the kernel.spec file to generate a kdb kernel via an `rpmbuild --with kdb" arg. But I've done that before and it's not as quickly achieved. Regarding the Itanium, alas, even though I've worked on ia64 a couple of times, I don't have any ia64 boxes at the moment. :) Which is fortunate, as the ia64 kdb support would probably be a fair bit of work. As I'm sure anyone from SGI would know. :) -dwight- --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From dwight@supercomputer.org Sat May 17 13:53:19 2008 Received: with ECARTIS (v1.0.0; list kdb); Sat, 17 May 2008 13:53:26 -0700 (PDT) Received: from cuda.sgi.com ([192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4HKrIxY030850 for ; Sat, 17 May 2008 13:53:19 -0700 X-ASG-Debug-ID: 1211057644-6f3a02920000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from supercomputer.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 4B64616E030B for ; Sat, 17 May 2008 13:54:05 -0700 (PDT) Received: from supercomputer.org (supercomputer.org [209.204.141.244]) by cuda.sgi.com with ESMTP id C0rcANA07bHygR7j for ; Sat, 17 May 2008 13:54:05 -0700 (PDT) Received: by supercomputer.org (Postfix, from userid 32767) id A9E7D61426; Sat, 17 May 2008 13:21:52 -0700 (PDT) Received: from [192.168.169.81] (unknown [192.168.169.81]) by supercomputer.org (Postfix) with ESMTP id 4407861424 for ; Sat, 17 May 2008 13:21:37 -0700 (PDT) From: "dwight at supercomputer.org" To: kdb@oss.sgi.com X-ASG-Orig-Subj: Re: kdb available for F9 (Fedora 9) Subject: Re: kdb available for F9 (Fedora 9) Date: Sat, 17 May 2008 12:24:26 -0800 References: <200805130839.52854.dwight@supercomputer.org> In-Reply-To: <200805130839.52854.dwight@supercomputer.org> MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200805171324.27360.dwight@supercomputer.org> X-Barracuda-Connect: supercomputer.org[209.204.141.244] X-Barracuda-Start-Time: 1211057647 X-Barracuda-Bayes: INNOCENT GLOBAL 0.4996 1.0000 0.0000 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.50651 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1363 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: dwight@supercomputer.org Precedence: bulk X-list: kdb I've put the final version required for Fedora 9 up under: http://www.supercomputer.org/public/fedora/f9/kdb/ This would be the file: kdb-v4.4-2.6.25-x86-2-f9-b.bz With this rev b patch, full support of kdb is available for F9 and it seems to work just fine. The recent v4.4 patches from a few days ago at ftp://oss.sgi.com/ went a long way towards simplifying things; thanks for doing this! But one still needs the above mentioned patch after applying the common and x86-2 patches. Any chance of getting this integrated upstream? Say, at least in a directory like: ftp://oss.sgi.com/projects/kdb/download/v4.4-Fedora/f9 -dwight- --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jlan@sgi.com Tue May 20 14:45:20 2008 Received: with ECARTIS (v1.0.0; list kdb); Tue, 20 May 2008 14:45:29 -0700 (PDT) Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4KLjKQr008819 for ; Tue, 20 May 2008 14:45:20 -0700 Received: from [127.0.0.1] (sshgate.corp.sgi.com [198.149.36.12]) by cthulhu.engr.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m4KLk7BC006493; Tue, 20 May 2008 14:46:08 -0700 Message-ID: <483346F1.3010100@sgi.com> Date: Tue, 20 May 2008 14:47:29 -0700 From: Jay Lan User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: Avi Nehori CC: Scott Lurndal , jidong xiao , kdb@oss.sgi.com Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> In-Reply-To: <482697FD.7030900@checkpoint.com> X-Enigmail-Version: 0.94.0.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 1364 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jlan@sgi.com Precedence: bulk X-list: kdb Hi Avi, Did Konstantin's patch work for you? His patch caused ia64 compilation to fail, but i would like to know if his patch work for you on i386. Thanks! - jay --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jlan@sgi.com Tue May 20 14:51:14 2008 Received: with ECARTIS (v1.0.0; list kdb); Tue, 20 May 2008 14:51:18 -0700 (PDT) Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4KLpEQj009438 for ; Tue, 20 May 2008 14:51:14 -0700 Received: from [127.0.0.1] (sshgate.corp.sgi.com [198.149.36.12]) by cthulhu.engr.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m4KLq0BC006869; Tue, 20 May 2008 14:52:01 -0700 Message-ID: <48334851.70009@sgi.com> Date: Tue, 20 May 2008 14:53:21 -0700 From: Jay Lan User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: "dwight at supercomputer.org" CC: kdb@oss.sgi.com Subject: Re: kdb available for F9 (Fedora 9) References: <200805130839.52854.dwight@supercomputer.org> <200805171324.27360.dwight@supercomputer.org> In-Reply-To: <200805171324.27360.dwight@supercomputer.org> X-Enigmail-Version: 0.94.0.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 1365 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jlan@sgi.com Precedence: bulk X-list: kdb dwight at supercomputer.org wrote: > I've put the final version required for Fedora 9 up under: > http://www.supercomputer.org/public/fedora/f9/kdb/ > > This would be the file: kdb-v4.4-2.6.25-x86-2-f9-b.bz > > With this rev b patch, full support of kdb is available for F9 and it > seems to work just fine. > > The recent v4.4 patches from a few days ago at ftp://oss.sgi.com/ > went a long way towards simplifying things; thanks for doing > this! But one still needs the above mentioned patch after applying > the common and x86-2 patches. > > Any chance of getting this integrated upstream? Say, at least > in a directory like: > ftp://oss.sgi.com/projects/kdb/download/v4.4-Fedora/f9 Hi dwight, Thanks for your patch. I will review it and test it later. If i am not sure if i will integrate your patch, at least i will put it at the f9 branch as you suggested. Thanks, - jay > > -dwight- > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jlan@sgi.com Tue May 20 17:33:30 2008 Received: with ECARTIS (v1.0.0; list kdb); Tue, 20 May 2008 17:33:34 -0700 (PDT) Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4L0XSHo027264 for ; Tue, 20 May 2008 17:33:30 -0700 Received: from [127.0.0.1] (sshgate.corp.sgi.com [198.149.36.12]) by cthulhu.engr.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m4L0YFBC021461; Tue, 20 May 2008 17:34:16 -0700 Message-ID: <48336E59.8050201@sgi.com> Date: Tue, 20 May 2008 17:35:37 -0700 From: Jay Lan User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: "dwight at supercomputer.org" CC: kdb@oss.sgi.com Subject: Re: kdb available for F9 (Fedora 9) References: <200805130839.52854.dwight@supercomputer.org> <200805171324.27360.dwight@supercomputer.org> <48334851.70009@sgi.com> In-Reply-To: <48334851.70009@sgi.com> X-Enigmail-Version: 0.94.0.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 1366 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jlan@sgi.com Precedence: bulk X-list: kdb Jay Lan wrote: > dwight at supercomputer.org wrote: >> I've put the final version required for Fedora 9 up under: >> http://www.supercomputer.org/public/fedora/f9/kdb/ >> >> This would be the file: kdb-v4.4-2.6.25-x86-2-f9-b.bz >> >> With this rev b patch, full support of kdb is available for F9 and it >> seems to work just fine. Hi dwight, Is it right the the above patch contains only these lines: diff -ruN f9-x86-2/kdb/kdbmain.c f9-x86-2-kdb/kdb/kdbmain.c --- f9-x86-2/kdb/kdbmain.c 2008-05-16 11:21:21.000000000 -0700 +++ f9-x86-2-kdb/kdb/kdbmain.c 2008-05-17 00:15:33.000000000 -0700 @@ -3118,7 +3118,7 @@ { struct kdb_running_process *krp = kdb_running_process + kdb_process_cpu(p); kdb_printf("0x%p %8d %8d %d %4d %c 0x%p %c%s\n", - (void *)p, p->pid, p->parent->pid, + (void *)p, p->pid, p->real_parent->pid, kdb_task_has_cpu(p), kdb_process_cpu(p), kdb_task_state_char(p), (void *)(&p->thread), which changed one line in 'ps' command output? That would be only changes you need for fedora 9? Cheers, - jay >> >> The recent v4.4 patches from a few days ago at ftp://oss.sgi.com/ >> went a long way towards simplifying things; thanks for doing >> this! But one still needs the above mentioned patch after applying >> the common and x86-2 patches. >> >> Any chance of getting this integrated upstream? Say, at least >> in a directory like: >> ftp://oss.sgi.com/projects/kdb/download/v4.4-Fedora/f9 > > Hi dwight, > > Thanks for your patch. > > I will review it and test it later. If i am not sure if i will > integrate your patch, at least i will put it at the f9 branch > as you suggested. > > > Thanks, > - jay > >> -dwight- >> --------------------------- >> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. > > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From anehori@checkpoint.com Tue May 20 23:31:51 2008 Received: with ECARTIS (v1.0.0; list kdb); Tue, 20 May 2008 23:31:55 -0700 (PDT) Received: from cuda.sgi.com ([192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4L6Vo7G028694 for ; Tue, 20 May 2008 23:31:51 -0700 X-ASG-Debug-ID: 1211351559-3f2f00190000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id EA3201B300C1; Tue, 20 May 2008 23:32:39 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id 3vXnrsH3MKQFkv4k; Tue, 20 May 2008 23:32:39 -0700 (PDT) Received: from [91.90.139.139] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m4L6WVjI007912; Wed, 21 May 2008 09:32:32 +0300 (IDT) Message-ID: <4833C201.1000800@checkpoint.com> Date: Wed, 21 May 2008 09:32:33 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Jay Lan CC: Scott Lurndal , jidong xiao , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> In-Reply-To: <483346F1.3010100@sgi.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1211351560 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.50976 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1367 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb Jay, the patch didnt work for me. I'm still looking for a resolution... Jay Lan wrote: > Hi Avi, > > Did Konstantin's patch work for you? His patch caused ia64 > compilation to fail, but i would like to know if his patch > work for you on i386. > > Thanks! > > - jay > > > Scanned by Check Point Total Security Gateway. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jlan@sgi.com Wed May 21 12:11:18 2008 Received: with ECARTIS (v1.0.0; list kdb); Wed, 21 May 2008 12:11:26 -0700 (PDT) Received: from kluge.engr.sgi.com (kluge.engr.sgi.com [192.102.96.102]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4LJB7CR021657 for ; Wed, 21 May 2008 12:11:18 -0700 Received: from [150.166.8.78] (aware.engr.sgi.com [150.166.8.78]) by kluge.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id m4LJBuYm276238; Wed, 21 May 2008 12:11:57 -0700 (PDT) Message-ID: <483473FC.80506@sgi.com> Date: Wed, 21 May 2008 12:11:56 -0700 From: Jay Lan User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: Avi Nehori CC: Scott Lurndal , jidong xiao , kdb@oss.sgi.com Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> <4833C201.1000800@checkpoint.com> In-Reply-To: <4833C201.1000800@checkpoint.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 1368 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jlan@sgi.com Precedence: bulk X-list: kdb Avi Nehori wrote: > Jay, > the patch didnt work for me. > I'm still looking for a resolution... Hmmm, i just tested with Konstantin's patch on 2.6.25 and 2.6.26-rc3, and it seemed to work for me. > Entering kdb (current=0xf7841c80, pid 0) on processor 1 due to Keyboard Entry [1]kdb> bpha do_sync Forced Instruction(Register) BP #0 at 0xc017b6a4 (do_sync) is enabled in dr0 globally [1]kdb> go I set up a global hardware breakpoint at do_sync here. Then i entered 'sync' command from a shell. The system dropped into KDB: Instruction(Register) breakpoint #0 at 0xc017b6a4 0xc017b6a4 do_sync: push %ebx Entering kdb (0xf72a23a0, pid 5473) on processor 2 due to Debug @ 0xc017b6a4 [2]kdb> You are testing a 2.4.21 kernel... I do not know if KDB support i386 in 2.4.21 at all. Keith Owens did a tremendous job in making KDB backtrace working on x86_64/i386 and fixed other bugs along the way, but his work did not complete until 2.6.23. My brief effort of back porting the x86_64/i386 KDB support to sles10sp2 (2.6.16 based) and rhel5.2 (2.6.18 based) did not work well. So, honestly, i recommand you move up to 2.6.23 or later. Thanks, - jay > > Jay Lan wrote: >> Hi Avi, >> >> Did Konstantin's patch work for you? His patch caused ia64 >> compilation to fail, but i would like to know if his patch >> work for you on i386. >> >> Thanks! >> >> - jay >> >> >> Scanned by Check Point Total Security Gateway. >> >> > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From anehori@checkpoint.com Wed May 21 23:44:02 2008 Received: with ECARTIS (v1.0.0; list kdb); Wed, 21 May 2008 23:44:09 -0700 (PDT) Received: from cuda.sgi.com ([192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4M6i1IB022291 for ; Wed, 21 May 2008 23:44:02 -0700 X-ASG-Debug-ID: 1211438690-2bd701820000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id B42541712803; Wed, 21 May 2008 23:44:50 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id HCBK8pvRKxu20Cl6; Wed, 21 May 2008 23:44:50 -0700 (PDT) Received: from [91.90.139.139] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m4M6igjI021511; Thu, 22 May 2008 09:44:43 +0300 (IDT) Message-ID: <4835165A.8080809@checkpoint.com> Date: Thu, 22 May 2008 09:44:42 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Jay Lan CC: Scott Lurndal , jidong xiao , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> <4833C201.1000800@checkpoint.com> <483473FC.80506@sgi.com> In-Reply-To: <483473FC.80506@sgi.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1211438691 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.51071 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1369 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb Jay, try to set an hardware breakpoint to a global variable and then modify it . the system will not drop into kdb in this case. Jay Lan wrote: > Avi Nehori wrote: > >> Jay, >> the patch didnt work for me. >> I'm still looking for a resolution... >> > > Hmmm, i just tested with Konstantin's patch on 2.6.25 and > 2.6.26-rc3, and it seemed to work for me. > > > >> Entering kdb (current=0xf7841c80, pid 0) on processor 1 due to Keyboard Entry >> > [1]kdb> bpha do_sync > Forced Instruction(Register) BP #0 at 0xc017b6a4 (do_sync) > is enabled in dr0 globally > [1]kdb> go > > I set up a global hardware breakpoint at do_sync here. > Then i entered 'sync' command from a shell. The system dropped into KDB: > > Instruction(Register) breakpoint #0 at 0xc017b6a4 > 0xc017b6a4 do_sync: push %ebx > > Entering kdb (0xf72a23a0, pid 5473) on processor 2 due to Debug @ 0xc017b6a4 > [2]kdb> > > You are testing a 2.4.21 kernel... I do not know if KDB support i386 > in 2.4.21 at all. > > Keith Owens did a tremendous job in making KDB backtrace working on > x86_64/i386 and fixed other bugs along the way, but his work did not > complete until 2.6.23. My brief effort of back porting the x86_64/i386 > KDB support to sles10sp2 (2.6.16 based) and rhel5.2 (2.6.18 based) > did not work well. So, honestly, i recommand you move up to 2.6.23 > or later. > > Thanks, > - jay > > >> Jay Lan wrote: >> >>> Hi Avi, >>> >>> Did Konstantin's patch work for you? His patch caused ia64 >>> compilation to fail, but i would like to know if his patch >>> work for you on i386. >>> >>> Thanks! >>> >>> - jay >>> >>> >>> Scanned by Check Point Total Security Gateway. >>> >>> >>> >> --------------------------- >> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >> > > > Scanned by Check Point Total Security Gateway. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jlan@sgi.com Thu May 22 15:12:42 2008 Received: with ECARTIS (v1.0.0; list kdb); Thu, 22 May 2008 15:12:46 -0700 (PDT) Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4MMCfwS022899 for ; Thu, 22 May 2008 15:12:42 -0700 Received: from [127.0.0.1] (sshgate.corp.sgi.com [198.149.36.12]) by cthulhu.engr.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m4MMDQBC011558; Thu, 22 May 2008 15:13:28 -0700 Message-ID: <4835F056.4070002@sgi.com> Date: Thu, 22 May 2008 15:14:46 -0700 From: Jay Lan User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: Avi Nehori CC: Scott Lurndal , jidong xiao , kdb@oss.sgi.com Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> <4833C201.1000800@checkpoint.com> <483473FC.80506@sgi.com> <4835165A.8080809@checkpoint.com> In-Reply-To: <4835165A.8080809@checkpoint.com> X-Enigmail-Version: 0.94.0.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 1370 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jlan@sgi.com Precedence: bulk X-list: kdb Avi Nehori wrote: > Jay, > try to set an hardware breakpoint to a global variable and then modify it . > the system will not drop into kdb in this case. Hi Avi, I reprodued the problem. KDB hardware breakpoint is triggered on access to a function, but not on value changes to a global variable. It would be nice, isn't it? Hmmm... - jay > > > Jay Lan wrote: >> Avi Nehori wrote: >> >>> Jay, >>> the patch didnt work for me. >>> I'm still looking for a resolution... >>> >> Hmmm, i just tested with Konstantin's patch on 2.6.25 and >> 2.6.26-rc3, and it seemed to work for me. >> >> >> >>> Entering kdb (current=0xf7841c80, pid 0) on processor 1 due to Keyboard Entry >>> >> [1]kdb> bpha do_sync >> Forced Instruction(Register) BP #0 at 0xc017b6a4 (do_sync) >> is enabled in dr0 globally >> [1]kdb> go >> >> I set up a global hardware breakpoint at do_sync here. >> Then i entered 'sync' command from a shell. The system dropped into KDB: >> >> Instruction(Register) breakpoint #0 at 0xc017b6a4 >> 0xc017b6a4 do_sync: push %ebx >> >> Entering kdb (0xf72a23a0, pid 5473) on processor 2 due to Debug @ 0xc017b6a4 >> [2]kdb> >> >> You are testing a 2.4.21 kernel... I do not know if KDB support i386 >> in 2.4.21 at all. >> >> Keith Owens did a tremendous job in making KDB backtrace working on >> x86_64/i386 and fixed other bugs along the way, but his work did not >> complete until 2.6.23. My brief effort of back porting the x86_64/i386 >> KDB support to sles10sp2 (2.6.16 based) and rhel5.2 (2.6.18 based) >> did not work well. So, honestly, i recommand you move up to 2.6.23 >> or later. >> >> Thanks, >> - jay >> >> >>> Jay Lan wrote: >>> >>>> Hi Avi, >>>> >>>> Did Konstantin's patch work for you? His patch caused ia64 >>>> compilation to fail, but i would like to know if his patch >>>> work for you on i386. >>>> >>>> Thanks! >>>> >>>> - jay >>>> >>>> >>>> Scanned by Check Point Total Security Gateway. >>>> >>>> >>>> >>> --------------------------- >>> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >>> >> >> Scanned by Check Point Total Security Gateway. >> >> > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From anehori@checkpoint.com Thu May 22 22:38:10 2008 Received: with ECARTIS (v1.0.0; list kdb); Thu, 22 May 2008 22:38:17 -0700 (PDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4N5c9nW008473 for ; Thu, 22 May 2008 22:38:10 -0700 X-ASG-Debug-ID: 1211521137-41a8020c0000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 0663F1A737B; Thu, 22 May 2008 22:38:58 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id QnZcpVKWO3OFliBu; Thu, 22 May 2008 22:38:58 -0700 (PDT) Received: from [172.31.21.44] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m4N5chjI015354; Fri, 23 May 2008 08:38:43 +0300 (IDT) Message-ID: <48365863.5030903@checkpoint.com> Date: Fri, 23 May 2008 08:38:43 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Jay Lan CC: Scott Lurndal , jidong xiao , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> <4833C201.1000800@checkpoint.com> <483473FC.80506@sgi.com> <4835165A.8080809@checkpoint.com> <4835F056.4070002@sgi.com> In-Reply-To: <4835F056.4070002@sgi.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1211521140 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.51162 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1371 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb yes ,you are correct :) seems like the debug registers are being set correctly(i have checked it and debugged it ),but still the breakpoint does not break.... i have done a special testing ,i can tell you that if you will write the memory address directly --- it will break. but if you write the memory address indirectly ---- it will not break !!! Jay Lan wrote: > Avi Nehori wrote: > >> Jay, >> try to set an hardware breakpoint to a global variable and then modify it . >> the system will not drop into kdb in this case. >> > > Hi Avi, > > I reprodued the problem. KDB hardware breakpoint is triggered on > access to a function, but not on value changes to a global variable. > It would be nice, isn't it? Hmmm... > > - jay > > >> Jay Lan wrote: >> >>> Avi Nehori wrote: >>> >>> >>>> Jay, >>>> the patch didnt work for me. >>>> I'm still looking for a resolution... >>>> >>>> >>> Hmmm, i just tested with Konstantin's patch on 2.6.25 and >>> 2.6.26-rc3, and it seemed to work for me. >>> >>> >>> >>> >>>> Entering kdb (current=0xf7841c80, pid 0) on processor 1 due to Keyboard Entry >>>> >>>> >>> [1]kdb> bpha do_sync >>> Forced Instruction(Register) BP #0 at 0xc017b6a4 (do_sync) >>> is enabled in dr0 globally >>> [1]kdb> go >>> >>> I set up a global hardware breakpoint at do_sync here. >>> Then i entered 'sync' command from a shell. The system dropped into KDB: >>> >>> Instruction(Register) breakpoint #0 at 0xc017b6a4 >>> 0xc017b6a4 do_sync: push %ebx >>> >>> Entering kdb (0xf72a23a0, pid 5473) on processor 2 due to Debug @ 0xc017b6a4 >>> [2]kdb> >>> >>> You are testing a 2.4.21 kernel... I do not know if KDB support i386 >>> in 2.4.21 at all. >>> >>> Keith Owens did a tremendous job in making KDB backtrace working on >>> x86_64/i386 and fixed other bugs along the way, but his work did not >>> complete until 2.6.23. My brief effort of back porting the x86_64/i386 >>> KDB support to sles10sp2 (2.6.16 based) and rhel5.2 (2.6.18 based) >>> did not work well. So, honestly, i recommand you move up to 2.6.23 >>> or later. >>> >>> Thanks, >>> - jay >>> >>> >>> >>>> Jay Lan wrote: >>>> >>>> >>>>> Hi Avi, >>>>> >>>>> Did Konstantin's patch work for you? His patch caused ia64 >>>>> compilation to fail, but i would like to know if his patch >>>>> work for you on i386. >>>>> >>>>> Thanks! >>>>> >>>>> - jay >>>>> >>>>> >>>>> Scanned by Check Point Total Security Gateway. >>>>> >>>>> >>>>> >>>>> >>>> --------------------------- >>>> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >>>> >>>> >>> Scanned by Check Point Total Security Gateway. >>> >>> >>> >> --------------------------- >> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >> > > > Scanned by Check Point Total Security Gateway. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From anehori@checkpoint.com Thu May 22 22:50:27 2008 Received: with ECARTIS (v1.0.0; list kdb); Thu, 22 May 2008 22:50:31 -0700 (PDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4N5oRM1009369 for ; Thu, 22 May 2008 22:50:27 -0700 X-ASG-Debug-ID: 1211521876-1d6f02c20000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 26209BD0D34; Thu, 22 May 2008 22:51:17 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id hWiybsFJQkkysYbO; Thu, 22 May 2008 22:51:17 -0700 (PDT) Received: from [172.31.21.44] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m4N5p6jI019431; Fri, 23 May 2008 08:51:07 +0300 (IDT) Message-ID: <48365B4A.6040900@checkpoint.com> Date: Fri, 23 May 2008 08:51:06 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Jay Lan CC: Scott Lurndal , jidong xiao , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <4820B9EA.3060002@sgi.com> <48214F33.1000006@checkpoint.com> <4104961b0805070000l2ca0559du647090584011511e@mail.gmail.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> <4833C201.1000800@checkpoint.com> <483473FC.80506@sgi.com> <4835165A.8080809@checkpoint.com> <4835F056.4070002@sgi.com> <48365863.5030903@checkpoint.com> In-Reply-To: <48365863.5030903@checkpoint.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1211521878 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.51164 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1372 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb Jay, Forgot to mention that : 1. the hardware breakpoint is triggered when it is a function. 2. the hardware breakpoint (write mode )is NOT triggered when its global variable --- or memory address. as an example : bpha address dataw 4 this wont work !!! 3. the hardware breakpoint (read mode ) is triggered . as an example : bpha address datar 4 this will work !!! and just be sure ,the registers are being set correctly when you set the breakpoint ,but still the breakpoint is not called for case #2. maybe the debug registers are lost due to context switching ? Avi Nehori wrote: > yes ,you are correct :) > seems like the debug registers are being set correctly(i have checked it > and debugged it ),but still the breakpoint does not > break.... > i have done a special testing ,i can tell you that if you will write the > memory address directly --- it will break. > but if you write the memory address indirectly ---- it will not break !!! > > > > Jay Lan wrote: > >> Avi Nehori wrote: >> >> >>> Jay, >>> try to set an hardware breakpoint to a global variable and then modify it . >>> the system will not drop into kdb in this case. >>> >>> >> Hi Avi, >> >> I reprodued the problem. KDB hardware breakpoint is triggered on >> access to a function, but not on value changes to a global variable. >> It would be nice, isn't it? Hmmm... >> >> - jay >> >> >> >>> Jay Lan wrote: >>> >>> >>>> Avi Nehori wrote: >>>> >>>> >>>> >>>>> Jay, >>>>> the patch didnt work for me. >>>>> I'm still looking for a resolution... >>>>> >>>>> >>>>> >>>> Hmmm, i just tested with Konstantin's patch on 2.6.25 and >>>> 2.6.26-rc3, and it seemed to work for me. >>>> >>>> >>>> >>>> >>>> >>>>> Entering kdb (current=0xf7841c80, pid 0) on processor 1 due to Keyboard Entry >>>>> >>>>> >>>>> >>>> [1]kdb> bpha do_sync >>>> Forced Instruction(Register) BP #0 at 0xc017b6a4 (do_sync) >>>> is enabled in dr0 globally >>>> [1]kdb> go >>>> >>>> I set up a global hardware breakpoint at do_sync here. >>>> Then i entered 'sync' command from a shell. The system dropped into KDB: >>>> >>>> Instruction(Register) breakpoint #0 at 0xc017b6a4 >>>> 0xc017b6a4 do_sync: push %ebx >>>> >>>> Entering kdb (0xf72a23a0, pid 5473) on processor 2 due to Debug @ 0xc017b6a4 >>>> [2]kdb> >>>> >>>> You are testing a 2.4.21 kernel... I do not know if KDB support i386 >>>> in 2.4.21 at all. >>>> >>>> Keith Owens did a tremendous job in making KDB backtrace working on >>>> x86_64/i386 and fixed other bugs along the way, but his work did not >>>> complete until 2.6.23. My brief effort of back porting the x86_64/i386 >>>> KDB support to sles10sp2 (2.6.16 based) and rhel5.2 (2.6.18 based) >>>> did not work well. So, honestly, i recommand you move up to 2.6.23 >>>> or later. >>>> >>>> Thanks, >>>> - jay >>>> >>>> >>>> >>>> >>>>> Jay Lan wrote: >>>>> >>>>> >>>>> >>>>>> Hi Avi, >>>>>> >>>>>> Did Konstantin's patch work for you? His patch caused ia64 >>>>>> compilation to fail, but i would like to know if his patch >>>>>> work for you on i386. >>>>>> >>>>>> Thanks! >>>>>> >>>>>> - jay >>>>>> >>>>>> >>>>>> Scanned by Check Point Total Security Gateway. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> --------------------------- >>>>> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >>>>> >>>>> >>>>> >>>> Scanned by Check Point Total Security Gateway. >>>> >>>> >>>> >>>> >>> --------------------------- >>> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >>> >>> >> Scanned by Check Point Total Security Gateway. >> >> >> > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. > > Scanned by Check Point Total Security Gateway. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jidong.xiao@gmail.com Thu May 22 22:58:16 2008 Received: with ECARTIS (v1.0.0; list kdb); Thu, 22 May 2008 22:58:20 -0700 (PDT) Received: from cuda.sgi.com ([192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4N5wGZQ010023 for ; Thu, 22 May 2008 22:58:16 -0700 X-ASG-Debug-ID: 1211522345-104001780000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from wf-out-1314.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id BFC931720B58 for ; Thu, 22 May 2008 22:59:05 -0700 (PDT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by cuda.sgi.com with ESMTP id mjDRUSMsWgLciUQT for ; Thu, 22 May 2008 22:59:05 -0700 (PDT) Received: by wf-out-1314.google.com with SMTP id 26so377203wfd.32 for ; Thu, 22 May 2008 22:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Czp0frcZGntjEkPAZkQIziFs8gRUhMy2pNnxBS9kCLU=; b=P7hEuosYxEFmmJe1D5FXuJE7TN8mYELXPGMxfgWNzXVPQSgBhs353jJb/65U0UbL/d0eJ43KZVuS+HlCsJyKD/Xo/dX/kQP41516UvNqVsr2GPEU7EIwF4mk66O8aicfgxrtFiZhXS6d4wq0U0Sj3CtKVV891LGkJnakWylF5Y8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UF7Nl2GekGBw38PFomQ218CrebnS+yfg6vgFZbclptLnvaTK4SNbTAKzHeFa9VE/gfxaCx9zMAQGxlJYKSLT7+lMUXB3hr5uhABIHGEZmcHbq01y/xMMvkzcfruiYs+hl8Ia+djX9dbILGZIX+0OLGMTzmjz2W2RStI7HXM0IRI= Received: by 10.142.203.13 with SMTP id a13mr420505wfg.154.1211522345307; Thu, 22 May 2008 22:59:05 -0700 (PDT) Received: by 10.142.222.2 with HTTP; Thu, 22 May 2008 22:58:59 -0700 (PDT) Message-ID: <4104961b0805222258y7a732c8du4856d2056a3d55e6@mail.gmail.com> Date: Fri, 23 May 2008 13:58:59 +0800 From: "jidong xiao" To: "Avi Nehori" X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. Cc: "Jay Lan" , "Scott Lurndal" , kdb@oss.sgi.com In-Reply-To: <48365863.5030903@checkpoint.com> MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline References: <481EDC13.1040504@checkpoint.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> <4833C201.1000800@checkpoint.com> <483473FC.80506@sgi.com> <4835165A.8080809@checkpoint.com> <4835F056.4070002@sgi.com> <48365863.5030903@checkpoint.com> X-Barracuda-Connect: wf-out-1314.google.com[209.85.200.170] X-Barracuda-Start-Time: 1211522346 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.51165 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1373 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jidong.xiao@gmail.com Precedence: bulk X-list: kdb On Fri, May 23, 2008 at 1:38 PM, Avi Nehori wrote: > yes ,you are correct :) > seems like the debug registers are being set correctly(i have checked it and > debugged it ),but still the breakpoint does not > break.... > i have done a special testing ,i can tell you that if you will write the > memory address directly --- it will break. > but if you write the memory address indirectly ---- it will not break !!! What do you mean by "write the memory address indirectly"? Regards Jason > > > > Jay Lan wrote: >> >> Avi Nehori wrote: >> >>> >>> Jay, >>> try to set an hardware breakpoint to a global variable and then modify >>> it . >>> the system will not drop into kdb in this case. >>> >> >> Hi Avi, >> >> I reprodued the problem. KDB hardware breakpoint is triggered on >> access to a function, but not on value changes to a global variable. >> It would be nice, isn't it? Hmmm... >> >> - jay >> >> >>> >>> Jay Lan wrote: >>> >>>> >>>> Avi Nehori wrote: >>>> >>>>> >>>>> Jay, >>>>> the patch didnt work for me. >>>>> I'm still looking for a resolution... >>>>> >>>> >>>> Hmmm, i just tested with Konstantin's patch on 2.6.25 and >>>> 2.6.26-rc3, and it seemed to work for me. >>>> >>>> >>>> >>>>> >>>>> Entering kdb (current=0xf7841c80, pid 0) on processor 1 due to Keyboard >>>>> Entry >>>>> >>>> >>>> [1]kdb> bpha do_sync >>>> Forced Instruction(Register) BP #0 at 0xc017b6a4 (do_sync) >>>> is enabled in dr0 globally >>>> [1]kdb> go >>>> >>>> I set up a global hardware breakpoint at do_sync here. >>>> Then i entered 'sync' command from a shell. The system dropped into KDB: >>>> >>>> Instruction(Register) breakpoint #0 at 0xc017b6a4 >>>> 0xc017b6a4 do_sync: push %ebx >>>> >>>> Entering kdb (0xf72a23a0, pid 5473) on processor 2 due to Debug @ >>>> 0xc017b6a4 >>>> [2]kdb> >>>> >>>> You are testing a 2.4.21 kernel... I do not know if KDB support i386 >>>> in 2.4.21 at all. >>>> >>>> Keith Owens did a tremendous job in making KDB backtrace working on >>>> x86_64/i386 and fixed other bugs along the way, but his work did not >>>> complete until 2.6.23. My brief effort of back porting the x86_64/i386 >>>> KDB support to sles10sp2 (2.6.16 based) and rhel5.2 (2.6.18 based) >>>> did not work well. So, honestly, i recommand you move up to 2.6.23 >>>> or later. >>>> >>>> Thanks, >>>> - jay >>>> >>>> >>>>> >>>>> Jay Lan wrote: >>>>> >>>>>> >>>>>> Hi Avi, >>>>>> >>>>>> Did Konstantin's patch work for you? His patch caused ia64 >>>>>> compilation to fail, but i would like to know if his patch >>>>>> work for you on i386. >>>>>> >>>>>> Thanks! >>>>>> >>>>>> - jay >>>>>> >>>>>> >>>>>> Scanned by Check Point Total Security Gateway. >>>>>> >>>>>> >>>>> >>>>> --------------------------- >>>>> Use http://oss.sgi.com/ecartis to modify your settings or to >>>>> unsubscribe. >>>>> >>>> >>>> Scanned by Check Point Total Security Gateway. >>>> >>>> >>> >>> --------------------------- >>> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >>> >> >> >> Scanned by Check Point Total Security Gateway. >> >> > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From anehori@checkpoint.com Thu May 22 23:09:03 2008 Received: with ECARTIS (v1.0.0; list kdb); Thu, 22 May 2008 23:09:07 -0700 (PDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4N693sI010789 for ; Thu, 22 May 2008 23:09:03 -0700 X-ASG-Debug-ID: 1211522991-175f03490000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id D6F5EBD1071; Thu, 22 May 2008 23:09:52 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id xwaBJd2me3UyZtE7; Thu, 22 May 2008 23:09:52 -0700 (PDT) Received: from [172.31.21.44] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m4N69djI025738; Fri, 23 May 2008 09:09:45 +0300 (IDT) Message-ID: <48365FA3.9000409@checkpoint.com> Date: Fri, 23 May 2008 09:09:39 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: jidong xiao CC: Jay Lan , Scott Lurndal , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> <4833C201.1000800@checkpoint.com> <483473FC.80506@sgi.com> <4835165A.8080809@checkpoint.com> <4835F056.4070002@sgi.com> <48365863.5030903@checkpoint.com> <4104961b0805222258y7a732c8du4856d2056a3d55e6@mail.gmail.com> In-Reply-To: <4104961b0805222258y7a732c8du4856d2056a3d55e6@mail.gmail.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1211522993 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.51165 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1374 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb i have done few testing and i noticed that : 1. when you set an hardware break point to address XXXXX and you do something like : int * ptr = XXXXX; *ptr = 9; this will work . 2. when you set an hardware break point to address XXXXX int *ptr = XXXXX -4; *(ptr + 4) =9; didnt work. jidong xiao wrote: > On Fri, May 23, 2008 at 1:38 PM, Avi Nehori wrote: > >> yes ,you are correct :) >> seems like the debug registers are being set correctly(i have checked it and >> debugged it ),but still the breakpoint does not >> break.... >> i have done a special testing ,i can tell you that if you will write the >> memory address directly --- it will break. >> but if you write the memory address indirectly ---- it will not break !!! >> > What do you mean by "write the memory address indirectly"? > > Regards > Jason > > >> >> Jay Lan wrote: >> >>> Avi Nehori wrote: >>> >>> >>>> Jay, >>>> try to set an hardware breakpoint to a global variable and then modify >>>> it . >>>> the system will not drop into kdb in this case. >>>> >>>> >>> Hi Avi, >>> >>> I reprodued the problem. KDB hardware breakpoint is triggered on >>> access to a function, but not on value changes to a global variable. >>> It would be nice, isn't it? Hmmm... >>> >>> - jay >>> >>> >>> >>>> Jay Lan wrote: >>>> >>>> >>>>> Avi Nehori wrote: >>>>> >>>>> >>>>>> Jay, >>>>>> the patch didnt work for me. >>>>>> I'm still looking for a resolution... >>>>>> >>>>>> >>>>> Hmmm, i just tested with Konstantin's patch on 2.6.25 and >>>>> 2.6.26-rc3, and it seemed to work for me. >>>>> >>>>> >>>>> >>>>> >>>>>> Entering kdb (current=0xf7841c80, pid 0) on processor 1 due to Keyboard >>>>>> Entry >>>>>> >>>>>> >>>>> [1]kdb> bpha do_sync >>>>> Forced Instruction(Register) BP #0 at 0xc017b6a4 (do_sync) >>>>> is enabled in dr0 globally >>>>> [1]kdb> go >>>>> >>>>> I set up a global hardware breakpoint at do_sync here. >>>>> Then i entered 'sync' command from a shell. The system dropped into KDB: >>>>> >>>>> Instruction(Register) breakpoint #0 at 0xc017b6a4 >>>>> 0xc017b6a4 do_sync: push %ebx >>>>> >>>>> Entering kdb (0xf72a23a0, pid 5473) on processor 2 due to Debug @ >>>>> 0xc017b6a4 >>>>> [2]kdb> >>>>> >>>>> You are testing a 2.4.21 kernel... I do not know if KDB support i386 >>>>> in 2.4.21 at all. >>>>> >>>>> Keith Owens did a tremendous job in making KDB backtrace working on >>>>> x86_64/i386 and fixed other bugs along the way, but his work did not >>>>> complete until 2.6.23. My brief effort of back porting the x86_64/i386 >>>>> KDB support to sles10sp2 (2.6.16 based) and rhel5.2 (2.6.18 based) >>>>> did not work well. So, honestly, i recommand you move up to 2.6.23 >>>>> or later. >>>>> >>>>> Thanks, >>>>> - jay >>>>> >>>>> >>>>> >>>>>> Jay Lan wrote: >>>>>> >>>>>> >>>>>>> Hi Avi, >>>>>>> >>>>>>> Did Konstantin's patch work for you? His patch caused ia64 >>>>>>> compilation to fail, but i would like to know if his patch >>>>>>> work for you on i386. >>>>>>> >>>>>>> Thanks! >>>>>>> >>>>>>> - jay >>>>>>> >>>>>>> >>>>>>> Scanned by Check Point Total Security Gateway. >>>>>>> >>>>>>> >>>>>>> >>>>>> --------------------------- >>>>>> Use http://oss.sgi.com/ecartis to modify your settings or to >>>>>> unsubscribe. >>>>>> >>>>>> >>>>> Scanned by Check Point Total Security Gateway. >>>>> >>>>> >>>>> >>>> --------------------------- >>>> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >>>> >>>> >>> Scanned by Check Point Total Security Gateway. >>> >>> >>> > > Scanned by Check Point Total Security Gateway. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jidong.xiao@gmail.com Fri May 23 00:57:19 2008 Received: with ECARTIS (v1.0.0; list kdb); Fri, 23 May 2008 00:57:23 -0700 (PDT) Received: from cuda.sgi.com ([192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4N7vHfN000588 for ; Fri, 23 May 2008 00:57:18 -0700 X-ASG-Debug-ID: 1211529487-05d701880000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from wf-out-1314.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id B67AD1721498 for ; Fri, 23 May 2008 00:58:07 -0700 (PDT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by cuda.sgi.com with ESMTP id xIy8RpP6YuxKVqWR for ; Fri, 23 May 2008 00:58:07 -0700 (PDT) Received: by wf-out-1314.google.com with SMTP id 26so412480wfd.32 for ; Fri, 23 May 2008 00:58:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; bh=mabqr7QVJYwg3IlKPrPXbrISOaxI+sQWbMOtMawsmgI=; b=OPhl+iRLX2aSBhyiOTs1azefYLIdpZVuCUr2mWojnmvfebxPP3xBXvlRPD5rv7kXagF7JeYlNnpicwnQac8JH50z+uyEWio5dflBf2BmeJZwFp5DJgMc4P/5KiSelaU/KnXPlMBEEVBvEuEdtuzxGVUAH4dfBnJIIg6y0urbB04= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=hcX5mT/QkBMtS7JlvqdfUrLlgCNWmQrlexUPxneYaxhJBRauLfDE1PAeRDGgjAfOPDUQBBynzHTB9QWDqjYI6TGvIxHB+qZwqqD3FgXM77r4+qGciA43ejm3hFT8YBAZA9GZ0vLfK/Lag9r+Aa2J61U30aduYgEhNdKq+9x5xxc= Received: by 10.142.165.9 with SMTP id n9mr459764wfe.241.1211529486888; Fri, 23 May 2008 00:58:06 -0700 (PDT) Received: by 10.142.222.2 with HTTP; Fri, 23 May 2008 00:58:06 -0700 (PDT) Message-ID: <4104961b0805230058q2f747e75tc404d5d5209f47e3@mail.gmail.com> Date: Fri, 23 May 2008 15:58:06 +0800 From: "jidong xiao" To: "Jay Lan" X-ASG-Orig-Subj: What's the status of usb keyboard support in KDB? Subject: What's the status of usb keyboard support in KDB? Cc: KDB MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Barracuda-Connect: wf-out-1314.google.com[209.85.200.171] X-Barracuda-Start-Time: 1211529487 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -1.62 X-Barracuda-Spam-Status: No, SCORE=-1.62 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_SC0_SA085b X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.51173 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.40 BSF_SC0_SA085b Custom Rule SA085b X-archive-position: 1375 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jidong.xiao@gmail.com Precedence: bulk X-list: kdb Hi, Jay, I saw this list in kdb-v4.4-2.6.26-rc3-common, it looks like ehci/ohci are supported, but how about uhci? IIRC Konstantin submitted a patch against uhci sometime back, and I do remember you announced it to all, say, http://www.mail-archive.com/kdb@oss.sgi.com/msg01459.html. So for what reason the code for uhci part is not existing in below list? Regards Jason Documentation/kdb/bt_x86 | 1837 +++++++++++++++++++ Documentation/kdb/kdb.mm | 492 +++++ Documentation/kdb/kdb_bp.man | 197 ++ Documentation/kdb/kdb_bt.man | 315 +++ Documentation/kdb/kdb_env.man | 46 Documentation/kdb/kdb_ll.man | 134 + Documentation/kdb/kdb_md.man | 136 + Documentation/kdb/kdb_ps.man | 96 Documentation/kdb/kdb_rd.man | 170 + Documentation/kdb/kdb_sr.man | 68 Documentation/kdb/kdb_ss.man | 109 + Documentation/kdb/slides | 1382 ++++++++++++++ Makefile | 1 drivers/char/keyboard.c | 10 drivers/hid/usbhid/hid-core.c | 28 drivers/hid/usbhid/usbkbd.c | 17 drivers/serial/8250.c | 53 drivers/serial/8250_early.c | 29 drivers/serial/sn_console.c | 73 drivers/usb/core/hcd.c | 14 drivers/usb/core/hcd.h | 4 drivers/usb/host/ehci-hcd.c | 42 drivers/usb/host/ehci-pci.c | 8 drivers/usb/host/ehci-q.c | 222 ++ drivers/usb/host/ohci-hcd.c | 67 drivers/usb/host/ohci-pci.c | 8 drivers/usb/host/ohci-q.c | 62 fs/proc/mmu.c | 16 fs/proc/proc_misc.c | 114 + include/linux/console.h | 5 include/linux/dis-asm.h | 347 +++ include/linux/kdb.h | 162 + include/linux/kdbprivate.h | 497 +++++ include/linux/sysctl.h | 1 init/main.c | 32 kdb/ChangeLog | 1903 +++++++++++++++++++ kdb/Makefile | 43 kdb/kdb_bp.c | 619 ++++++ kdb/kdb_bt.c | 180 + kdb/kdb_cmds | 32 kdb/kdb_id.c | 236 ++ kdb/kdb_io.c | 676 +++++++ kdb/kdbmain.c | 4037 ++++++++++++++++++++++++++++++++++++++++++ kdb/kdbsupport.c | 1153 +++++++++++ kdb/modules/Makefile | 13 kdb/modules/kdbm_pg.c | 652 ++++++ kdb/modules/kdbm_sched.c | 57 kdb/modules/kdbm_task.c | 199 ++ kdb/modules/kdbm_vm.c | 843 ++++++++ kdb/modules/kdbm_x86.c | 1093 +++++++++++ kernel/exit.c | 3 kernel/kallsyms.c | 22 kernel/module.c | 19 kernel/printk.c | 14 kernel/sched.c | 78 kernel/signal.c | 49 kernel/sysctl_check.c | 1 mm/hugetlb.c | 19 mm/swapfile.c | 22 59 files changed, 18750 insertions(+), 7 deletions(-) --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jlan@sgi.com Fri May 23 09:09:29 2008 Received: with ECARTIS (v1.0.0; list kdb); Fri, 23 May 2008 09:09:33 -0700 (PDT) Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4NG9T9v025568 for ; Fri, 23 May 2008 09:09:29 -0700 Received: from [127.0.0.1] (sshgate.corp.sgi.com [198.149.36.12]) by cthulhu.engr.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m4NGAHBC007583; Fri, 23 May 2008 09:10:17 -0700 Message-ID: <4836ECBA.8050903@sgi.com> Date: Fri, 23 May 2008 09:11:38 -0700 From: Jay Lan User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: jidong xiao CC: KDB Subject: Re: What's the status of usb keyboard support in KDB? References: <4104961b0805230058q2f747e75tc404d5d5209f47e3@mail.gmail.com> In-Reply-To: <4104961b0805230058q2f747e75tc404d5d5209f47e3@mail.gmail.com> X-Enigmail-Version: 0.94.0.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 1376 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jlan@sgi.com Precedence: bulk X-list: kdb jidong xiao wrote: > Hi, Jay, > I saw this list in kdb-v4.4-2.6.26-rc3-common, it looks like ehci/ohci > are supported, but how about uhci? IIRC Konstantin submitted a patch > against uhci sometime back, and I do remember you announced it to all, > say, http://www.mail-archive.com/kdb@oss.sgi.com/msg01459.html. So for > what reason the code for uhci part is not existing in below list? Hi Jason, Konstantin's UHCI patch was integrated into the KDB patchset in 2.6.24-rc8-*-3. We then found it caused OHCI to stop working and EHCI to drop characters, so i backed it out in 2.6.24-*-2 KDB patchset. Konstantin did submit a replacement UCHI patch though: http://oss.sgi.com/archives/kdb/2008-02/msg00000.html Thanks, - jay > > Regards > Jason > > Documentation/kdb/bt_x86 | 1837 +++++++++++++++++++ > Documentation/kdb/kdb.mm | 492 +++++ > Documentation/kdb/kdb_bp.man | 197 ++ > Documentation/kdb/kdb_bt.man | 315 +++ > Documentation/kdb/kdb_env.man | 46 > Documentation/kdb/kdb_ll.man | 134 + > Documentation/kdb/kdb_md.man | 136 + > Documentation/kdb/kdb_ps.man | 96 > Documentation/kdb/kdb_rd.man | 170 + > Documentation/kdb/kdb_sr.man | 68 > Documentation/kdb/kdb_ss.man | 109 + > Documentation/kdb/slides | 1382 ++++++++++++++ > Makefile | 1 > drivers/char/keyboard.c | 10 > drivers/hid/usbhid/hid-core.c | 28 > drivers/hid/usbhid/usbkbd.c | 17 > drivers/serial/8250.c | 53 > drivers/serial/8250_early.c | 29 > drivers/serial/sn_console.c | 73 > drivers/usb/core/hcd.c | 14 > drivers/usb/core/hcd.h | 4 > drivers/usb/host/ehci-hcd.c | 42 > drivers/usb/host/ehci-pci.c | 8 > drivers/usb/host/ehci-q.c | 222 ++ > drivers/usb/host/ohci-hcd.c | 67 > drivers/usb/host/ohci-pci.c | 8 > drivers/usb/host/ohci-q.c | 62 > fs/proc/mmu.c | 16 > fs/proc/proc_misc.c | 114 + > include/linux/console.h | 5 > include/linux/dis-asm.h | 347 +++ > include/linux/kdb.h | 162 + > include/linux/kdbprivate.h | 497 +++++ > include/linux/sysctl.h | 1 > init/main.c | 32 > kdb/ChangeLog | 1903 +++++++++++++++++++ > kdb/Makefile | 43 > kdb/kdb_bp.c | 619 ++++++ > kdb/kdb_bt.c | 180 + > kdb/kdb_cmds | 32 > kdb/kdb_id.c | 236 ++ > kdb/kdb_io.c | 676 +++++++ > kdb/kdbmain.c | 4037 ++++++++++++++++++++++++++++++++++++++++++ > kdb/kdbsupport.c | 1153 +++++++++++ > kdb/modules/Makefile | 13 > kdb/modules/kdbm_pg.c | 652 ++++++ > kdb/modules/kdbm_sched.c | 57 > kdb/modules/kdbm_task.c | 199 ++ > kdb/modules/kdbm_vm.c | 843 ++++++++ > kdb/modules/kdbm_x86.c | 1093 +++++++++++ > kernel/exit.c | 3 > kernel/kallsyms.c | 22 > kernel/module.c | 19 > kernel/printk.c | 14 > kernel/sched.c | 78 > kernel/signal.c | 49 > kernel/sysctl_check.c | 1 > mm/hugetlb.c | 19 > mm/swapfile.c | 22 > 59 files changed, 18750 insertions(+), 7 deletions(-) > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jlan@sgi.com Fri May 23 09:40:59 2008 Received: with ECARTIS (v1.0.0; list kdb); Fri, 23 May 2008 09:41:08 -0700 (PDT) Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4NGeOFG027735 for ; Fri, 23 May 2008 09:40:59 -0700 Received: from [127.0.0.1] (sshgate.corp.sgi.com [198.149.36.12]) by cthulhu.engr.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m4NGfBBC010485; Fri, 23 May 2008 09:41:12 -0700 Message-ID: <4836F3F9.6070608@sgi.com> Date: Fri, 23 May 2008 09:42:33 -0700 From: Jay Lan User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: Avi Nehori CC: jidong xiao , Scott Lurndal , kdb@oss.sgi.com Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> <4833C201.1000800@checkpoint.com> <483473FC.80506@sgi.com> <4835165A.8080809@checkpoint.com> <4835F056.4070002@sgi.com> <48365863.5030903@checkpoint.com> <4104961b0805222258y7a732c8du4856d2056a3d55e6@mail.gmail.com> <48365FA3.9000409@checkpoint.com> In-Reply-To: <48365FA3.9000409@checkpoint.com> X-Enigmail-Version: 0.94.0.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 1377 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jlan@sgi.com Precedence: bulk X-list: kdb Avi Nehori wrote: > i have done few testing and i noticed that : > 1. when you set an hardware break point to address XXXXX > and you do something like : > int * ptr = XXXXX; > *ptr = 9; > this will work . > 2. when you set an hardware break point to address XXXXX > int *ptr = XXXXX -4; > *(ptr + 4) =9; > didnt work. I have an easy-to-reproduce "fail to break on write" test case. But it seems to be a "direct" write though: At KDB prompt: KDB> bpha panic_on_oops ... KDB> go Then, at a shell window: # echo 1 > /proc/sys/kernel/panic_on_oops The system will drop to the KDB prompt. Cheers, - jay > > > > > > jidong xiao wrote: >> On Fri, May 23, 2008 at 1:38 PM, Avi Nehori wrote: >> >>> yes ,you are correct :) >>> seems like the debug registers are being set correctly(i have checked it and >>> debugged it ),but still the breakpoint does not >>> break.... >>> i have done a special testing ,i can tell you that if you will write the >>> memory address directly --- it will break. >>> but if you write the memory address indirectly ---- it will not break !!! >>> >> What do you mean by "write the memory address indirectly"? >> >> Regards >> Jason >> >> >>> Jay Lan wrote: >>> >>>> Avi Nehori wrote: >>>> >>>> >>>>> Jay, >>>>> try to set an hardware breakpoint to a global variable and then modify >>>>> it . >>>>> the system will not drop into kdb in this case. >>>>> >>>>> >>>> Hi Avi, >>>> >>>> I reprodued the problem. KDB hardware breakpoint is triggered on >>>> access to a function, but not on value changes to a global variable. >>>> It would be nice, isn't it? Hmmm... >>>> >>>> - jay >>>> >>>> >>>> >>>>> Jay Lan wrote: >>>>> >>>>> >>>>>> Avi Nehori wrote: >>>>>> >>>>>> >>>>>>> Jay, >>>>>>> the patch didnt work for me. >>>>>>> I'm still looking for a resolution... >>>>>>> >>>>>>> >>>>>> Hmmm, i just tested with Konstantin's patch on 2.6.25 and >>>>>> 2.6.26-rc3, and it seemed to work for me. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Entering kdb (current=0xf7841c80, pid 0) on processor 1 due to Keyboard >>>>>>> Entry >>>>>>> >>>>>>> >>>>>> [1]kdb> bpha do_sync >>>>>> Forced Instruction(Register) BP #0 at 0xc017b6a4 (do_sync) >>>>>> is enabled in dr0 globally >>>>>> [1]kdb> go >>>>>> >>>>>> I set up a global hardware breakpoint at do_sync here. >>>>>> Then i entered 'sync' command from a shell. The system dropped into KDB: >>>>>> >>>>>> Instruction(Register) breakpoint #0 at 0xc017b6a4 >>>>>> 0xc017b6a4 do_sync: push %ebx >>>>>> >>>>>> Entering kdb (0xf72a23a0, pid 5473) on processor 2 due to Debug @ >>>>>> 0xc017b6a4 >>>>>> [2]kdb> >>>>>> >>>>>> You are testing a 2.4.21 kernel... I do not know if KDB support i386 >>>>>> in 2.4.21 at all. >>>>>> >>>>>> Keith Owens did a tremendous job in making KDB backtrace working on >>>>>> x86_64/i386 and fixed other bugs along the way, but his work did not >>>>>> complete until 2.6.23. My brief effort of back porting the x86_64/i386 >>>>>> KDB support to sles10sp2 (2.6.16 based) and rhel5.2 (2.6.18 based) >>>>>> did not work well. So, honestly, i recommand you move up to 2.6.23 >>>>>> or later. >>>>>> >>>>>> Thanks, >>>>>> - jay >>>>>> >>>>>> >>>>>> >>>>>>> Jay Lan wrote: >>>>>>> >>>>>>> >>>>>>>> Hi Avi, >>>>>>>> >>>>>>>> Did Konstantin's patch work for you? His patch caused ia64 >>>>>>>> compilation to fail, but i would like to know if his patch >>>>>>>> work for you on i386. >>>>>>>> >>>>>>>> Thanks! >>>>>>>> >>>>>>>> - jay >>>>>>>> >>>>>>>> >>>>>>>> Scanned by Check Point Total Security Gateway. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> --------------------------- >>>>>>> Use http://oss.sgi.com/ecartis to modify your settings or to >>>>>>> unsubscribe. >>>>>>> >>>>>>> >>>>>> Scanned by Check Point Total Security Gateway. >>>>>> >>>>>> >>>>>> >>>>> --------------------------- >>>>> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. >>>>> >>>>> >>>> Scanned by Check Point Total Security Gateway. >>>> >>>> >>>> >> Scanned by Check Point Total Security Gateway. >> >> > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jlan@sgi.com Fri May 23 09:52:20 2008 Received: with ECARTIS (v1.0.0; list kdb); Fri, 23 May 2008 09:52:24 -0700 (PDT) Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4NGqKGI028400 for ; Fri, 23 May 2008 09:52:20 -0700 Received: from [127.0.0.1] (sshgate.corp.sgi.com [198.149.36.12]) by cthulhu.engr.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m4NGr8BC011409; Fri, 23 May 2008 09:53:08 -0700 Message-ID: <4836F6C6.6030406@sgi.com> Date: Fri, 23 May 2008 09:54:30 -0700 From: Jay Lan User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: Jay Lan CC: Avi Nehori , jidong xiao , Scott Lurndal , kdb@oss.sgi.com Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> <4833C201.1000800@checkpoint.com> <483473FC.80506@sgi.com> <4835165A.8080809@checkpoint.com> <4835F056.4070002@sgi.com> <48365863.5030903@checkpoint.com> <4104961b0805222258y7a732c8du4856d2056a3d55e6@mail.gmail.com> <48365FA3.9000409@checkpoint.com> <4836F3F9.6070608@sgi.com> In-Reply-To: <4836F3F9.6070608@sgi.com> X-Enigmail-Version: 0.94.0.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 1378 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jlan@sgi.com Precedence: bulk X-list: kdb Jay Lan wrote: > Avi Nehori wrote: >> i have done few testing and i noticed that : >> 1. when you set an hardware break point to address XXXXX >> and you do something like : >> int * ptr = XXXXX; >> *ptr = 9; >> this will work . >> 2. when you set an hardware break point to address XXXXX >> int *ptr = XXXXX -4; >> *(ptr + 4) =9; >> didnt work. > > I have an easy-to-reproduce "fail to break on write" test case. > But it seems to be a "direct" write though: > > At KDB prompt: > KDB> bpha panic_on_oops > ... > KDB> go > > > Then, at a shell window: > # echo 1 > /proc/sys/kernel/panic_on_oops > > The system will drop to the KDB prompt. Oops, sorry. I meant to say: it will not break even though the value has changed. - jay > > Cheers, > - jay > >> >> >> >> >> >> jidong xiao wrote: >>> On Fri, May 23, 2008 at 1:38 PM, Avi Nehori wrote: >>> >>>> yes ,you are correct :) >>>> seems like the debug registers are being set correctly(i have checked it and >>>> debugged it ),but still the breakpoint does not >>>> break.... >>>> i have done a special testing ,i can tell you that if you will write the >>>> memory address directly --- it will break. >>>> but if you write the memory address indirectly ---- it will not break !!! >>>> >>> What do you mean by "write the memory address indirectly"? >>> >>> Regards >>> Jason >>> >>> --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From anehori@checkpoint.com Fri May 23 22:22:34 2008 Received: with ECARTIS (v1.0.0; list kdb); Fri, 23 May 2008 22:22:45 -0700 (PDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m4O5MXaT019063 for ; Fri, 23 May 2008 22:22:34 -0700 X-ASG-Debug-ID: 1211606602-5b6203600000-sLlkUa X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from michael.checkpoint.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id AF76C1AC7E5; Fri, 23 May 2008 22:23:23 -0700 (PDT) Received: from michael.checkpoint.com (michael.checkpoint.com [194.29.32.68]) by cuda.sgi.com with ESMTP id 51HqlezvDGZHJR1t; Fri, 23 May 2008 22:23:23 -0700 (PDT) Received: from [172.31.33.11] (localhost [127.0.0.1]) by michael.checkpoint.com (8.12.10+Sun/8.12.10) with ESMTP id m4O5NEjI021492; Sat, 24 May 2008 08:23:14 +0300 (IDT) Message-ID: <4837A641.6000105@checkpoint.com> Date: Sat, 24 May 2008 08:23:13 +0300 From: Avi Nehori User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Jay Lan CC: jidong xiao , Scott Lurndal , kdb@oss.sgi.com X-ASG-Orig-Subj: Re: bph / bpha not working. Subject: Re: bph / bpha not working. References: <481EDC13.1040504@checkpoint.com> <48215537.3040901@checkpoint.com> <20080507161145.GA4398@pendragon.3leafnetworks.com> <482697FD.7030900@checkpoint.com> <483346F1.3010100@sgi.com> <4833C201.1000800@checkpoint.com> <483473FC.80506@sgi.com> <4835165A.8080809@checkpoint.com> <4835F056.4070002@sgi.com> <48365863.5030903@checkpoint.com> <4104961b0805222258y7a732c8du4856d2056a3d55e6@mail.gmail.com> <48365FA3.9000409@checkpoint.com> <4836F3F9.6070608@sgi.com> <4836F6C6.6030406@sgi.com> In-Reply-To: <4836F6C6.6030406@sgi.com> Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: michael.checkpoint.com[194.29.32.68] X-Barracuda-Start-Time: 1211606604 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.51257 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-archive-position: 1379 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: anehori@checkpoint.com Precedence: bulk X-list: kdb I agree , i have noticed in my testings that global variables behave differently (i have no explanation for that )then memory allocated dynamically. globals do not trigger the breakpoint even though they seem to be a direct access. Jay Lan wrote: > Jay Lan wrote: > >> Avi Nehori wrote: >> >>> i have done few testing and i noticed that : >>> 1. when you set an hardware break point to address XXXXX >>> and you do something like : >>> int * ptr = XXXXX; >>> *ptr = 9; >>> this will work . >>> 2. when you set an hardware break point to address XXXXX >>> int *ptr = XXXXX -4; >>> *(ptr + 4) =9; >>> didnt work. >>> >> I have an easy-to-reproduce "fail to break on write" test case. >> But it seems to be a "direct" write though: >> >> At KDB prompt: >> KDB> bpha panic_on_oops >> ... >> KDB> go >> >> >> Then, at a shell window: >> # echo 1 > /proc/sys/kernel/panic_on_oops >> >> The system will drop to the KDB prompt. >> > > Oops, sorry. I meant to say: it will not break even though > the value has changed. > > - jay > > >> Cheers, >> - jay >> >> >>> >>> >>> >>> >>> >>> jidong xiao wrote: >>> >>>> On Fri, May 23, 2008 at 1:38 PM, Avi Nehori wrote: >>>> >>>> >>>>> yes ,you are correct :) >>>>> seems like the debug registers are being set correctly(i have checked it and >>>>> debugged it ),but still the breakpoint does not >>>>> break.... >>>>> i have done a special testing ,i can tell you that if you will write the >>>>> memory address directly --- it will break. >>>>> but if you write the memory address indirectly ---- it will not break !!! >>>>> >>>>> >>>> What do you mean by "write the memory address indirectly"? >>>> >>>> Regards >>>> Jason >>>> >>>> >>>> > > Scanned by Check Point Total Security Gateway. > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.