1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 01:47:34 +00:00

Kernel: Reorganize ptrace implementation a bit

The generic parts of ptrace now live in Kernel/Syscalls/ptrace.cpp
and the i386 specific parts are moved to Arch/i386/CPU.cpp
This commit is contained in:
Andreas Kling 2021-02-08 19:34:41 +01:00
parent 45231051e6
commit f39c2b653e
8 changed files with 169 additions and 246 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -32,6 +32,7 @@
#include <AK/Vector.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/VirtualAddress.h>
#include <LibC/sys/arch/i386/regs.h>
#define PAGE_SIZE 4096
#define GENERIC_INTERRUPT_HANDLERS_COUNT (256 - IRQ_VECTOR_BASE)
@ -494,6 +495,9 @@ struct [[gnu::packed]] RegisterState {
#define REGISTER_STATE_SIZE (19 * 4)
static_assert(REGISTER_STATE_SIZE == sizeof(RegisterState));
void copy_kernel_registers_into_ptrace_registers(PtraceRegisters&, const RegisterState&);
void copy_ptrace_registers_into_kernel_registers(RegisterState&, const PtraceRegisters&);
struct [[gnu::aligned(16)]] FPUState
{
u8 buffer[512];