forked from bloomberg/pystack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.h
More file actions
200 lines (191 loc) Β· 4.49 KB
/
code.h
File metadata and controls
200 lines (191 loc) Β· 4.49 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
#pragma once
#include "object.h"
namespace pystack {
namespace Python2 {
typedef struct
{
PyObject_HEAD int co_argcount;
int co_nlocals;
int co_stacksize;
int co_flags;
PyObject* co_code;
PyObject* co_consts;
PyObject* co_names;
PyObject* co_varnames;
PyObject* co_freevars;
PyObject* co_cellvars;
PyObject* co_filename;
PyObject* co_name;
int co_firstlineno;
PyObject* co_lnotab;
} PyCodeObject;
} // namespace Python2
namespace Python3_3 {
typedef struct
{
PyObject_HEAD int co_argcount;
int co_kwonlyargcount;
int co_nlocals;
int co_stacksize;
int co_flags;
PyObject* co_code;
PyObject* co_consts;
PyObject* co_names;
PyObject* co_varnames;
PyObject* co_freevars;
PyObject* co_cellvars;
unsigned char* co_cell2arg;
PyObject* co_filename;
PyObject* co_name;
int co_firstlineno;
PyObject* co_lnotab;
} PyCodeObject;
} // namespace Python3_3
namespace Python3_6 {
typedef struct
{
PyObject_HEAD int co_argcount;
int co_kwonlyargcount;
int co_nlocals;
int co_stacksize;
int co_flags;
int co_firstlineno;
PyObject* co_code;
PyObject* co_consts;
PyObject* co_names;
PyObject* co_varnames;
PyObject* co_freevars;
PyObject* co_cellvars;
unsigned char* co_cell2arg;
PyObject* co_filename;
PyObject* co_name;
PyObject* co_lnotab;
} PyCodeObject;
} // namespace Python3_6
namespace Python3_8 {
typedef struct
{
PyObject_HEAD int co_argcount;
int co_posonlyargcount;
int co_kwonlyargcount;
int co_nlocals;
int co_stacksize;
int co_flags;
int co_firstlineno;
PyObject* co_code;
PyObject* co_consts;
PyObject* co_names;
PyObject* co_varnames;
PyObject* co_freevars;
PyObject* co_cellvars;
Py_ssize_t* co_cell2arg;
PyObject* co_filename;
PyObject* co_name;
PyObject* co_lnotab;
} PyCodeObject;
} // namespace Python3_8
namespace Python3_11 {
typedef uint16_t _Py_CODEUNIT;
typedef struct
{
PyObject_VAR_HEAD PyObject* co_consts;
PyObject* co_names;
PyObject* co_exceptiontable;
int co_flags;
short co_warmup;
short _co_linearray_entry_size;
int co_argcount;
int co_posonlyargcount;
int co_kwonlyargcount;
int co_stacksize;
int co_firstlineno;
int co_nlocalsplus;
int co_nlocals;
int co_nplaincellvars;
int co_ncellvars;
int co_nfreevars;
PyObject* co_localsplusnames;
PyObject* co_localspluskinds;
PyObject* co_filename;
PyObject* co_name;
PyObject* co_qualname;
PyObject* co_linetable;
PyObject* co_weakreflist;
PyObject* _co_code;
char* _co_linearray;
int _co_firsttraceable;
void* co_extra;
char co_code_adaptive[1];
} PyCodeObject;
} // namespace Python3_11
namespace Python3_12 {
typedef uint16_t _Py_CODEUNIT;
typedef struct
{
PyObject_VAR_HEAD PyObject* co_consts;
PyObject* co_names;
PyObject* co_exceptiontable;
int co_flags;
int co_argcount;
int co_posonlyargcount;
int co_kwonlyargcount;
int co_stacksize;
int co_firstlineno;
int co_nlocalsplus;
int co_framesize;
int co_nlocals;
int co_ncellvars;
int co_nfreevars;
uint32_t co_version;
PyObject* co_localsplusnames;
PyObject* co_localspluskinds;
PyObject* co_filename;
PyObject* co_name;
PyObject* co_qualname;
PyObject* co_linetable;
PyObject* co_weakreflist;
void* _co_cached;
uint64_t _co_instrumentation_version;
void* _co_monitoring;
int _co_firsttraceable;
void* co_extra;
char co_code_adaptive[1];
} PyCodeObject;
} // namespace Python3_12
namespace Python3_13 {
typedef uint16_t _Py_CODEUNIT;
typedef struct
{
PyObject_VAR_HEAD;
PyObject* co_consts;
PyObject* co_names;
PyObject* co_exceptiontable;
int co_flags;
int co_argcount;
int co_posonlyargcount;
int co_kwonlyargcount;
int co_stacksize;
int co_firstlineno;
int co_nlocalsplus;
int co_framesize;
int co_nlocals;
int co_ncellvars;
int co_nfreevars;
uint32_t co_version;
PyObject* co_localsplusnames;
PyObject* co_localspluskinds;
PyObject* co_filename;
PyObject* co_name;
PyObject* co_qualname;
PyObject* co_linetable;
PyObject* co_weakreflist;
void* co_executors;
void* _co_cached;
uintptr_t _co_instrumentation_version;
void* _co_monitoring;
int _co_firsttraceable;
void* co_extra;
char co_code_adaptive[1];
} PyCodeObject;
} // namespace Python3_13
} // namespace pystack