forked from nodejs/llnode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode-constants.h
More file actions
102 lines (74 loc) · 1.79 KB
/
node-constants.h
File metadata and controls
102 lines (74 loc) · 1.79 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#ifndef SRC_NODE_CONSTANTS_H_
#define SRC_NODE_CONSTANTS_H_
#include <lldb/API/LLDB.h>
#include "src/constants.h"
#include "src/llv8.h"
using lldb::addr_t;
namespace llnode {
namespace node {
namespace constants {
#define NODE_CONSTANTS_DEFAULT_METHODS(Class) \
Class(v8::LLV8* llv8) : Module(llv8) {} \
CONSTANTS_DEFAULT_METHODS(Class)
class Module : public Constants {
public:
Module(v8::LLV8* llv8) : llv8_(llv8) {}
inline std::string constant_prefix() override { return "nodedbg_"; };
inline v8::LLV8* llv8() { return llv8_; }
private:
v8::LLV8* llv8_;
};
class Environment : public Module {
public:
NODE_CONSTANTS_DEFAULT_METHODS(Environment);
int64_t kReqWrapQueueOffset;
int64_t kHandleWrapQueueOffset;
int64_t kEnvContextEmbedderDataIndex;
addr_t kCurrentEnvironment;
protected:
void Load();
private:
addr_t LoadCurrentEnvironment(Error& err);
addr_t CurrentEnvironmentFromContext(v8::Value context, Error& err);
};
class ReqWrapQueue : public Module {
public:
NODE_CONSTANTS_DEFAULT_METHODS(ReqWrapQueue);
int64_t kHeadOffset;
int64_t kNextOffset;
protected:
void Load();
};
class ReqWrap : public Module {
public:
NODE_CONSTANTS_DEFAULT_METHODS(ReqWrap);
int64_t kListNodeOffset;
protected:
void Load();
};
class HandleWrapQueue : public Module {
public:
NODE_CONSTANTS_DEFAULT_METHODS(HandleWrapQueue);
int64_t kHeadOffset;
int64_t kNextOffset;
protected:
void Load();
};
class HandleWrap : public Module {
public:
NODE_CONSTANTS_DEFAULT_METHODS(HandleWrap);
int64_t kListNodeOffset;
protected:
void Load();
};
class BaseObject : public Module {
public:
NODE_CONSTANTS_DEFAULT_METHODS(BaseObject);
int64_t kPersistentHandleOffset;
protected:
void Load();
};
}
} // namespace node
} // namespace llnode
#endif