From owner-freebsd-hackers Mon Nov 23 15:06:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA29865 for freebsd-hackers-outgoing; Mon, 23 Nov 1998 15:06:19 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA29860 for ; Mon, 23 Nov 1998 15:06:16 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id JAA10023; Tue, 24 Nov 1998 09:35:44 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id JAA60036; Tue, 24 Nov 1998 09:35:37 +1030 (CST) Message-ID: <19981124093537.R430@freebie.lemis.com> Date: Tue, 24 Nov 1998 09:35:37 +1030 From: Greg Lehey To: Joel Ray Holveck Cc: SysAdmin , freebsd-hackers@FreeBSD.ORG Subject: Re: breakpoint on i/o in kernel References: <19981123205619.Q430@freebie.lemis.com> <86iug6mcnq.fsf@detlev.UUCP> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <86iug6mcnq.fsf@detlev.UUCP>; from Joel Ray Holveck on Mon, Nov 23, 1998 at 01:28:41PM -0600 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 23 November 1998 at 13:28:41 -0600, Joel Ray Holveck wrote: >>> I need breakpoint on i/o in kernel >>> How doing this in ddb, or exist another way ? >> Well, the syntax is: >> b
>>
can be a hex value or an expression, possibly symbolic. Are >> you asking which address to choose? Then you need to say what you >> want to do. > > I think he's asking for an I/O breakpoint, not an address breakpoint; > eg, break whenever a particular I/O port is accessed. Ah, that could be. > I don't know what CPUs have instrumentation for this. All i386 architectures, in varying degrees. > To the best of my knowledge, neither DDB nor GDB have any hooks to > handle this. Correct. > (It might theoretically be possible with GDB using a semicomplex > series of isteps and tests, but it would slow down your system > possibly hundredfold.) The correct thing to do would be to implement I/O (and memory access) breakpoints, not kludge it. I look at it once, and the code turned my stomach. I once wrote a kernel debugger (for BSD/386) which implemented these features. I've been meaning to do it ever since for FreeBSD, but I still haven't got round to it. > I generally recommend another method of debugging than I/O > breakpoints. That's a workaround, not a solution. I/O breakpoints are really useful. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message