Re: What's this gregset_t gregs thing

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Mon, 20 Aug 2018 13:26:37 +0200
blubee blubeeme <gurenchan_at_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
Received on Mon Aug 20 2018 - 09:26:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:17 UTC