Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-07-14 22:07:54 +0300
committerGitHub <noreply@github.com>2022-07-14 22:07:54 +0300
commit2a19f878dab8d2e62123e0bf29453de553f5402a (patch)
treea4a09b8ba19daafe9856779e32e1e933575142ab
parent6051b710727762fd96367a7c32400d68533e63cb (diff)
Backport https://github.com/dotnet/runtime/pull/71436 (#21519)mono-6.12.0.183
Backport https://github.com/dotnet/runtime/pull/71436 Backport of #21516 to 2020-02 Co-authored-by: Thays Grazia <thaystg@gmail.com>
-rw-r--r--mono/mini/debugger-agent.c38
-rw-r--r--mono/mini/mini-runtime.c12
2 files changed, 25 insertions, 25 deletions
diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c
index 54c0ca97801..32bfc471ea2 100644
--- a/mono/mini/debugger-agent.c
+++ b/mono/mini/debugger-agent.c
@@ -908,6 +908,25 @@ debugger_agent_parse_options (char *options)
exit (1);
}
}
+
+ mini_get_debug_options ()->gen_sdb_seq_points = TRUE;
+ /*
+ * This is needed because currently we don't handle liveness info.
+ */
+ mini_get_debug_options ()->mdb_optimizations = TRUE;
+
+#ifndef MONO_ARCH_HAVE_CONTEXT_SET_INT_REG
+ /* This is needed because we can't set local variables in registers yet */
+ mono_disable_optimizations (MONO_OPT_LINEARS);
+#endif
+
+ /*
+ * The stack walk done from thread_interrupt () needs to be signal safe, but it
+ * isn't, since it can call into mono_aot_find_jit_info () which is not signal
+ * safe (#3411). So load AOT info eagerly when the debugger is running as a
+ * workaround.
+ */
+ mini_get_debug_options ()->load_aot_jit_info_eagerly = TRUE;
}
void
@@ -1035,25 +1054,6 @@ debugger_agent_init (void)
objrefs_init ();
suspend_init ();
- mini_get_debug_options ()->gen_sdb_seq_points = TRUE;
- /*
- * This is needed because currently we don't handle liveness info.
- */
- mini_get_debug_options ()->mdb_optimizations = TRUE;
-
-#ifndef MONO_ARCH_HAVE_CONTEXT_SET_INT_REG
- /* This is needed because we can't set local variables in registers yet */
- mono_disable_optimizations (MONO_OPT_LINEARS);
-#endif
-
- /*
- * The stack walk done from thread_interrupt () needs to be signal safe, but it
- * isn't, since it can call into mono_aot_find_jit_info () which is not signal
- * safe (#3411). So load AOT info eagerly when the debugger is running as a
- * workaround.
- */
- mini_get_debug_options ()->load_aot_jit_info_eagerly = TRUE;
-
#ifdef HAVE_SETPGID
if (agent_config.setpgid)
setpgid (0, 0);
diff --git a/mono/mini/mini-runtime.c b/mono/mini/mini-runtime.c
index 347ee8a9da9..d982e51a3ab 100644
--- a/mono/mini/mini-runtime.c
+++ b/mono/mini/mini-runtime.c
@@ -4159,12 +4159,6 @@ mini_init (const char *filename, const char *runtime_version)
}
#endif
- mono_interp_stub_init ();
-#ifndef DISABLE_INTERPRETER
- if (mono_use_interpreter)
- mono_ee_interp_init (mono_interp_opts_string);
-#endif
-
mono_debugger_agent_stub_init ();
#ifndef DISABLE_SDB
mono_debugger_agent_init ();
@@ -4173,6 +4167,12 @@ mini_init (const char *filename, const char *runtime_version)
if (sdb_options)
mini_get_dbg_callbacks ()->parse_options (sdb_options);
+ mono_interp_stub_init ();
+#ifndef DISABLE_INTERPRETER
+ if (mono_use_interpreter)
+ mono_ee_interp_init (mono_interp_opts_string);
+#endif
+
mono_os_mutex_init_recursive (&jit_mutex);
mono_cross_helpers_run ();