mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 04:15:23 +03:00
df8df947f6
Including signal.h would cause several ports to fail on build, because it would end up including AK/Platform.h through these mcontext headers. This is problematic because AK/Platform.h defines several macros with very common names, such as `NAKED` (breaks radare2), and `NO_SANITIZE_ADDRESS` and `ALWAYS_INLINE` (breaks ruby).
58 lines
912 B
C
58 lines
912 B
C
/*
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Kernel/API/POSIX/sys/types.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct __attribute__((packed)) __mcontext {
|
|
#ifdef __i386__
|
|
uint32_t eax;
|
|
uint32_t ecx;
|
|
uint32_t edx;
|
|
uint32_t ebx;
|
|
uint32_t esp;
|
|
uint32_t ebp;
|
|
uint32_t esi;
|
|
uint32_t edi;
|
|
uint32_t eip;
|
|
uint32_t eflags;
|
|
#else
|
|
uint64_t rax;
|
|
uint64_t rcx;
|
|
uint64_t rdx;
|
|
uint64_t rbx;
|
|
uint64_t rsp;
|
|
uint64_t rbp;
|
|
uint64_t rsi;
|
|
uint64_t rdi;
|
|
uint64_t rip;
|
|
uint64_t r8;
|
|
uint64_t r9;
|
|
uint64_t r10;
|
|
uint64_t r11;
|
|
uint64_t r12;
|
|
uint64_t r13;
|
|
uint64_t r14;
|
|
uint64_t r15;
|
|
uint64_t rflags;
|
|
#endif
|
|
uint32_t cs;
|
|
uint32_t ss;
|
|
uint32_t ds;
|
|
uint32_t es;
|
|
uint32_t fs;
|
|
uint32_t gs;
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|