Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2018 13:26:37 +0200
From:      Jan Beich <jbeich@FreeBSD.org>
To:        blubee blubeeme <gurenchan@gmail.com>
Cc:        FreeBSD current <freebsd-current@freebsd.org>
Subject:   Re: What's this gregset_t gregs thing
Message-ID:  <sh39-xor6-wny@FreeBSD.org>
In-Reply-To: <CALM2mEkSNjmj%2BFSCoVd5N%2Br2Z07pHxcpDv%2BEggffUWmkZeCN3Q@mail.gmail.com> (blubee blubeeme's message of "Mon, 20 Aug 2018 08:33:04 %2B0800")
References:  <CALM2mEkSNjmj%2BFSCoVd5N%2Br2Z07pHxcpDv%2BEggffUWmkZeCN3Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
blubee blubeeme <gurenchan@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?sh39-xor6-wny>