~vcs-imports-ii/libsigsegv/master

« back to all changes in this revision

Viewing changes to src/fault-freebsd-arm.h

  • Committer: Bruno Haible
  • Date: 2023-11-10 01:21:52 UTC
  • Revision ID: git-v1:b3b4eb445bf15b96139c4636ef3c5936ae3b988d
Port to CHERI.

* m4/fault.m4 (SV_TRY_FAULT): Use 'uintptr_t' instead of
'unsigned long'.
* src/signals-bsd.h (SIGSEGV_FOR_ALL_SIGNALS): On CheriBSD, treat
SIGPROT like SIGSEGV and SIGBUS.
* src/fault-freebsd-arm.h (SIGSEGV_FAULT_STACKPOINTER): Define
differently on CheriBSD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Fault handler information.  FreeBSD/ARM version when it supports POSIX.
2
 
   Copyright (C) 2020  Bruno Haible <bruno@clisp.org>
 
2
   Copyright (C) 2020-2023  Bruno Haible <bruno@clisp.org>
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
22
22
 
23
23
/* See sys/arm64/include/ucontext.h.  */
24
24
 
 
25
#if defined(__CHERI__)
 
26
#define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.mc_capregs.cap_sp
 
27
#else
25
28
#define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.mc_gpregs.gp_sp
 
29
#endif
26
30
 
27
31
#else /* 32-bit */
28
32