From owner-freebsd-arch@FreeBSD.ORG Tue Feb 8 01:19:17 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8C0D16A4CE for ; Tue, 8 Feb 2005 01:19:17 +0000 (GMT) Received: from web30203.mail.mud.yahoo.com (web30203.mail.mud.yahoo.com [68.142.200.86]) by mx1.FreeBSD.org (Postfix) with SMTP id 8531D43D49 for ; Tue, 8 Feb 2005 01:19:17 +0000 (GMT) (envelope-from granted14@yahoo.com) Received: (qmail 56326 invoked by uid 60001); 8 Feb 2005 01:19:17 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=lavxe4jAhDvlgoG0r/6SB0ZXRoOA80FPBRywGun3D7MS1AX6nVd/ytbcIBYM2Y4Gb1AK5RrOLyTp4HTOexiUKqaiysHXgE//Y0uNf1VMVSgu2LxATmwtQK3SzPbhqJ8orCVerB8Xuqr42/+9A+BVG8VKhxAsQVtcTVhqzTF/PnU= ; Message-ID: <20050208011917.56324.qmail@web30203.mail.mud.yahoo.com> Received: from [206.167.24.15] by web30203.mail.mud.yahoo.com via HTTP; Mon, 07 Feb 2005 20:19:17 EST Date: Mon, 7 Feb 2005 20:19:17 -0500 (EST) From: Etienne Robillard To: freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: question about ucontext_t and friends X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2005 01:19:18 -0000 Hi, I have a c++ application implementing a user-level hardware abstraction (L4 ­µ-kernel in user-mode linux) bu I am missing a few arch backbones. Afaiu, the application must find some ways to manipulate registers in user-context, after having the request traced by ptrace(2). So far, interfaces are prototyped in similar manners: ... kernel_entry( *context, ... ) Where *context is a pointer to a `struct ucontext', but I suspect its because the relevant ucontext_t type wasnt available for some reasons. Question 1: Concerning the 'missing members' in ucontext_t, may I suspect that conformant applications needs not to alter things in uc_mcontext (machine context) ?? [1] The docs are saying that: "The ucontext_t type that ucp points to defines the user context and includes the contents of the calling thread's machine registers, the signal mask, and the current execution stack." Therefore this is almost okay but doesnt work on freebsd as-is: // save it to regs.foo = context->uc_mcontext.gregs[REG_FOO] TIA -erob 1. http://www.opengroup.org/onlinepubs/009695399/functions/getcontext.html ===== JabberID: incidah (at) njs (dot) netlab (dot) cz -----BEGIN PGP SIGNATURE----- iD8DBQBBvMMiwi4xwWEgKqERAsAAAJ0anaSvffwamXLuJnIwH5GRsTjM1wCdGHpa BqtF2n/eBawNURrU1t/9FDA= =tuy/ -----END PGP SIGNATURE----- ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca