From owner-freebsd-current@freebsd.org Mon Aug 20 11:26:41 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D523B108D1E8 for ; Mon, 20 Aug 2018 11:26:41 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9110388A8C; Mon, 20 Aug 2018 11:26:41 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 8A03016140; Mon, 20 Aug 2018 11:26:41 +0000 (UTC) From: Jan Beich To: blubee blubeeme Cc: FreeBSD current Subject: Re: What's this gregset_t gregs thing References: Date: Mon, 20 Aug 2018 13:26:37 +0200 In-Reply-To: (blubee blubeeme's message of "Mon, 20 Aug 2018 08:33:04 +0800") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2018 11:26:42 -0000 blubee blubeeme writes: > Linux has gregset_t gregs; > https://github.com/lattera/glibc/blob/master/sysdeps/unix/sysv/linux/x86/sys/ucontext.h > > Defined above, I also see it in the RISC-V glibc stuff as well. > > FreeBSD doesn't seem to have this field defined, I see FreeBSD uses > /usr/include/x86/ucontext.h > > but there's no gregs; __gregs exists on FreeBSD arm*, inherited from NetBSD. > If I wanted to return mcontext.gregs > > How could I implement that on FreeBSD? Only as gregset_t? If not return registers individually e.g., https://searchfox.org/mozilla-central/rev/83562422ecb0f5683da7a9a26ce05ce62bc0c882/js/src/wasm/WasmSignalHandlers.cpp#244