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:
authorAndi McClure <andi.mcclure@xamarin.com>2016-03-11 22:30:49 +0300
committerAndi McClure <andi.mcclure@xamarin.com>2016-03-11 22:30:49 +0300
commit0404254a1504dd9965e95aedcfa64d487e19fbe4 (patch)
tree15d2fb51a0994f2a5bf45fd8a536062a01276fde
parent5a33ae7c7fe235dc1576363d30847017eae51e51 (diff)
"disable_omit_fp" can now be included in MONO_DEBUGdisable-omit-fp
Option disables a compiler optimization that omits framepointers from the stack.
-rw-r--r--man/mono.14
-rw-r--r--mono/mini/mini-runtime.c2
-rw-r--r--mono/mini/mini.c1
-rw-r--r--mono/mini/mini.h5
4 files changed, 12 insertions, 0 deletions
diff --git a/man/mono.1 b/man/mono.1
index 504a9774c94..f29f4d1601e 100644
--- a/man/mono.1
+++ b/man/mono.1
@@ -1638,6 +1638,10 @@ option.
When this option is set, the runtime will invalidate the domain memory
pool instead of destroying it.
.TP
+\fBdisable_omit_fp\fR
+Disables a compiler optimization where the frame pointer is omitted
+from the stack. This optimization can interact badly with debuggers.
+.TP
\fBdont-free-domains\fR
This is an Optimization for multi-AppDomain applications (most
commonly ASP.NET applications). Due to internal limitations Mono,
diff --git a/mono/mini/mini-runtime.c b/mono/mini/mini-runtime.c
index d08323376da..01754e47dc6 100644
--- a/mono/mini/mini-runtime.c
+++ b/mono/mini/mini-runtime.c
@@ -3310,6 +3310,8 @@ mini_parse_debug_option (const char *option)
mono_align_small_structs = TRUE;
else if (!strcmp (option, "native-debugger-break"))
debug_options.native_debugger_break = TRUE;
+ else if (!strcmp (option, "disable_omit_fp"))
+ debug_options.disable_omit_fp = TRUE;
else
return FALSE;
diff --git a/mono/mini/mini.c b/mono/mini/mini.c
index 10cb86ba1a9..fc06318188b 100644
--- a/mono/mini/mini.c
+++ b/mono/mini/mini.c
@@ -3478,6 +3478,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
cfg->verbose_level = mini_verbose;
cfg->compile_aot = compile_aot;
cfg->full_aot = full_aot;
+ cfg->disable_omit_fp = debug_options.disable_omit_fp;
cfg->skip_visibility = method->skip_visibility;
cfg->orig_method = method;
cfg->gen_seq_points = debug_options.gen_seq_points_compact_data || debug_options.gen_sdb_seq_points;
diff --git a/mono/mini/mini.h b/mono/mini/mini.h
index dcec9707567..d6f07ddca34 100644
--- a/mono/mini/mini.h
+++ b/mono/mini/mini.h
@@ -2131,6 +2131,11 @@ typedef struct {
* Translate Debugger.Break () into a native breakpoint signal
*/
gboolean native_debugger_break;
+ /*
+ * Disabling the frame pointer emit optimization can allow debuggers to more easily
+ * identify the stack on some platforms
+ */
+ gboolean disable_omit_fp;
} MonoDebugOptions;
enum {