From owner-freebsd-hackers Mon Nov 23 11:29:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA05537 for freebsd-hackers-outgoing; Mon, 23 Nov 1998 11:29:07 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from detlev.UUCP (40-sweet.camalott.com [208.239.153.40]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA05530 for ; Mon, 23 Nov 1998 11:29:05 -0800 (PST) (envelope-from joelh@gnu.org) Received: (from joelh@localhost) by detlev.UUCP (8.9.1/8.9.1) id NAA62221; Mon, 23 Nov 1998 13:28:42 -0600 (CST) (envelope-from joelh) To: Greg Lehey Cc: SysAdmin , freebsd-hackers@FreeBSD.ORG Subject: Re: breakpoint on i/o in kernel References: <19981123205619.Q430@freebie.lemis.com> From: Joel Ray Holveck Date: 23 Nov 1998 13:28:41 -0600 In-Reply-To: Greg Lehey's message of "Mon, 23 Nov 1998 20:56:19 +1030" Message-ID: <86iug6mcnq.fsf@detlev.UUCP> Lines: 34 X-Mailer: Gnus v5.5/Emacs 20.3 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> 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. I don't know what CPUs have instrumentation for this. To the best of my knowledge, neither DDB nor GDB have any hooks to handle this. (It might theoretically be possible with GDB using a semicomplex series of isteps and tests, but it would slow down your system possibly hundredfold.) I generally recommend another method of debugging than I/O breakpoints. If this is an ISA address, it's fairly simple to build a device to trigger an IRQ whenever a particular I/O port is accessed. Several of these exist. (It's also possible under some other busses, of course.) What are you trying to do? Are you debugging a driver, or a userland program using /dev/io, or what? We may be able to come up with a better way. Cheers, joelh -- Joel Ray Holveck - joelh@gnu.org Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message