From owner-freebsd-audit Tue Jul 3 5:36:13 2001 Delivered-To: freebsd-audit@freebsd.org Received: from albatross.prod.itd.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by hub.freebsd.org (Postfix) with ESMTP id F068537B403; Tue, 3 Jul 2001 05:36:04 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.247.139.34.Dial1.SanJose1.Level3.net [209.247.139.34]) by albatross.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id FAA29737; Tue, 3 Jul 2001 05:36:01 -0700 (PDT) Message-ID: <3B41BC54.309D58F2@mindspring.com> Date: Tue, 03 Jul 2001 05:36:36 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Brian Dean Cc: freebsd-audit@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: kernel ddb patch for setting hardware watchpoints References: <20010630172522.A64393@neutrino.bsdhome.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Brian Dean wrote: > Caveats: This patch won't do the right thing on SMP systems. The > debug registers are set/cleared only for the CPU running ddb. > Since the debug registers are a per-cpu thing, they won't be > set for the other CPUs. I'll work on that next. FWIW: When you enter into the debugger on an SMP system, it holds all processors other than the boot processor; it restarts them on exit. This means that in single step mode, you will need to ensure that the BP has the registers set. It also means that you probably are going to have a tough time with the signalling in the MP case, where the modification hits on an AP, since an AP can't drop into the debugger. This may not be true in 5.x any more, but in 4.3, you should look at the mp debugger code in /sys/i386/i386. Probably, you will want to take the watchpoint, and then IPI the boot processor, similar to the way a CTRL-ALT-ESC does things (only using an IPI). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message