-
Notifications
You must be signed in to change notification settings - Fork 0
/
mono.d
202 lines (125 loc) · 4.18 KB
/
mono.d
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
201
202
module mono;
extern (C):
nothrow:
/* jit/jit.h */
MonoDomain* mono_jit_init(const(char)* file);
MonoDomain* mono_jit_init_version(const(char)* root_domain_name,
const(char)* runtime_version);
int mono_jit_exec(MonoDomain* domain,
MonoAssembly* assembly,
int argc,
char** argv);
void mono_jit_cleanup(MonoDomain* domain);
int mono_jit_set_trace_options(const(char)* options);
void mono_set_signal_chaining(int chain_signals);
void mono_jit_set_aot_only(int aot_only);
enum MonoBreakPolicy
{
MONO_BREAK_POLICY_ALWAYS,
MONO_BREAK_POLICY_NEVER,
MONO_BREAK_POLICY_ON_DBG,
}
alias MonoBreakPolicy function(MonoMethod* method) MonoBreakPolicyFunc;
void mono_set_break_policy(MonoBreakPolicyFunc policy_callback);
void mono_jit_parse_options(int argc, char** argv);
/* utils/mono-dl-fallback.h */
enum
{
MONO_DL_LAZY = 1,
MONO_DL_LOCAL = 2,
MONO_DL_MASK = 3,
}
struct MonoDlFallbackHandler
{
}
alias void* function(const(char)*, int, char**, void*) MonoDlFallbackLoad;
alias void* function(void*, const(char)*, char**, void*) MonoDlFallbackSymbol;
alias void* function(void*, void*) MonoDlFallbackClose;
MonoDlFallbackHandler* mono_dl_fallback_register(MonoDlFallbackLoad load_func,
MonoDlFallbackSymbol symbol_func,
MonoDlFallbackClose close_func,
void* user_data);
void mono_dl_fallback_unregister(MonoDlFallbackHandler* handler);
/* metadata/appdomain.h */
/* metadata/assembly.h */
/* metadata/attrdefs.h */
/* metadata/blob.h */
/* metadata/class.h */
/* metadata/debug-helpers.h */
/* metadata/debug-mono-symfile.h */
/* metadata/environment.h */
int mono_environment_exitcode_get();
void mono_environment_exitcode_set(int value);
/* metadata/exception.h */
/* metadata/image.h */
/* metadata/loader.h */
/* metadata/metadata.h */
/* metadata/mono-config.h */
const(char)* mono_get_config_dir();
void mono_set_config_dir(const(char)* dir);
const(char)* mono_get_machine_config();
void mono_config_cleanup();
void mono_config_parse(const(char)* filename);
void mono_config_for_assembly(MonoImage* assembly);
void mono_config_parse_memory(const(char)* buffer);
const(char)* mono_config_string_for_assembly_file(const(char)* filename);
/* metadata/mono-debug.h */
/* metadata/mono-gc.h */
alias int function(MonoObject*, MonoClass*, size_t, size_t, MonoObject**, size_t*, void*) MonoGCReferences;
void mono_gc_collect(int generation);
int mono_gc_max_generation();
int mono_gc_get_generation(MonoObject* object);
int mono_gc_collection_count(int generation);
long mono_gc_get_used_size();
long mono_gc_get_heap_size();
int mono_gc_invoke_finalizers();
int mono_gc_walk_heap(int flags,
MonoGCReferences callback,
void* data);
/* metadata/object.h */
/* metadata/opcodes.h */
/* metadata/profiler.h */
/* metadata/reflection.h */
/* metadata/row-indexes.h */
/* metadata/sgen-bridge.h */
/* metadata/threads.h */
/* metadata/tokentype.h */
/* metadata/verify.h */
/* utils/mono-error.h */
enum
{
MONO_ERROR_FREE_STRINGS = 0x0001,
MONO_ERROR_INCOMPLETE = 0x0002,
}
enum
{
MONO_ERROR_NONE = 0,
MONO_ERROR_MISSING_METHOD = 1,
MONO_ERROR_MISSING_FIELD = 2,
MONO_ERROR_TYPE_LOAD = 3,
MONO_ERROR_FILE_NOT_FOUND = 4,
MONO_ERROR_BAD_IMAGE = 5,
MONO_ERROR_OUT_OF_MEMORY = 6,
MONO_ERROR_ARGUMENT = 7,
MONO_ERROR_NOT_VERIFIABLE = 8,
MONO_ERROR_GENERIC = 9,
}
struct MonoError
{
ushort error_code;
ushort hidden_0;
void*[12] hidden_1;
char[128] hidden_2;
}
void mono_error_init(MonoError* error);
void mono_error_init_flags(MonoError* error,
ushort flags);
void mono_error_cleanup(MonoError* error);
int mono_error_ok(MonoError* error);
ushort mono_error_get_error_code(MonoError* error);
const(char)* mono_error_get_message(MonoError* error);
/* utils/mono-logger.h */
void mono_trace_set_level_string(const(char)* value);
void mono_trace_set_mask_string(const(char)* value);
/* utils/mono-publib.h */
void mono_free(void* ptr);