Date: 23 Nov 1998 13:28:41 -0600 From: Joel Ray Holveck <joelh@gnu.org> To: Greg Lehey <grog@lemis.com> Cc: SysAdmin <sa@ns.online.samara.ru>, freebsd-hackers@FreeBSD.ORG Subject: Re: breakpoint on i/o in kernel Message-ID: <86iug6mcnq.fsf@detlev.UUCP> In-Reply-To: Greg Lehey's message of "Mon, 23 Nov 1998 20:56:19 %2B1030" References: <AAnyMMsCYR@ns.online.samara.ru> <19981123205619.Q430@freebie.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> I need breakpoint on i/o in kernel >> How doing this in ddb, or exist another way ? > Well, the syntax is: > b <address> > <address> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86iug6mcnq.fsf>