From owner-freebsd-hackers Sun Nov 18 8: 0:27 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.bsdhome.com (rdu25-2-113.nc.rr.com [24.25.2.113]) by hub.freebsd.org (Postfix) with ESMTP id 3A6FF37B416 for ; Sun, 18 Nov 2001 08:00:22 -0800 (PST) Received: from neutrino.bsdhome.com (jupiter [192.168.220.13]) by smtp.bsdhome.com (8.11.3nb1/8.11.4) with ESMTP id fAIG0F719067; Sun, 18 Nov 2001 11:00:15 -0500 (EST) Received: (from bsd@localhost) by neutrino.bsdhome.com (8.11.6/8.11.6) id fAIG0AS90321; Sun, 18 Nov 2001 11:00:10 -0500 (EST) (envelope-from bsd) Date: Sun, 18 Nov 2001 11:00:10 -0500 From: Brian Dean To: Matthew Emmerton Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Does DDB's watch feature actually work? Message-ID: <20011118110010.A90083@neutrino.bsdhome.com> References: <048401c16fe7$7bf13b60$1200a8c0@gsicomp.on.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <048401c16fe7$7bf13b60$1200a8c0@gsicomp.on.ca>; from matt@gsicomp.on.ca on Sat, Nov 17, 2001 at 11:14:10PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Nov 17, 2001 at 11:14:10PM -0500, Matthew Emmerton wrote: > So, I decided to learn how to use DDB, and set a watch on the data element > that's getting blown away. The problem is, once I've got a watch in place, > the system traps (page fault) at the strangest locations in the networking > code -- %eip is nowhere near any code that modifies the data that I'm > watching. You can try 'hwatch' if you are running a reasonably recent -current or -stable to safely watch memory in the kernel (non-SMP). As for taking the trap within code you didn't expect, this can happen especially when the watch point is a stack address. Stack address watch points may be hit many times by other non-related functions as call frames are created and destroyed via normal execution. You can minimize this by only enabling the watch point while you are within the frame in question (sometimes not an easy task). -Brian -- Brian Dean bsd@FreeBSD.org bsd@bsdhome.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message