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:
authorZoltan Varga <vargaz@gmail.com>2013-03-11 18:29:22 +0400
committerZoltan Varga <vargaz@gmail.com>2013-03-11 18:29:33 +0400
commit1a441364a6c23a5a0976c555f695b0a46fd25b66 (patch)
tree1a4db76a626fd0182a9ddabf4299dc4048c50df8
parent9e3e69451a75eab2969940b53aa81e1b4ee1fde1 (diff)
Add a 'dwarfdebug' AOT option to emit DWARF debug info even if the 'nodebug' AOT option is used.
-rw-r--r--man/mono.16
-rw-r--r--mono/mini/aot-compiler.c11
2 files changed, 16 insertions, 1 deletions
diff --git a/man/mono.1 b/man/mono.1
index 1c2e054aee1..1afc37ea670 100644
--- a/man/mono.1
+++ b/man/mono.1
@@ -144,6 +144,12 @@ Defaults to 128.
.I nodebug
Instructs the AOT compiler to not output any debugging information.
.TP
+.I dwarfdebug
+Instructs the AOT compiler to emit DWARF debugging information. When
+used together with the nodebug option, only DWARF debugging
+information is emitted, but not the information that can be used at
+runtime.
+.TP
.I nrgctx-trampolines=[number]
When compiling in full aot mode, the generic sharing trampolines must be precreated
in the AOT image. You can add additional method trampolines with this argument.
diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c
index edfd92b4a43..e18cc14c779 100644
--- a/mono/mini/aot-compiler.c
+++ b/mono/mini/aot-compiler.c
@@ -123,6 +123,7 @@ typedef struct MonoAotOptions {
gboolean asm_only;
gboolean asm_writer;
gboolean nodebug;
+ gboolean dwarf_debug;
gboolean soft_debug;
gboolean log_generics;
gboolean direct_pinvoke;
@@ -5783,6 +5784,8 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
opts->asm_writer = TRUE;
} else if (str_begins_with (arg, "nodebug")) {
opts->nodebug = TRUE;
+ } else if (str_begins_with (arg, "dwarfdebug")) {
+ opts->dwarf_debug = TRUE;
} else if (str_begins_with (arg, "nopagetrampolines")) {
opts->use_trampolines_page = FALSE;
} else if (str_begins_with (arg, "ntrampolines=")) {
@@ -5842,6 +5845,7 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
printf (" asmonly\n");
printf (" asmwriter\n");
printf (" nodebug\n");
+ printf (" dwarfdebug\n");
printf (" ntrampolines=\n");
printf (" nrgctx-trampolines=\n");
printf (" nimt-trampolines=\n");
@@ -8338,8 +8342,13 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
}
}
- if (!acfg->aot_opts.nodebug)
+ if (!acfg->aot_opts.nodebug || acfg->aot_opts.dwarf_debug) {
+ if (acfg->aot_opts.dwarf_debug && mono_debug_format == MONO_DEBUG_FORMAT_NONE) {
+ fprintf (stderr, "The dwarf AOT option requires the --debug option.\n");
+ return 1;
+ }
acfg->dwarf = mono_dwarf_writer_create (acfg->w, NULL, 0, FALSE);
+ }
img_writer_emit_start (acfg->w);