From owner-freebsd-alpha Fri Jan 4 10:50:33 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 25F7037B405 for ; Fri, 4 Jan 2002 10:50:28 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.6/8.11.6) with UUCP id g04IoOF62438; Fri, 4 Jan 2002 19:50:24 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from mail.cicely.de (cicely20.cicely.de [10.1.1.22]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g04Ioutx060298; Fri, 4 Jan 2002 19:50:56 +0100 (CET)?g (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.2.10]) by mail.cicely.de (8.11.0/8.11.0) with ESMTP id g04IotW16126; Fri, 4 Jan 2002 19:50:56 +0100 (CET) Received: (from ticso@localhost) by cicely8.cicely.de (8.11.6/8.11.6) id g04Iot509678; Fri, 4 Jan 2002 19:50:55 +0100 (CET) (envelope-from ticso) Date: Fri, 4 Jan 2002 19:50:54 +0100 From: Bernd Walter To: Daniel Eischen Cc: alpha@FreeBSD.ORG Subject: Re: {get,set,make,swap}context for alpha Message-ID: <20020104195054.E8703@cicely8.cicely.de> References: <20020104182107.D8703@cicely8.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, Jan 04, 2002 at 12:56:45PM -0500, Daniel Eischen wrote: > On Fri, 4 Jan 2002, Bernd Walter wrote: > > On Fri, Jan 04, 2002 at 05:46:13PM +0100, Bernd Walter wrote: > > > What I found so far with the core dump is that proc3 is called with a > > > bogus t12 value. > > > I still have to search why. > > Thanks for the previous fix to setcontext; we seem to have > figured out the same fix for getcontext :-). I was in the > process of making setcontext a NESTED function, but had to > go to work :(. It wouldn't work as NESTED, because it expects values on the stack for return which are not there after switching. NESTED does the same as my change, but at the beginning and end of the function. > Cool, it's working! I was unsure about makecontext being correct. > I should probably add a test that passes more than 6 arguments > to a function to be sure that the remaining arguments are correctly > pulled off the stack (the first 6 being in registers). Good point. I asume FP registers also need to be handled. At least fs and fa registers. > > Signaling does not work, yet: > > ticso@cicely9# ./test_context > > Send a few SIGUSR1's to pid 65430 > > Main: setting context to myself. > > Main: returned from setcontext. > > Proc3 called with arguments (1) > > Proc3: working... > > Proc3: working... > > Proc3: working... > > Proc3: working... > > Proc3: working... > > Proc3: returned from getcontext, count 1 > > Got signal 30, uc_rev 0x0 > > Assertion failed: (setcontext(ucp) == 0), function sighandler, file test_context.c, line 77. > > The kernel needs to be patched (machdep.c) to set ucp->mc_context.mc_rev > to denote it is a signal frame and not a trap frame. The test program > should account for an unpatched kernel by setting mc_rev to denote a > signal frame. Make sure that it's being set correctly, or else > setcontext will return -1. Ah. I hadn't looked into the complete patch yet. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message