static void mono_init_merp (const intptr_t crashed_pid, const char *signal, MonoStackHash *hashes, MERPStruct *merp, const char *version) { g_assert (mono_merp_enabled ()); // If these aren't set, icall wasn't made // don't do merp? / don't set the variable to use merp; g_assert (config.appBundleID); g_assert (config.appVersion); merp->bundleIDArg = config.appSignature; merp->versionArg = config.appVersion; merp->archArg = get_merp_arch (); merp->exceptionArg = parse_exception_type (signal); merp->serviceNameArg = config.appBundleID; // FIXME: Not really a posix way to associated a process with a single executable // path? Linux gets bogged down in /proc merp->servicePathArg = NULL; if (crashed_pid) { size_t servicePathSize = sizeof (gchar) * 1200; merp->servicePathArg = g_malloc0 (servicePathSize); int result = proc_pidpath (crashed_pid, (void *) merp->servicePathArg, 1200); if (result <= 0) { g_free ((void *) merp->servicePathArg); merp->servicePathArg = NULL; } } merp->moduleName = "Mono Exception"; merp->moduleVersion = version; merp->moduleOffset = 0; ERROR_DECL (error); merp->uiLidArg = ves_icall_System_Threading_Thread_current_lcid (error); mono_error_assert_ok (error); merp->osVersion = os_version_string (); // FIXME: THis is apple-only for now merp->systemManufacturer = "apple"; get_apple_model ((char *) merp->systemModel, sizeof (merp->systemModel)); merp->hashes = *hashes; }
static void mono_init_merp (const intptr_t crashed_pid, const char *signal, MonoStackHash *hashes, MERPStruct *merp) { mono_memory_barrier (); g_assert (mono_merp_enabled ()); merp->merpFilePath = config.merpFilePath; merp->crashLogPath = config.crashLogPath; merp->werXmlPath = config.werXmlPath; // If these aren't set, icall wasn't made // don't do merp? / don't set the variable to use merp; g_assert (config.appBundleID); g_assert (config.appVersion); merp->bundleIDArg = config.appSignature; merp->versionArg = config.appVersion; merp->archArg = get_merp_arch (); merp->exceptionArg = parse_exception_type (signal); merp->serviceNameArg = config.appBundleID; merp->servicePathArg = config.appPath; merp->moduleName = "Mono Exception"; merp->moduleVersion = config.moduleVersion; merp->moduleOffset = 0; merp->uiLidArg = MONO_LOCALE_INVARIANT; merp->osVersion = os_version_string (); // FIXME: THis is apple-only for now merp->systemManufacturer = "apple"; get_apple_model ((char *) merp->systemModel, sizeof (merp->systemModel)); merp->eventType = config.eventType; merp->hashes = *hashes; merp->annotations = config.annotations; }