blob: 0ea3ba1663db85bdc9d5ba86afef0a2de4328bcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/* ========================================
Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license.
======================================== */
#pragma once
/// =========================================================== ///
/// @author Amlal El Mahrouss
/// =========================================================== ///
#include <CompilerKit/Detail/Config.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <sys/user.h>
#include <sys/wait.h>
#include <unistd.h>
#include <dlfcn.h>
#ifdef __APPLE__
#include <mach-o/dyld.h>
#include <mach/mach.h>
#include <mach/mach_error.h>
#endif
#ifndef kDistRelease
#define kDistVersion "v0.0.7-debuggerkit"
#define kDistVersionBCD 0x0001
#define ToString(X) Stringify(X)
#define Stringify(X) #X
#define kDistRelease ToString(kDistReleaseBranch)
#endif // !kDistRelease
namespace DebuggerKit {
/// =========================================================== ///
/// \brief Process ID
/// =========================================================== ///
typedef uint64_t ProcessID;
/// =========================================================== ///
/// \brief Address type, a la BSD.
/// =========================================================== ///
typedef char* CAddress;
namespace Detail {
constexpr auto kDebugCmdLen = 256U;
constexpr auto kDebugPort = 51820;
constexpr auto kDebugMagic = "NE1.0.0;";
constexpr uint16_t kDebugVersion = 0x0100;
constexpr auto kDebugDelim = ';';
constexpr auto kDebugEnd = '\r';
using dk_socket_type = int64_t;
} // namespace Detail
} // namespace DebuggerKit
|