Date: Sun, 22 Dec 2002 19:34:00 +0100 From: Aurelien Nephtali <aurelien.nephtali@wanadoo.fr> To: hackers@freebsd.org Subject: Accessing trap frame from userland? Message-ID: <20021222183400.GA77934@nebula.wanadoo.fr>
next in thread | raw e-mail | index | archive | help
--VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I'm making a little debugger using ptrace(). The soft is trivial, it just fork() and runs the traced process via execve(). To break into the traced process, I use i386_set_watch()+ptrace() and choosed to break on execution. But it's here that I'm stucked: it breaks forever on the same instruction. I've read some docs and saw that I have to use the 'Resume flag' from the EFLAGS register. But, according to the Intel IA-32 documentation, this flag can only be set/unset by kernel code and the only way for a debugger to modify it is to modify the stack image of the EFLAGS register. But, there's nothing in the stack so I think (and it was confirmed by a friend) that the image is stored in a 'kernel-land stack'. So, my question is simple: how can I set the 'Resume flag' from an userland soft (without having to be root) ? Hope I was clear enough :) Thanks. -- Aurelien --VbJkn9YxBvnuCH5J Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+BgWYDNsbHbt8ok8RAnCLAJsGz9sLIxOyrT2FXS/7lwol4ZI74gCeITOZ Kt7X0cwcZVVs84rokMnaK1E= =HQ/M -----END PGP SIGNATURE----- --VbJkn9YxBvnuCH5J-- 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?20021222183400.GA77934>