Skip to content

Commit

Permalink
Merge pull request #1229 from no92/sigcontext
Browse files Browse the repository at this point in the history
abis/linux: define sigcontext for x86(_64)
  • Loading branch information
no92 authored Jan 21, 2025
2 parents 8dccdf9 + d49baa6 commit 2e4b37d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions abis/linux/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,26 @@ struct _fpstate {
#endif
};

struct sigcontext {
#if defined(__x86_64__)
unsigned long r8, r9, r10, r11, r12, r13, r14, r15;
unsigned long rdi, rsi, rbp, rbx, rdx, rax, rcx, rsp, rip, eflags;
unsigned short cs, gs, fs, __pad0;
unsigned long err, trapno, oldmask, cr2;
struct _fpstate *fpstate;
unsigned long __reserved1[8];
#elif defined(__i386__)
unsigned short gs, __gsh, fs, __fsh, es, __esh, ds, __dsh;
unsigned long edi, esi, ebp, esp, ebx, edx, ecx, eax;
unsigned long trapno, err, eip;
unsigned short cs, __csh;
unsigned long eflags, esp_at_signal;
unsigned short ss, __ssh;
struct _fpstate *fpstate;
unsigned long oldmask, cr2;
#endif
};

typedef struct {
unsigned long gregs[NGREG];
struct _fpstate *fpregs;
Expand Down

0 comments on commit 2e4b37d

Please sign in to comment.