g_error ("Larger allocation needed for the unwind information.");
codeindex = MONO_MAX_UNWIND_CODES - (++unwindinfo->CountOfCodes);
- unwindcode = &unwindinfo->UnwindCode[codeindex];
+ unwindcode = &unwindinfo->UnwindCode [codeindex];
unwindcode->UnwindOp = UWOP_PUSH_NONVOL;
unwindcode->CodeOffset = (guchar)unwind_op->when;
unwindcode->OpInfo = unwind_op->reg;
g_error ("Larger allocation needed for the unwind information.");
codeindex = MONO_MAX_UNWIND_CODES - (++unwindinfo->CountOfCodes);
- unwindcode = &unwindinfo->UnwindCode[codeindex];
+ unwindcode = &unwindinfo->UnwindCode [codeindex];
unwindcode->UnwindOp = UWOP_SET_FPREG;
unwindcode->CodeOffset = (guchar)unwind_op->when;
- g_assert(unwind_op->val % 16 == 0);
+ g_assert (unwind_op->val % 16 == 0);
unwindinfo->FrameRegister = unwind_op->reg;
unwindinfo->FrameOffset = unwind_op->val / 16;
g_error ("Larger allocation needed for the unwind information.");
codeindex = MONO_MAX_UNWIND_CODES - (unwindinfo->CountOfCodes += codesneeded);
- unwindcode = &unwindinfo->UnwindCode[codeindex];
+ unwindcode = &unwindinfo->UnwindCode [codeindex];
unwindcode->CodeOffset = (guchar)unwind_op->when;
// When using function table callback solution an out of proc module is needed by
// debuggers in order to read unwind info from debug target.
#ifdef _MSC_VER
-#define MONO_DAC_MODULE L"mono-2.0-dac-sgen.dll"
+#define MONO_DAC_MODULE TEXT("mono-2.0-dac-sgen.dll")
#else
-#define MONO_DAC_MODULE L"mono-2.0-sgen.dll"
+#define MONO_DAC_MODULE TEXT("mono-2.0-sgen.dll")
#endif
#define MONO_DAC_MODULE_MAX_PATH 1024
// DAC module should be in the same directory as the
// main executable.
- GetModuleFileNameW (NULL, buffer, G_N_ELEMENTS (buffer));
+ GetModuleFileNameW (NULL, buffer, G_N_ELEMENTS(buffer));
path = wcsrchr (buffer, TEXT('\\'));
if (path != NULL) {
path++;
*path = TEXT('\0');
}
- wcscat_s (buffer, G_N_ELEMENTS (buffer), MONO_DAC_MODULE);
+ wcscat_s (buffer, G_N_ELEMENTS(buffer), MONO_DAC_MODULE);
path = buffer;
// Register function table callback + out of proc module.
if (entry == g_dynamic_function_table_end)
g_dynamic_function_table_end = entry->prev;
- g_dynamic_function_table_begin = g_list_remove_link(g_dynamic_function_table_begin, entry);
+ g_dynamic_function_table_begin = g_list_remove_link (g_dynamic_function_table_begin, entry);
DynamicFunctionTableEntry *removed_entry = (DynamicFunctionTableEntry *)entry->data;
g_assert_checked (removed_entry != NULL);
}
if (current_rt_funcs [from_index].UnwindData != 0)
- new_rt_funcs[to_index++] = current_rt_funcs [from_index];
+ new_rt_funcs [to_index++] = current_rt_funcs [from_index];
}
// If we didn't insert by now, put it last in the list.
#if defined(TARGET_WIN32) || defined(HOST_WIN32)
#if _MSC_VER
- extern void __chkstk(void);
+ extern void __chkstk (void);
mono_register_jit_icall_full (__chkstk, "mono_chkstk_win64", NULL, TRUE, FALSE, "__chkstk");
#else
- extern void ___chkstk_ms(void);
+ extern void ___chkstk_ms (void);
mono_register_jit_icall_full (___chkstk_ms, "mono_chkstk_win64", NULL, TRUE, FALSE, "___chkstk_ms");
#endif
#endif
#ifdef TARGET_WIN32
guint8 *
-mono_arch_emit_prolog_setup_sp_win64(MonoCompile *cfg, guint8 *code, int alloc_size, int *cfa_offset_input)
+mono_arch_emit_prolog_setup_sp_win64 (MonoCompile *cfg, guint8 *code, int alloc_size, int *cfa_offset_input)
{
int cfa_offset = *cfa_offset_input;
/* Allocate stack frame */
#ifdef TARGET_WIN32
- code = mono_arch_emit_prolog_setup_sp_win64(cfg, code, alloc_size, &cfa_offset);
+ code = mono_arch_emit_prolog_setup_sp_win64 (cfg, code, alloc_size, &cfa_offset);
#else
if (alloc_size) {
/* See mono_emit_stack_alloc */
* OPTIONAL ULONG ExceptionData[]; */
} UNWIND_INFO, *PUNWIND_INFO;
-//typedef struct
-//{
-// UNWIND_INFO unwindInfo;
-//} MonoUnwindInfo, *PMonoUnwindInfo;
-
inline guint
mono_arch_unwindinfo_get_size (guchar code_count)
{
(sizeof (UNWIND_CODE) * ((MONO_MAX_UNWIND_CODES - ((code_count + 1) & ~1))));
}
-guchar mono_arch_unwindinfo_get_code_count (GSList *unwind_ops);
-guint mono_arch_unwindinfo_init_method_unwind_info (gpointer cfg);
-void mono_arch_unwindinfo_install_method_unwind_info (gpointer *monoui, gpointer code, guint code_size);
-void mono_arch_unwindinfo_install_tramp_unwind_info (GSList *unwind_ops, gpointer code, guint code_size);
+guchar
+mono_arch_unwindinfo_get_code_count (GSList *unwind_ops);
+
+guint
+mono_arch_unwindinfo_init_method_unwind_info (gpointer cfg);
-void mono_arch_code_chunk_new (void *chunk, int size);
-void mono_arch_code_chunk_destroy (void *chunk);
+void
+mono_arch_unwindinfo_install_method_unwind_info (gpointer *monoui, gpointer code, guint code_size);
+
+void
+mono_arch_unwindinfo_install_tramp_unwind_info (GSList *unwind_ops, gpointer code, guint code_size);
+
+void
+mono_arch_code_chunk_new (void *chunk, int size);
+
+void
+mono_arch_code_chunk_destroy (void *chunk);
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
#endif /* defined(TARGET_WIN32) && !defined(DISABLE_JIT) */
} DYNAMIC_FUNCTION_TABLE, *PDYNAMIC_FUNCTION_TABLE;
typedef BOOL (ReadMemoryFunction)(PVOID user_context, LPCVOID base_address, PVOID buffer, SIZE_T size, SIZE_T *read);
-BOOL read_memory(PVOID user_context, LPCVOID base_address, PVOID buffer, SIZE_T size, SIZE_T* read)
+
+BOOL
+read_memory(PVOID user_context, LPCVOID base_address, PVOID buffer, SIZE_T size, SIZE_T* read)
{
- return ReadProcessMemory((HANDLE)user_context, base_address, buffer, size, read);
+ return ReadProcessMemory ((HANDLE)user_context, base_address, buffer, size, read);
}
-MONO_API_EXPORT DWORD OutOfProcessFunctionTableCallbackEx (ReadMemoryFunction read_memory, PVOID user_context, PVOID table_address, PDWORD entries, PRUNTIME_FUNCTION *functions)
+MONO_API_EXPORT DWORD
+OutOfProcessFunctionTableCallbackEx (ReadMemoryFunction read_memory, PVOID user_context, PVOID table_address, PDWORD entries, PRUNTIME_FUNCTION *functions)
{
DYNAMIC_FUNCTION_TABLE func_table = { 0 };
DynamicFunctionTableEntry func_table_entry = { 0 };
return result;
}
-MONO_API_EXPORT DWORD OutOfProcessFunctionTableCallback (HANDLE process, PVOID table_address, PDWORD entries, PRUNTIME_FUNCTION *functions)
+MONO_API_EXPORT DWORD
+OutOfProcessFunctionTableCallback (HANDLE process, PVOID table_address, PDWORD entries, PRUNTIME_FUNCTION *functions)
{
return OutOfProcessFunctionTableCallbackEx (&read_memory, process, table_address, entries, functions);
}
#endif /* defined(TARGET_AMD64) && !defined(DISABLE_JIT) */
#ifdef _MSC_VER
-BOOL APIENTRY DllMain (HMODULE module_handle, DWORD reason, LPVOID reserved)
+BOOL APIENTRY
+DllMain (HMODULE module_handle, DWORD reason, LPVOID reserved)
{
return TRUE;
}