Skip to content

Commit

Permalink
Update Aarch64 sigframe size
Browse files Browse the repository at this point in the history
Resolves #3877
  • Loading branch information
rocallahan committed Nov 12, 2024
1 parent c360a0a commit f7067f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/RecordSession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1729,8 +1729,7 @@ bool RecordSession::signal_state_changed(RecordTask* t, StepState* step_state) {
/* this returns 512 when XSAVE unsupported */
xsave_area_size();
} else if (t->arch() == aarch64) {
sigframe_size = sizeof(ARM64Arch::rt_sigframe) +
sizeof(ARM64Arch::user_fpsimd_state);
sigframe_size = sizeof(ARM64Arch::rt_sigframe);
} else {
DEBUG_ASSERT(0 && "Add sigframe size for your architecture here");
}
Expand Down
4 changes: 4 additions & 0 deletions src/kernel_abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2520,17 +2520,21 @@ struct ARM64Arch : public GenericArch<SupportedArch::aarch64, WordSize64Defs> {
struct hw_bp dbg_regs[16];
};

// Also defined as mcontext_t in some headers
struct __attribute((aligned(16))) sigcontext {
__u64 fault_addr;
user_pt_regs regs;
// ISA extension state follows here
unsigned char __reserved[4096] __attribute((aligned(16)));
};

// Also defined as ucontext_t in some headers
struct ucontext {
unsigned long uc_flags;
ptr<ucontext> uc_link;
stack_t uc_stack;
kernel_sigset_t uc_sigmask;
/* 128 bytes are reserved for the sigmask so reflect that here */
uint8_t __unused1[1024 / 8 - sizeof(kernel_sigset_t)];
struct sigcontext uc_mcontext;
};
Expand Down

0 comments on commit f7067f1

Please sign in to comment.