Date: Mon, 23 Dec 2002 10:06:44 +0100 From: Aurelien Nephtali <aurelien.nephtali@wanadoo.fr> To: John <jwd@bsdwins.com> Cc: hackers@freebsd.org Subject: Re: Accessing trap frame from userland? Message-ID: <20021223090644.GA615@nebula.wanadoo.fr> In-Reply-To: <20021223025159.GA27162@BSDWins.Com> References: <20021222183400.GA77934@nebula.wanadoo.fr> <20021223025159.GA27162@BSDWins.Com>
next in thread | previous in thread | raw e-mail | index | archive | help
--XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 22, 2002 at 09:51:59PM -0500, John wrote: > After the interupt (from the child issuing a PT_TRACE_ME > ptrace() call, you need to call i386_clr_watch(). >=20 > At this point, you can single step the process using > ptrace(PT_STEP), or by calling i386_set_watch() with > a new address (type DBREG_DR7_EXEC), and then calling > ptrace(PT_CONTINUE). Note: this all assumes you are > getting and putting the debug registers correctly. >=20 > Hope this helps. It's been a while since I've looked > at this stuff... somewhere I've got a sample program > that traces dynamic image loads. If I can find it I'll > hang it off website. >=20 > -john Mmh, that's the method I try to avoid :), according to me it's 'ugly' :) si= nce that need a big if() hack to handle the break issuing from a PT_STEP without mixing it with an user wanted breakpoint. I'd rather trying to access the 'trap frame' if it's possible, otherwise I'll do the single-step-ugly-hack method :) -- Aurelien --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+BtIkDNsbHbt8ok8RAsQlAJ445z3FP+E17+9NEC0XXjWrYj/RHACgnbOa 4Dnmr/e4bP3dWJZJlY/AyfI= =3zVb -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l-- 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?20021223090644.GA615>