Changeset 15735


Ignore:
Timestamp:
Feb 16, 2013, 7:02:43 AM (7 years ago)
Author:
gb
Message:

FreeBSD/amd64 changed the format of an mcontext_t structure so that the mc_trapno field is
unly 32 bits wide (instead of 64). Change our macros that acccess this field to only look
at the low 32 bits (regardless of whether or not there are more bits.)

This has kept 64-bit FreeBSD lisp kernels built on systems before the
change from running on systems released after the change (even if the
appropriate compatXx package was installed); the change occurred in
the FreeBSD kernel on April 1, 2009

<svnweb.freebsd.org/base?view=revision&revision=190616>

I don't know when the userspace headers were updated to reflect the kernel change.

I don't know why something that breaks binary compatibility would be said to preserve
ABI compatibility, either.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/platform-freebsdx8664.h

    r15702 r15735  
    6060extern void freebsd_sigreturn(ExceptionInformation *);
    6161#define SIGNUM_FOR_INTN_TRAP SIGBUS
    62 #define IS_MAYBE_INT_TRAP(info,xp) ((xp->uc_mcontext.mc_trapno == T_PROTFLT) && ((xp->uc_mcontext.mc_err & 7) == 2))
    63 #define IS_PAGE_FAULT(info,xp) (xp->uc_mcontext.mc_trapno == T_PAGEFLT)
     62#define IS_MAYBE_INT_TRAP(info,xp) (((uint32_t)(xp->uc_mcontext.mc_trapno) == T_PROTFLT) && ((xp->uc_mcontext.mc_err & 7) == 2))
     63#define IS_PAGE_FAULT(info,xp) ((uint32_t)(xp->uc_mcontext.mc_trapno) == T_PAGEFLT)
    6464#define SIGRETURN(context) do {freebsd_sigreturn(context); \
    6565    Bug(context,"sigreturn returned"); \
Note: See TracChangeset for help on using the changeset viewer.