On 11/4/21 10:05 AM, Warner Losh wrote:
> +typedef struct target_mcontext {
> + uint32_t __gregs[32];
sys/arm/include/ucontext.h has
#define _NGREG 17
typedef __greg_t __gregset_t[_NGREG];
With s/32/17/ here,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Will do.
And I'm going to add compile time asserts for the size of mcontext and ucontext in a future
patch series. It won't test for layout, but will keep things like this from happening again by accident.
So I added a G_STATIC_ASSERT and found I used a host's pointer instead of the target's pointer for the vfp stuff.
Easy enough to fix... But it means using functions that aren't yet defined when this is included, which means I'll
have to restructure things... shuffling the includes is likely out of the question, so I'll have to create an arch/signal.c
to hold the now-inlined functions.
All because I wanted to catch errors like this before I made them again in public... :) So thanks for inspiring me
to do something that detected the error, but a good natured harumph at the work I have to do now...
Warner