From owner-freebsd-hackers Sun Jul 4 8:55:47 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from sumatra.americantv.com (sumatra.americantv.com [208.139.222.227]) by hub.freebsd.org (Postfix) with ESMTP id B859514C36 for ; Sun, 4 Jul 1999 08:55:44 -0700 (PDT) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id KAA29302 for ; Sun, 4 Jul 1999 10:55:43 -0500 (CDT) Received: from free.pcs (free.PCS [148.105.10.51]) by right.PCS (8.6.13/8.6.4) with ESMTP id KAA15687 for ; Sun, 4 Jul 1999 10:55:42 -0500 Received: (from jlemon@localhost) by free.pcs (8.8.6/8.8.5) id KAA22371; Sun, 4 Jul 1999 10:55:41 -0500 (CDT) Date: Sun, 4 Jul 1999 10:55:41 -0500 (CDT) From: Jonathan Lemon Message-Id: <199907041555.KAA22371@free.pcs> To: hackers@freebsd.org Subject: Re: support for i386 hardware debug watch points X-Newsgroups: local.mail.freebsd-hackers In-Reply-To: References: Organization: Architecture and Operating System Fanatics Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article yo u write: >This is not as efficent as it could be implemented with a separate >flag to indicate whether saving the debug registers is necessary since >loading/storing the debug registers is fairly expensive (11 clocks on >an i486). Yes; you may want to just use another bit in pcb_flags that indicates if the debug registers are in use. >Should 'struct reg' be extended to directly include the debug >registers or should we go the route of having another data structure >for the debug registers, not unlike how the floating point registers >are handled? I'd be inclined to create another data structure, unless the debug registers are architecturally defined to be identical on all x86 chips. >Otherwise, I think I will need to set up a 'struct dbregs', provide >the appropriate 'fill_dbregs()' and 'set_dbregs()', and then provide a >PT_SETDBREGS, PT_GETDBREGS interface to 'ptrace()'. Either that, or create a routine like i386_set_breakpoint() in sys_machdep that would handle setting breakpoints for different types of cpu architectures. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message