bsd-user: Implement 'get_mcontext' for RISC-V
authorMark Corbin <mark@dibsco.co.uk>
Mon, 16 Sep 2024 15:51:17 +0000 (01:51 +1000)
committerAlistair Francis <alistair.francis@wdc.com>
Wed, 2 Oct 2024 05:11:52 +0000 (15:11 +1000)
commite185844fbdf5f4c8cd1f1587aac7a786971d562a
tree3e1d0d304c419e6d61fbcdcaf2f5759261f4817b
parent2931709ed917bf7e0db545bda941625e3c3aee1e
bsd-user: Implement 'get_mcontext' for RISC-V

Added the 'get_mcontext' function to extract and populate
the RISC-V machine context from the CPU state.
This function is used to gather the current state of the
general-purpose registers and store it in a 'target_mcontext_'
structure.

Signed-off-by: Mark Corbin <mark@dibsco.co.uk>
Signed-off-by: Ajeet Singh <itachis@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Co-authored-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240916155119.14610-16-itachis@FreeBSD.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
bsd-user/riscv/signal.c