Kernel+LibC: Share definitions for sys/ptrace.h
This commit is contained in:
parent
6dc688a08d
commit
37e98a55b7
Notes:
sideshowbarker
2024-07-18 06:53:57 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/37e98a55b71
3 changed files with 34 additions and 28 deletions
32
Kernel/API/POSIX/sys/ptrace.h
Normal file
32
Kernel/API/POSIX/sys/ptrace.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/API/POSIX/sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PT_TRACE_ME 1
|
||||
#define PT_ATTACH 2
|
||||
#define PT_CONTINUE 3
|
||||
#define PT_SYSCALL 4
|
||||
#define PT_GETREGS 5
|
||||
#define PT_DETACH 6
|
||||
#define PT_PEEK 7
|
||||
#define PT_POKE 8
|
||||
#define PT_SETREGS 9
|
||||
#define PT_POKEDEBUG 10
|
||||
#define PT_PEEKDEBUG 11
|
||||
|
||||
#define DEBUG_STATUS_REGISTER 6
|
||||
#define DEBUG_CONTROL_REGISTER 7
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -20,6 +20,7 @@
|
|||
#include <Kernel/API/POSIX/signal.h>
|
||||
#include <Kernel/API/POSIX/stdio.h>
|
||||
#include <Kernel/API/POSIX/sys/mman.h>
|
||||
#include <Kernel/API/POSIX/sys/ptrace.h>
|
||||
#include <Kernel/API/POSIX/sys/socket.h>
|
||||
#include <Kernel/API/POSIX/sys/stat.h>
|
||||
#include <Kernel/API/POSIX/sys/time.h>
|
||||
|
@ -55,18 +56,6 @@ struct sched_param {
|
|||
int sched_priority;
|
||||
};
|
||||
|
||||
#define PT_TRACE_ME 1
|
||||
#define PT_ATTACH 2
|
||||
#define PT_CONTINUE 3
|
||||
#define PT_SYSCALL 4
|
||||
#define PT_GETREGS 5
|
||||
#define PT_DETACH 6
|
||||
#define PT_PEEK 7
|
||||
#define PT_POKE 8
|
||||
#define PT_SETREGS 9
|
||||
#define PT_POKEDEBUG 10
|
||||
#define PT_PEEKDEBUG 11
|
||||
|
||||
#define ST_RDONLY 0x1
|
||||
#define ST_NOSUID 0x2
|
||||
|
||||
|
|
|
@ -6,25 +6,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <Kernel/API/POSIX/sys/ptrace.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define PT_TRACE_ME 1
|
||||
#define PT_ATTACH 2
|
||||
#define PT_CONTINUE 3
|
||||
#define PT_SYSCALL 4
|
||||
#define PT_GETREGS 5
|
||||
#define PT_DETACH 6
|
||||
#define PT_PEEK 7
|
||||
#define PT_POKE 8
|
||||
#define PT_SETREGS 9
|
||||
#define PT_POKEDEBUG 10
|
||||
#define PT_PEEKDEBUG 11
|
||||
|
||||
#define DEBUG_STATUS_REGISTER 6
|
||||
#define DEBUG_CONTROL_REGISTER 7
|
||||
|
||||
// FIXME: PID/TID ISSUE
|
||||
// Affects the entirety of LibDebug and Userland/strace.cpp.
|
||||
// See also Kernel/Ptrace.cpp
|
||||
|
|
Loading…
Add table
Reference in a new issue