il2cpp-compat.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. #pragma once
  2. #include <mono/metadata/il2cpp-compat-metadata.h>
  3. #if defined(RUNTIME_IL2CPP)
  4. #include "il2cpp-c-types.h"
  5. #include "il2cpp-api.h"
  6. #include "vm/GlobalMetadataFileInternals.h"
  7. #else
  8. #include <mono/mini/mini.h>
  9. #include <mono/sgen/sgen-conf.h>
  10. #include <mono/metadata/profiler.h>
  11. #endif //RUNTIME_IL2CPP
  12. #ifdef RUNTIME_IL2CPP
  13. #ifndef THREAD_STATIC_FIELD_OFFSET
  14. #define THREAD_STATIC_FIELD_OFFSET -1
  15. #endif
  16. #define VM_DOMAIN_GET_AGENT_INFO(domain) il2cpp_domain_get_agent_info(domain)
  17. #define VM_DOMAIN_SET_AGENT_INFO(domain, value) il2cpp_domain_set_agent_info(domain, value)
  18. #define VM_METHOD_IS_STRING_CTOR(method) il2cpp_method_is_string_ctor(method)
  19. #define VM_INFLATED_METHOD_GET_DECLARING(imethod) il2cpp_method_get_generic_definition(imethod)
  20. #define VM_INFLATED_METHOD_GET_CLASS_INST(imethod) il2cpp_method_get_generic_class_inst(imethod)
  21. #define VM_OBJECT_GET_DOMAIN(object) il2cpp_mono_domain_get()
  22. #define VM_OBJECT_GET_TYPE(object) il2cpp_mono_object_get_type(object)
  23. #define VM_GENERIC_CLASS_GET_CONTAINER_CLASS(gklass) il2cpp_generic_class_get_container_class(gklass)
  24. #define VM_DEFAULTS_OBJECT_CLASS il2cpp_defaults_object_class()
  25. #define VM_DEFAULTS_EXCEPTION_CLASS il2cpp_defaults_exception_class()
  26. #define VM_DEFAULTS_CORLIB_IMAGE il2cpp_defaults_corlib_image()
  27. #define VM_DEFAULTS_VOID_CLASS il2cpp_defaults_void_class()
  28. //Fixme module name as image name seems bad
  29. #define VM_IMAGE_GET_MODULE_NAME(image) il2cpp_image_name(image)
  30. #else
  31. #define VM_DOMAIN_GET_AGENT_INFO(domain) domain_jit_info (domain)->agent_info
  32. #define VM_DOMAIN_SET_AGENT_INFO(domain, value) domain_jit_info (domain)->agent_info = value
  33. #define VM_METHOD_IS_STRING_CTOR(method) method->string_ctor
  34. #define VM_INFLATED_METHOD_GET_DECLARING(imethod) (imethod)->declaring
  35. #define VM_INFLATED_METHOD_GET_CLASS_INST(imethod) (imethod)->context.class_inst
  36. #define VM_OBJECT_GET_DOMAIN(object) ((MonoObject*)object)->vtable->domain
  37. #define VM_OBJECT_GET_TYPE(object) ((MonoReflectionType*)object->vtable->type)->type
  38. #define VM_GENERIC_CLASS_GET_CONTAINER_CLASS(gklass) (gklass)->container_class
  39. #define VM_DEFAULTS_OBJECT_CLASS mono_defaults.object_class
  40. #define VM_DEFAULTS_EXCEPTION_CLASS mono_defaults.exception_class
  41. #define VM_DEFAULTS_CORLIB_IMAGE mono_defaults.corlib
  42. #define VM_DEFAULTS_VOID_CLASS mono_defaults.void_class
  43. #define VM_IMAGE_GET_MODULE_NAME(image) (image)->module_name
  44. #endif
  45. #if defined(RUNTIME_IL2CPP)
  46. #define MonoMethodSignature Il2CppMonoMethodSignature
  47. #define MonoRuntimeExceptionHandlingCallbacks Il2CppMonoRuntimeExceptionHandlingCallbacks
  48. #define debug_options il2cpp_mono_debug_options
  49. #define MonoTypeNameParse Il2CppMonoTypeNameParse
  50. #define MonoDebugOptions Il2CppMonoDebugOptions
  51. #define MonoLMF Il2CppMonoLMF
  52. #define mono_image_get_entry_point il2cpp_mono_image_get_entry_point
  53. #define mono_image_get_filename il2cpp_mono_image_get_filename
  54. #define mono_image_get_guid il2cpp_mono_image_get_guid
  55. #define mono_image_is_dynamic il2cpp_mono_image_is_dynamic
  56. #define mono_type_get_class il2cpp_mono_type_get_class
  57. #define m_type_get_generic_class il2cpp_m_type_get_generic_class
  58. #define mono_type_is_struct il2cpp_mono_type_is_struct
  59. #define mono_type_is_reference il2cpp_mono_type_is_reference
  60. #define mono_metadata_free_mh il2cpp_mono_metadata_free_mh
  61. #define mono_method_signature il2cpp_mono_method_signature
  62. #define mono_method_get_param_names il2cpp_mono_method_get_param_names
  63. #define mono_type_generic_inst_is_valuetype il2cpp_mono_type_generic_inst_is_valuetype
  64. #define mono_method_get_header_checked il2cpp_mono_method_get_header_checked
  65. #define mono_class_init il2cpp_mono_class_init
  66. #define mono_class_vtable il2cpp_mono_class_vtable
  67. #define mono_class_get_field_from_name il2cpp_mono_class_get_field_from_name
  68. #define mono_array_element_size il2cpp_mono_array_element_size
  69. #define mono_class_instance_size il2cpp_mono_class_instance_size
  70. #define mono_class_value_size il2cpp_mono_class_value_size
  71. #define mono_class_is_assignable_from il2cpp_mono_class_is_assignable_from
  72. #define mono_class_from_mono_type il2cpp_mono_class_from_mono_type
  73. #define mono_class_get_flags il2cpp_class_get_flags
  74. #define mono_class_num_fields il2cpp_mono_class_num_fields
  75. #define mono_class_num_methods il2cpp_mono_class_num_methods
  76. #define mono_class_num_properties il2cpp_mono_class_num_properties
  77. #define mono_class_get_fields il2cpp_mono_class_get_fields
  78. #define mono_class_get_methods il2cpp_mono_class_get_methods
  79. #define mono_class_get_properties il2cpp_mono_class_get_properties
  80. #define mono_class_get_nested_types il2cpp_class_get_nested_types_accepts_generic
  81. #define mono_field_get_name il2cpp_mono_field_get_name
  82. #define mono_class_get_method_from_name il2cpp_class_get_method_from_name
  83. #define mono_string_chars il2cpp_mono_string_chars
  84. #define mono_class_is_abstract il2cpp_class_is_abstract
  85. #define mono_string_length il2cpp_mono_string_length
  86. #define mono_array_addr_with_size il2cpp_mono_array_addr_with_size
  87. #define mono_array_length il2cpp_mono_array_length
  88. #define mono_string_new il2cpp_mono_string_new
  89. #define mono_string_new_checked il2cpp_mono_string_new_checked
  90. #define mono_string_to_utf8_checked il2cpp_mono_string_to_utf8_checked
  91. #define mono_object_hash il2cpp_mono_object_hash
  92. #define mono_object_unbox il2cpp_mono_object_unbox
  93. #define mono_object_get_virtual_method il2cpp_object_get_virtual_method
  94. #define mono_field_set_value il2cpp_mono_field_set_value
  95. #define mono_field_static_set_value il2cpp_mono_field_static_set_value
  96. #define mono_gchandle_new_weakref il2cpp_mono_gchandle_new_weakref
  97. #define mono_gchandle_get_target il2cpp_mono_gchandle_get_target
  98. #define mono_gchandle_free il2cpp_mono_gchandle_free
  99. #define mono_gc_wbarrier_generic_store il2cpp_mono_gc_wbarrier_generic_store
  100. #define mono_reflection_parse_type_checked il2cpp_mono_reflection_parse_type_checked
  101. #define mono_reflection_free_type_info il2cpp_mono_reflection_free_type_info
  102. #define mono_get_root_domain il2cpp_mono_get_root_domain
  103. #define mono_runtime_quit il2cpp_mono_runtime_quit
  104. #define mono_runtime_is_shutting_down il2cpp_mono_runtime_is_shutting_down
  105. #define mono_domain_get il2cpp_mono_domain_get
  106. #define mono_domain_set il2cpp_mono_domain_set
  107. #define mono_domain_foreach il2cpp_mono_domain_foreach
  108. #define mono_jit_info_table_find il2cpp_mono_jit_info_table_find
  109. #define mono_jit_info_get_method il2cpp_mono_jit_info_get_method
  110. #define mono_debug_find_method il2cpp_mono_debug_find_method
  111. #define mono_debug_free_method_jit_info il2cpp_mono_debug_free_method_jit_info
  112. #define mono_debug_il_offset_from_address il2cpp_mono_debug_il_offset_from_address
  113. #define mono_set_is_debugger_attached il2cpp_mono_set_is_debugger_attached
  114. #define mono_type_full_name il2cpp_mono_type_full_name
  115. #define mono_method_full_name il2cpp_mono_method_full_name
  116. #define mono_thread_current il2cpp_mono_thread_current
  117. #define mono_thread_get_main il2cpp_mono_thread_get_main
  118. #define mono_thread_attach il2cpp_mono_thread_attach
  119. #define mono_thread_detach il2cpp_mono_thread_detach
  120. #define mono_domain_lock il2cpp_mono_domain_lock
  121. #define mono_domain_unlock il2cpp_mono_domain_unlock
  122. #define mono_jit_info_table_find_internal il2cpp_mono_jit_info_table_find_internal
  123. #define mono_aligned_addr_hash il2cpp_mono_aligned_addr_hash
  124. #define mono_metadata_get_generic_inst il2cpp_mono_metadata_get_generic_inst
  125. #define mono_get_method_checked il2cpp_mono_get_method_checked
  126. #define mono_class_interface_offset_with_variance il2cpp_mono_class_interface_offset_with_variance
  127. #define mono_class_setup_supertypes il2cpp_mono_class_setup_supertypes
  128. #define mono_class_setup_vtable il2cpp_mono_class_setup_vtable
  129. #define mono_class_setup_methods il2cpp_mono_class_setup_methods
  130. #define mono_class_field_is_special_static il2cpp_mono_class_field_is_special_static
  131. #define mono_class_field_get_special_static_type il2cpp_mono_class_field_get_special_static_type
  132. #define mono_class_get_context il2cpp_mono_class_get_context
  133. #define mono_method_get_context il2cpp_mono_method_get_context
  134. #define mono_method_get_generic_container il2cpp_mono_method_get_generic_container
  135. #define mono_class_inflate_generic_method_full_checked il2cpp_mono_class_inflate_generic_method_full_checked
  136. #define mono_class_inflate_generic_method_checked il2cpp_mono_class_inflate_generic_method_checked
  137. #define mono_loader_lock il2cpp_mono_loader_lock
  138. #define mono_loader_unlock il2cpp_mono_loader_unlock
  139. #define mono_loader_lock_track_ownership il2cpp_mono_loader_lock_track_ownership
  140. #define mono_loader_lock_is_owned_by_self il2cpp_mono_loader_lock_is_owned_by_self
  141. #define mono_method_get_wrapper_data il2cpp_mono_method_get_wrapper_data
  142. #define mono_type_get_name_full il2cpp_mono_type_get_name_full
  143. #define mono_class_is_nullable il2cpp_mono_class_is_nullable
  144. #define mono_class_get_generic_container il2cpp_mono_class_get_generic_container
  145. #define mono_class_setup_interfaces il2cpp_mono_class_setup_interfaces
  146. #define mono_class_get_methods_by_name il2cpp_mono_class_get_methods_by_name
  147. #define mono_class_is_valuetype il2cpp_class_is_valuetype
  148. #define mono_ldtoken_checked il2cpp_mono_ldtoken_checked
  149. #define mono_class_from_generic_parameter_internal il2cpp_mono_class_from_generic_parameter_internal
  150. #define mono_class_load_from_name il2cpp_mono_class_load_from_name
  151. #define mono_class_try_load_from_name il2cpp_class_from_name
  152. #define mono_class_get_generic_class il2cpp_mono_class_get_generic_class
  153. #define mono_thread_internal_current il2cpp_mono_thread_internal_current
  154. #define mono_thread_internal_is_current il2cpp_mono_thread_internal_is_current
  155. #define mono_thread_internal_abort il2cpp_mono_thread_internal_abort
  156. #define mono_thread_internal_reset_abort il2cpp_mono_thread_internal_reset_abort
  157. #define mono_thread_get_name il2cpp_mono_thread_get_name
  158. #define mono_thread_set_name_internal il2cpp_mono_thread_set_name_internal
  159. #define mono_thread_suspend_all_other_threads il2cpp_mono_thread_suspend_all_other_threads
  160. #define mono_stack_mark_record_size il2cpp_mono_stack_mark_record_size
  161. #define mono_get_eh_callbacks il2cpp_mono_get_eh_callbacks
  162. #define mono_nullable_init il2cpp_mono_nullable_init
  163. #define mono_value_box_checked il2cpp_mono_value_box_checked
  164. #define mono_field_static_get_value_checked il2cpp_mono_field_static_get_value_checked
  165. #define mono_field_static_get_value_for_thread il2cpp_mono_field_static_get_value_for_thread
  166. #define mono_field_get_value_object_checked il2cpp_mono_field_get_value_object_checked
  167. #define mono_field_get_offset il2cpp_field_get_offset
  168. #define mono_object_new_checked il2cpp_mono_object_new_checked
  169. #define mono_ldstr_checked il2cpp_mono_ldstr_checked
  170. #define mono_runtime_try_invoke il2cpp_mono_runtime_try_invoke
  171. #define mono_runtime_invoke_checked il2cpp_mono_runtime_invoke_checked
  172. #define mono_gc_base_init il2cpp_mono_gc_base_init
  173. #define mono_gc_register_root il2cpp_mono_gc_register_root
  174. #define mono_gc_deregister_root il2cpp_mono_gc_deregister_root
  175. #define mono_environment_exitcode_get il2cpp_mono_environment_exitcode_get
  176. #define mono_environment_exitcode_set il2cpp_mono_environment_exitcode_set
  177. #define mono_threadpool_suspend il2cpp_mono_threadpool_suspend
  178. #define mono_threadpool_resume il2cpp_mono_threadpool_resume
  179. #define mono_assembly_get_image il2cpp_mono_assembly_get_image
  180. #define mono_runtime_try_shutdown il2cpp_mono_runtime_try_shutdown
  181. #define mono_verifier_is_method_valid_generic_instantiation il2cpp_mono_verifier_is_method_valid_generic_instantiation
  182. #define mono_reflection_get_type_checked il2cpp_mono_reflection_get_type_checked
  183. #define mono_assembly_get_object_handle il2cpp_mono_assembly_get_object_handle
  184. #define mono_type_get_object_checked il2cpp_mono_type_get_object_checked
  185. #define mono_network_init il2cpp_mono_network_init
  186. #define mono_w32socket_set_blocking il2cpp_mono_w32socket_set_blocking
  187. #define mono_get_runtime_build_info il2cpp_mono_get_runtime_build_info
  188. #define mono_marshal_method_from_wrapper il2cpp_mono_marshal_method_from_wrapper
  189. #define mini_get_debug_options il2cpp_mini_get_debug_options
  190. #define mini_get_interp_callbacks il2cpp_mini_get_interp_callbacks
  191. #define mono_jit_find_compiled_method_with_jit_info il2cpp_mono_jit_find_compiled_method_with_jit_info
  192. #define mono_get_lmf_addr il2cpp_mono_get_lmf_addr
  193. #define mono_set_lmf il2cpp_mono_set_lmf
  194. #define mono_aot_get_method_checked il2cpp_mono_aot_get_method_checked
  195. #define mono_arch_setup_resume_sighandler_ctx il2cpp_mono_arch_setup_resume_sighandler_ctx
  196. #define mono_arch_set_breakpoint il2cpp_mono_arch_set_breakpoint
  197. #define mono_arch_clear_breakpoint il2cpp_mono_arch_clear_breakpoint
  198. #define mono_arch_start_single_stepping il2cpp_mono_arch_start_single_stepping
  199. #define mono_arch_stop_single_stepping il2cpp_mono_arch_stop_single_stepping
  200. #define mono_arch_skip_breakpoint il2cpp_mono_arch_skip_breakpoint
  201. #define mono_arch_skip_single_step il2cpp_mono_arch_skip_single_step
  202. #define mono_arch_context_get_int_reg il2cpp_mono_arch_context_get_int_reg
  203. #define mono_arch_context_set_int_reg il2cpp_mono_arch_context_set_int_reg
  204. #define mono_walk_stack_with_ctx il2cpp_mono_walk_stack_with_ctx
  205. #define mono_walk_stack_with_state il2cpp_mono_walk_stack_with_state
  206. #define mono_thread_state_init_from_current il2cpp_mono_thread_state_init_from_current
  207. #define mono_thread_state_init_from_monoctx il2cpp_mono_thread_state_init_from_monoctx
  208. #define mini_jit_info_table_find il2cpp_mini_jit_info_table_find
  209. #define mono_restore_context il2cpp_mono_restore_context
  210. #define mono_method_get_declaring_generic_method il2cpp_mono_method_get_declaring_generic_method
  211. #define jinfo_get_method il2cpp_jinfo_get_method
  212. #define mono_defaults il2cpp_mono_defaults
  213. #define mono_find_prev_seq_point_for_native_offset il2cpp_mono_find_prev_seq_point_for_native_offset
  214. #define mono_w32socket_accept_internal il2cpp_mono_w32socket_accept_internal
  215. #define mono_find_next_seq_point_for_native_offset il2cpp_mono_find_next_seq_point_for_native_offset
  216. #define mono_class_has_parent il2cpp_mono_class_has_parent
  217. #define mono_class_is_gtd il2cpp_class_is_generic
  218. #define mono_class_is_ginst il2cpp_class_is_inflated
  219. #define mono_generic_container_get_param il2cpp_mono_generic_container_get_param
  220. #define mono_find_seq_point il2cpp_mono_find_seq_point
  221. #define mono_seq_point_iterator_init il2cpp_mono_seq_point_iterator_init
  222. #define mono_seq_point_iterator_next il2cpp_mono_seq_point_iterator_next
  223. #define mono_seq_point_init_next il2cpp_mono_seq_point_init_next
  224. #define mono_get_seq_points il2cpp_mono_get_seq_points
  225. #define G_BREAKPOINT IL2CPP_G_BREAKPOINT
  226. #define mono_thread_info_safe_suspend_and_run il2cpp_mono_thread_info_safe_suspend_and_run
  227. #define mono_error_cleanup il2cpp_mono_error_cleanup
  228. #define mono_error_convert_to_exception il2cpp_mono_error_convert_to_exception
  229. #define mono_error_get_message il2cpp_mono_error_get_message
  230. #define mono_error_assert_ok_pos il2cpp_mono_error_assert_ok_pos
  231. #define mono_class_get_namespace il2cpp_class_get_namespace
  232. #define mono_class_get_name il2cpp_class_get_name
  233. #define mono_object_get_class il2cpp_object_get_class
  234. #define mono_field_get_parent il2cpp_field_get_parent
  235. #define mono_class_get_parent il2cpp_class_get_parent
  236. #define mono_field_get_type il2cpp_field_get_type
  237. #define mono_method_get_name il2cpp_method_get_name
  238. #define mono_class_get_type il2cpp_class_get_type
  239. #define mono_class_get_byref_type il2cpp_mono_class_get_byref_type
  240. #define mono_method_get_class il2cpp_method_get_class
  241. #define mono_class_get_image il2cpp_class_get_image
  242. #define mono_class_get_interfaces il2cpp_class_get_interfaces
  243. #undef MONO_CLASS_IS_INTERFACE
  244. #define MONO_CLASS_IS_INTERFACE il2cpp_class_is_interface
  245. #define mono_image_get_assembly il2cpp_image_get_assembly
  246. #define mono_image_get_name il2cpp_image_get_name
  247. #define mono_type_get_type il2cpp_type_get_type
  248. #define mono_class_get_rank il2cpp_class_get_rank
  249. #define mono_class_get_element_class il2cpp_class_get_element_class
  250. #define mono_class_get_type_token il2cpp_class_get_type_token
  251. #define mono_type_is_byref il2cpp_type_is_byref
  252. #define mono_type_get_attrs il2cpp_type_get_attrs
  253. #define mono_class_is_enum il2cpp_class_is_enum
  254. #define mono_method_get_flags il2cpp_method_get_flags
  255. #define mono_method_get_token il2cpp_method_get_token
  256. #define mono_method_is_generic il2cpp_method_is_generic
  257. #define mono_method_is_inflated il2cpp_method_is_inflated
  258. #undef mono_field_is_deleted
  259. #define mono_field_is_deleted il2cpp_field_is_deleted
  260. #define mono_domain_get_assemblies_iter il2cpp_domain_get_assemblies_iter
  261. #define mono_property_get_name il2cpp_property_get_name
  262. #define mono_property_get_set_method il2cpp_property_get_set_method
  263. #define mono_property_get_get_method il2cpp_property_get_get_method
  264. #define mono_property_get_parent il2cpp_property_get_parent
  265. #define m_domain_get_corlib il2cpp_m_domain_get_corlib
  266. #define mono_generic_class_get_context il2cpp_mono_generic_class_get_context
  267. #define m_class_is_initialized il2cpp_m_class_is_initialized
  268. #define mono_debug_lookup_locals il2cpp_debug_lookup_locals
  269. #define mono_debug_free_locals il2cpp_debug_free_locals
  270. #undef mono_domain_assemblies_lock
  271. #define mono_domain_assemblies_lock
  272. #undef mono_domain_assemblies_unlock
  273. #define mono_domain_assemblies_unlock
  274. #define mono_get_string_class il2cpp_mono_get_string_class
  275. #define MONO_MAX_IREGS 1
  276. #define NOT_IMPLEMENTED do { g_assert_not_reached (); } while (0)
  277. MonoMethod* il2cpp_mono_image_get_entry_point(MonoImage *image);
  278. const char* il2cpp_mono_image_get_filename(MonoImage *image);
  279. const char* il2cpp_mono_image_get_guid(MonoImage *image);
  280. MonoClass* il2cpp_mono_type_get_class(MonoType *type);
  281. mono_bool il2cpp_mono_type_is_struct(MonoType *type);
  282. mono_bool il2cpp_mono_type_is_reference(MonoType *type);
  283. void il2cpp_mono_metadata_free_mh(MonoMethodHeader *mh);
  284. Il2CppMonoMethodSignature* il2cpp_mono_method_signature(MonoMethod *m);
  285. void il2cpp_mono_method_get_param_names(MonoMethod *method, const char **names);
  286. mono_bool il2cpp_mono_type_generic_inst_is_valuetype(MonoType *type);
  287. MonoMethodHeader* il2cpp_mono_method_get_header_checked(MonoMethod *method, MonoError *error);
  288. gboolean il2cpp_mono_class_init(MonoClass *klass);
  289. MonoVTable* il2cpp_mono_class_vtable(MonoDomain *domain, MonoClass *klass);
  290. MonoClassField* il2cpp_mono_class_get_field_from_name(MonoClass *klass, const char *name);
  291. int32_t il2cpp_mono_array_element_size(MonoClass *ac);
  292. int32_t il2cpp_mono_class_instance_size(MonoClass *klass);
  293. int32_t il2cpp_mono_class_value_size(MonoClass *klass, uint32_t *align);
  294. gboolean il2cpp_mono_class_is_assignable_from(MonoClass *klass, MonoClass *oklass);
  295. MonoClass* il2cpp_mono_class_from_mono_type(MonoType *type);
  296. int il2cpp_mono_class_num_fields(MonoClass *klass);
  297. int il2cpp_mono_class_num_methods(MonoClass *klass);
  298. int il2cpp_mono_class_num_properties(MonoClass *klass);
  299. MonoClassField* il2cpp_mono_class_get_fields(MonoClass* klass, gpointer *iter);
  300. MonoMethod* il2cpp_mono_class_get_methods(MonoClass* klass, gpointer *iter);
  301. MonoProperty* il2cpp_mono_class_get_properties(MonoClass* klass, gpointer *iter);
  302. const char* il2cpp_mono_field_get_name(MonoClassField *field);
  303. mono_unichar2* il2cpp_mono_string_chars(MonoString *s);
  304. int il2cpp_mono_string_length(MonoString *s);
  305. char* il2cpp_mono_array_addr_with_size(MonoArray *array, int size, uintptr_t idx);
  306. uintptr_t il2cpp_mono_array_length(MonoArray *array);
  307. MonoString* il2cpp_mono_string_new(MonoDomain *domain, const char *text);
  308. MonoString* il2cpp_mono_string_new(MonoDomain *domain, const char *text);
  309. MonoString* il2cpp_mono_string_new_checked(MonoDomain *domain, const char *text, MonoError *merror);
  310. char* il2cpp_mono_string_to_utf8_checked(MonoString *string_obj, MonoError *error);
  311. int il2cpp_mono_object_hash(MonoObject* obj);
  312. void* il2cpp_mono_object_unbox(MonoObject *obj);
  313. void il2cpp_mono_field_set_value(MonoObject *obj, MonoClassField *field, void *value);
  314. void il2cpp_mono_field_static_set_value(MonoVTable *vt, MonoClassField *field, void *value);
  315. uint32_t il2cpp_mono_gchandle_new_weakref(MonoObject *obj, mono_bool track_resurrection);
  316. MonoObject* il2cpp_mono_gchandle_get_target(uint32_t gchandle);
  317. void il2cpp_mono_gchandle_free(uint32_t gchandle);
  318. void il2cpp_mono_gc_wbarrier_generic_store(void* ptr, MonoObject* value);
  319. int il2cpp_mono_reflection_parse_type_checked(char *name, Il2CppMonoTypeNameParse *info, MonoError *error);
  320. void il2cpp_mono_reflection_free_type_info(Il2CppMonoTypeNameParse *info);
  321. MonoDomain* il2cpp_mono_get_root_domain(void);
  322. void il2cpp_mono_runtime_quit(void);
  323. gboolean il2cpp_mono_runtime_is_shutting_down(void);
  324. MonoDomain* il2cpp_mono_domain_get(void);
  325. gboolean il2cpp_mono_domain_set(MonoDomain *domain, gboolean force);
  326. void il2cpp_mono_domain_foreach(MonoDomainFunc func, gpointer user_data);
  327. MonoJitInfo* il2cpp_mono_jit_info_table_find(MonoDomain* domain, char* addr);
  328. MonoMethod* il2cpp_mono_jit_info_get_method(MonoJitInfo* ji);
  329. MonoDebugMethodJitInfo* il2cpp_mono_debug_find_method(MonoMethod *method, MonoDomain *domain);
  330. gint32 il2cpp_mono_debug_il_offset_from_address(MonoMethod* method, MonoDomain* domain, guint32 native_offset);
  331. void il2cpp_mono_set_is_debugger_attached(gboolean attached);
  332. char* il2cpp_mono_type_full_name(MonoType* type);
  333. char* il2cpp_mono_method_full_name(MonoMethod* method, gboolean signature);
  334. MonoThread* il2cpp_mono_thread_current();
  335. MonoThread* il2cpp_mono_thread_get_main();
  336. MonoThread* il2cpp_mono_thread_attach(MonoDomain* domain);
  337. void il2cpp_mono_domain_lock(MonoDomain* domain);
  338. void il2cpp_mono_domain_unlock(MonoDomain* domain);
  339. MonoJitInfo* il2cpp_mono_jit_info_table_find_internal(MonoDomain* domain, char* addr, gboolean try_aot, gboolean allow_trampolines);
  340. guint il2cpp_mono_aligned_addr_hash(gconstpointer ptr);
  341. MonoGenericInst* il2cpp_mono_metadata_get_generic_inst(int type_argc, MonoType** type_argv);
  342. MonoMethod* il2cpp_mono_get_method_checked(MonoImage* image, guint32 token, MonoClass* klass, MonoGenericContext* context, MonoError* error);
  343. int il2cpp_mono_class_interface_offset_with_variance(MonoClass* klass, MonoClass* itf, gboolean* non_exact_match);
  344. void il2cpp_mono_class_setup_supertypes(MonoClass* klass);
  345. void il2cpp_mono_class_setup_vtable(MonoClass* klass);
  346. void il2cpp_mono_class_setup_methods(MonoClass* klass);
  347. gboolean il2cpp_mono_class_field_is_special_static(MonoClassField* field);
  348. guint32 il2cpp_mono_class_field_get_special_static_type(MonoClassField* field);
  349. MonoGenericContext* il2cpp_mono_class_get_context(MonoClass* klass);
  350. MonoGenericContext* il2cpp_mono_method_get_context(MonoMethod* method);
  351. MonoGenericContainer* il2cpp_mono_method_get_generic_container(MonoMethod* method);
  352. MonoMethod* il2cpp_mono_class_inflate_generic_method_full_checked(MonoMethod* method, MonoClass* klass_hint, MonoGenericContext* context, MonoError* error);
  353. MonoMethod* il2cpp_mono_class_inflate_generic_method_checked(MonoMethod* method, MonoGenericContext* context, MonoError* error);
  354. void il2cpp_mono_loader_lock();
  355. void il2cpp_mono_loader_unlock();
  356. void il2cpp_mono_loader_lock_track_ownership(gboolean track);
  357. gboolean il2cpp_mono_loader_lock_is_owned_by_self();
  358. gpointer il2cpp_mono_method_get_wrapper_data(MonoMethod* method, guint32 id);
  359. char* il2cpp_mono_type_get_name_full(MonoType* type, MonoTypeNameFormat format);
  360. gboolean il2cpp_mono_class_is_nullable(MonoClass* klass);
  361. MonoGenericContainer* il2cpp_mono_class_get_generic_container(MonoClass* klass);
  362. void il2cpp_mono_class_setup_interfaces(MonoClass* klass, MonoError* error);
  363. GPtrArray* il2cpp_mono_class_get_methods_by_name(MonoClass* klass, const char* name, guint32 bflags, gboolean ignore_case, gboolean allow_ctors, MonoError* error);
  364. gpointer il2cpp_mono_ldtoken_checked(MonoImage* image, guint32 token, MonoClass** handle_class, MonoGenericContext* context, MonoError* error);
  365. MonoClass* il2cpp_mono_class_from_generic_parameter_internal(MonoGenericParam* param);
  366. MonoClass* il2cpp_mono_class_load_from_name(MonoImage* image, const char* name_space, const char* name);
  367. MonoGenericClass* il2cpp_mono_class_get_generic_class(MonoClass* klass);
  368. MonoInternalThread* il2cpp_mono_thread_internal_current();
  369. gboolean il2cpp_mono_thread_internal_is_current(MonoInternalThread* thread);
  370. void il2cpp_mono_thread_internal_abort(MonoInternalThread* thread, gboolean appdomain_unload);
  371. void il2cpp_mono_thread_internal_reset_abort(MonoInternalThread* thread);
  372. gunichar2* il2cpp_mono_thread_get_name(MonoInternalThread* this_obj, guint32* name_len);
  373. void il2cpp_mono_thread_set_name_internal(MonoInternalThread* this_obj, MonoString* name, gboolean permanent, gboolean reset, MonoError* error);
  374. void il2cpp_mono_thread_suspend_all_other_threads();
  375. void il2cpp_mono_stack_mark_record_size(MonoThreadInfo* info, HandleStackMark* stackmark, const char* func_name);
  376. Il2CppMonoRuntimeExceptionHandlingCallbacks* il2cpp_mono_get_eh_callbacks();
  377. void il2cpp_mono_nullable_init(guint8* buf, MonoObject* value, MonoClass* klass);
  378. MonoObject* il2cpp_mono_value_box_checked(MonoDomain* domain, MonoClass* klass, gpointer value, MonoError* error);
  379. void il2cpp_mono_field_static_get_value_checked(MonoVTable* vt, MonoClassField* field, void* value, MonoError* error);
  380. void il2cpp_mono_field_static_get_value_for_thread(MonoInternalThread* thread, MonoVTable* vt, MonoClassField* field, void* value, MonoError* error);
  381. MonoObject* il2cpp_mono_field_get_value_object_checked(MonoDomain* domain, MonoClassField* field, MonoObject* obj, MonoError* error);
  382. MonoObject* il2cpp_mono_object_new_checked(MonoDomain* domain, MonoClass* klass, MonoError* error);
  383. MonoString* il2cpp_mono_ldstr_checked(MonoDomain* domain, MonoImage* image, guint32 idx, MonoError* error);
  384. MonoObject* il2cpp_mono_runtime_try_invoke(MonoMethod* method, void* obj, void** params, MonoObject** exc, MonoError* error);
  385. MonoObject* il2cpp_mono_runtime_invoke_checked(MonoMethod* method, void* obj, void** params, MonoError* error);
  386. void il2cpp_mono_gc_base_init();
  387. int il2cpp_mono_gc_register_root(char* start, size_t size, MonoGCDescriptor descr, MonoGCRootSource source, void *key, const char* msg);
  388. void il2cpp_mono_gc_deregister_root(char* addr);
  389. gint32 il2cpp_mono_environment_exitcode_get();
  390. void il2cpp_mono_environment_exitcode_set(gint32 value);
  391. void il2cpp_mono_threadpool_suspend();
  392. void il2cpp_mono_threadpool_resume();
  393. gboolean il2cpp_mono_runtime_try_shutdown();
  394. gboolean il2cpp_mono_verifier_is_method_valid_generic_instantiation(MonoMethod* method);
  395. MonoType* il2cpp_mono_reflection_get_type_checked(MonoImage* rootimage, MonoImage* image, Il2CppMonoTypeNameParse* info, gboolean ignorecase, gboolean* type_resolve, MonoError* error);
  396. MonoReflectionAssemblyHandle il2cpp_mono_assembly_get_object_handle(MonoDomain* domain, MonoAssembly* assembly, MonoError* error);
  397. MonoReflectionType* il2cpp_mono_type_get_object_checked(MonoDomain* domain, MonoType* type, MonoError* error);
  398. void il2cpp_mono_network_init();
  399. gint il2cpp_mono_w32socket_set_blocking(SOCKET sock, gboolean blocking);
  400. char* il2cpp_mono_get_runtime_build_info();
  401. MonoMethod* il2cpp_mono_marshal_method_from_wrapper(MonoMethod* wrapper);
  402. MonoDebugOptions* il2cpp_mini_get_debug_options();
  403. MonoInterpCallbacks* il2cpp_mini_get_interp_callbacks(void);
  404. gpointer il2cpp_mono_jit_find_compiled_method_with_jit_info(MonoDomain* domain, MonoMethod* method, MonoJitInfo** ji);
  405. MonoLMF** il2cpp_mono_get_lmf_addr();
  406. void il2cpp_mono_set_lmf(MonoLMF* lmf);
  407. gpointer il2cpp_mono_aot_get_method_checked(MonoDomain* domain, MonoMethod* method, MonoError* error);
  408. void il2cpp_mono_arch_setup_resume_sighandler_ctx(MonoContext* ctx, gpointer func);
  409. void il2cpp_mono_arch_set_breakpoint(MonoJitInfo* ji, guint8* ip);
  410. void il2cpp_mono_arch_clear_breakpoint(MonoJitInfo* ji, guint8* ip);
  411. void il2cpp_mono_arch_start_single_stepping();
  412. void il2cpp_mono_arch_stop_single_stepping();
  413. void il2cpp_mono_arch_skip_breakpoint(MonoContext* ctx, MonoJitInfo* ji);
  414. void il2cpp_mono_arch_skip_single_step(MonoContext* ctx);
  415. mgreg_t il2cpp_mono_arch_context_get_int_reg(MonoContext* ctx, int reg);
  416. void il2cpp_mono_arch_context_set_int_reg(MonoContext* ctx, int reg, mgreg_t val);
  417. void il2cpp_mono_walk_stack_with_ctx(Il2CppMonoJitStackWalk func, MonoContext* start_ctx, MonoUnwindOptions unwind_options, void* user_data);
  418. void il2cpp_mono_walk_stack_with_state(Il2CppMonoJitStackWalk func, MonoThreadUnwindState* state, MonoUnwindOptions unwind_options, void* user_data);
  419. gboolean il2cpp_mono_thread_state_init_from_current(MonoThreadUnwindState* ctx);
  420. gboolean il2cpp_mono_thread_state_init_from_monoctx(MonoThreadUnwindState* ctx, MonoContext* mctx);
  421. MonoJitInfo* il2cpp_mini_jit_info_table_find(MonoDomain* domain, char* addr, MonoDomain** out_domain);
  422. void il2cpp_mono_restore_context(MonoContext* ctx);
  423. MonoMethod* il2cpp_mono_method_get_declaring_generic_method(MonoMethod* method);
  424. MonoMethod* il2cpp_jinfo_get_method(MonoJitInfo *ji);
  425. gboolean il2cpp_mono_find_prev_seq_point_for_native_offset(MonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point);
  426. SOCKET il2cpp_mono_w32socket_accept_internal(SOCKET s, struct sockaddr *addr, socklen_t *addrlen, gboolean blocking);
  427. gboolean il2cpp_mono_find_next_seq_point_for_native_offset(MonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point);
  428. gboolean il2cpp_mono_class_has_parent(MonoClass *klass, MonoClass *parent);
  429. MonoGenericParam* il2cpp_mono_generic_container_get_param(MonoGenericContainer *gc, int i);
  430. gboolean il2cpp_mono_find_seq_point(MonoDomain *domain, MonoMethod *method, gint32 il_offset, MonoSeqPointInfo **info, SeqPoint *seq_point);
  431. void il2cpp_mono_seq_point_iterator_init(SeqPointIterator* it, MonoSeqPointInfo* info);
  432. gboolean il2cpp_mono_seq_point_iterator_next(SeqPointIterator* it);
  433. void il2cpp_mono_seq_point_init_next(MonoSeqPointInfo* info, SeqPoint sp, SeqPoint* next);
  434. MonoSeqPointInfo* il2cpp_mono_get_seq_points(MonoDomain *domain, MonoMethod *method);
  435. void IL2CPP_G_BREAKPOINT();
  436. void il2cpp_mono_thread_info_safe_suspend_and_run(MonoNativeThreadId id, gboolean interrupt_kernel, MonoSuspendThreadCallback callback, gpointer user_data);
  437. void il2cpp_mono_error_cleanup(MonoError *oerror);
  438. MonoException* il2cpp_mono_error_convert_to_exception(MonoError *target_error);
  439. const char* il2cpp_mono_error_get_message(MonoError *oerror);
  440. void il2cpp_mono_error_assert_ok_pos(MonoError *error, const char* filename, int lineno);
  441. Il2CppSequencePoint* il2cpp_get_method_sequence_points(MonoMethod* method, void* *iter);
  442. MonoClass* il2cpp_class_get_nested_types_accepts_generic(MonoClass *monoClass, void* *iter);
  443. MonoClass* il2cpp_defaults_object_class();
  444. guint8 il2cpp_array_rank(MonoArray *monoArr);
  445. const char* il2cpp_image_name(MonoImage *monoImage);
  446. guint8* il2cpp_field_get_address(MonoObject *obj, MonoClassField *monoField);
  447. MonoType* il2cpp_mono_object_get_type(MonoObject* object);
  448. MonoClass* il2cpp_defaults_exception_class();
  449. MonoImage* il2cpp_defaults_corlib_image();
  450. bool il2cpp_method_is_string_ctor(const MonoMethod * method);
  451. MonoClass* il2cpp_defaults_void_class();
  452. MonoMethod* il2cpp_get_interface_method(MonoClass* klass, MonoClass* itf, int slot);
  453. gboolean il2cpp_field_is_deleted(MonoClassField *field);
  454. MonoClass* il2cpp_iterate_loaded_classes(void* *iter);
  455. MonoAssembly* il2cpp_domain_get_assemblies_iter(MonoAppDomain *domain, void* *iter);
  456. const char** il2cpp_get_source_files_for_type(MonoClass *klass, int *count);
  457. MonoMethod* il2cpp_method_get_generic_definition(MonoMethodInflated *imethod);
  458. MonoGenericInst* il2cpp_method_get_generic_class_inst(MonoMethodInflated *imethod);
  459. MonoClass* il2cpp_generic_class_get_container_class(MonoGenericClass *gclass);
  460. void il2cpp_mono_thread_detach(MonoThread* thread);
  461. MonoClass* il2cpp_mono_get_string_class(void);
  462. Il2CppSequencePoint* il2cpp_get_sequence_point(MonoImage* image, int id);
  463. char* il2cpp_assembly_get_full_name(MonoAssembly *assembly);
  464. const MonoMethod* il2cpp_get_seq_point_method(Il2CppSequencePoint *seqPoint);
  465. const MonoClass* il2cpp_get_class_from_index(int index);
  466. const MonoType* il2cpp_get_type_from_index(int index);
  467. const MonoType* il2cpp_get_type_from_method_context(MonoType* type, const MonoMethod* method);
  468. const MonoType* il2cpp_type_inflate(MonoType* type, const MonoGenericContext* context);
  469. void il2cpp_debugger_get_method_execution_context_and_header_info(const MonoMethod* method, uint32_t* executionContextInfoCount, const Il2CppMethodExecutionContextInfo **executionContextInfo, const Il2CppMethodHeaderInfo **headerInfo, const Il2CppMethodScope **scopes);
  470. Il2CppThreadUnwindState* il2cpp_debugger_get_thread_context();
  471. MonoGenericContext* il2cpp_mono_generic_class_get_context(MonoGenericClass *gclass);
  472. MonoType* il2cpp_mono_class_get_byref_type(MonoClass *klass);
  473. mono_bool il2cpp_mono_image_is_dynamic(MonoImage *image);
  474. MonoGenericClass* il2cpp_m_type_get_generic_class(MonoType* type);
  475. const MonoAssembly* il2cpp_m_method_get_assembly(MonoMethod* method);
  476. const MonoAssembly* il2cpp_m_domain_get_corlib(MonoDomain *domain);
  477. mono_bool il2cpp_m_class_is_initialized(MonoClass* klass);
  478. Il2CppSequencePointSourceFile* il2cpp_debug_get_source_file(MonoImage* image, int index);
  479. MonoDebugLocalsInfo* il2cpp_debug_lookup_locals(MonoMethod *method);
  480. void il2cpp_debug_free_locals(MonoDebugLocalsInfo *info);
  481. Il2CppCatchPoint* il2cpp_get_method_catch_points(MonoMethod* method, void* *iter);
  482. Il2CppSequencePoint* il2cpp_get_seq_point_from_catch_point(Il2CppCatchPoint *cp);
  483. size_t il2cpp_type_size(MonoType *t);
  484. #endif // RUNTIME_IL2CPP