mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
LibC: Make regs.h work with compilers without concepts
This allows the gdb port to compile with our `regs.h`.
This commit is contained in:
parent
9f2e8683de
commit
1210ee9ba9
1 changed files with 42 additions and 36 deletions
|
@ -6,48 +6,54 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/Platform.h>
|
||||||
|
|
||||||
|
#if defined(__cplusplus) && defined(__cpp_concepts)
|
||||||
# include <AK/Types.h>
|
# include <AK/Types.h>
|
||||||
|
#else
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
struct [[gnu::packed]] PtraceRegisters {
|
struct [[gnu::packed]] PtraceRegisters {
|
||||||
#if ARCH(I386)
|
#if ARCH(I386)
|
||||||
u32 eax;
|
uint32_t eax;
|
||||||
u32 ecx;
|
uint32_t ecx;
|
||||||
u32 edx;
|
uint32_t edx;
|
||||||
u32 ebx;
|
uint32_t ebx;
|
||||||
u32 esp;
|
uint32_t esp;
|
||||||
u32 ebp;
|
uint32_t ebp;
|
||||||
u32 esi;
|
uint32_t esi;
|
||||||
u32 edi;
|
uint32_t edi;
|
||||||
u32 eip;
|
uint32_t eip;
|
||||||
u32 eflags;
|
uint32_t eflags;
|
||||||
#else
|
#else
|
||||||
u64 rax;
|
uint64_t rax;
|
||||||
u64 rcx;
|
uint64_t rcx;
|
||||||
u64 rdx;
|
uint64_t rdx;
|
||||||
u64 rbx;
|
uint64_t rbx;
|
||||||
u64 rsp;
|
uint64_t rsp;
|
||||||
u64 rbp;
|
uint64_t rbp;
|
||||||
u64 rsi;
|
uint64_t rsi;
|
||||||
u64 rdi;
|
uint64_t rdi;
|
||||||
u64 rip;
|
uint64_t rip;
|
||||||
u64 r8;
|
uint64_t r8;
|
||||||
u64 r9;
|
uint64_t r9;
|
||||||
u64 r10;
|
uint64_t r10;
|
||||||
u64 r11;
|
uint64_t r11;
|
||||||
u64 r12;
|
uint64_t r12;
|
||||||
u64 r13;
|
uint64_t r13;
|
||||||
u64 r14;
|
uint64_t r14;
|
||||||
u64 r15;
|
uint64_t r15;
|
||||||
u64 rflags;
|
uint64_t rflags;
|
||||||
#endif
|
#endif
|
||||||
u32 cs;
|
uint32_t cs;
|
||||||
u32 ss;
|
uint32_t ss;
|
||||||
u32 ds;
|
uint32_t ds;
|
||||||
u32 es;
|
uint32_t es;
|
||||||
u32 fs;
|
uint32_t fs;
|
||||||
u32 gs;
|
uint32_t gs;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && defined(__cpp_concepts)
|
||||||
FlatPtr ip() const
|
FlatPtr ip() const
|
||||||
{
|
{
|
||||||
# if ARCH(I386)
|
# if ARCH(I386)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue