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:
authorJoão Matos <joao@tritao.eu>2016-02-17 18:49:19 +0300
committerJoão Matos <joao@tritao.eu>2016-02-17 19:06:05 +0300
commitd47dfa8b5175b2c8ea5e6e5c99659c616218dadb (patch)
tree5afdd748b3b525db4c906e8108372b4c7cfed4b3
parentdd8adb39c34083f8763d3119fcf30fa2083d9f83 (diff)
[aot] Reworked sequence points file AOT option to allow an explicit path passed.
This will be used to fix msym files being overwritten per ABI compilation in AOT compilation driven by Monodroid.
-rw-r--r--mono/mini/aot-compiler.c11
-rw-r--r--mono/mini/seq-points.c8
-rw-r--r--mono/mini/seq-points.h3
3 files changed, 9 insertions, 13 deletions
diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c
index 2e6a5c302c8..8fcd8a50f55 100644
--- a/mono/mini/aot-compiler.c
+++ b/mono/mini/aot-compiler.c
@@ -111,6 +111,7 @@ typedef struct MonoAotOptions {
gboolean log_generics;
gboolean log_instances;
gboolean gen_seq_points_file;
+ char *gen_seq_points_file_path;
gboolean direct_pinvoke;
gboolean direct_icalls;
gboolean no_direct_calls;
@@ -6728,7 +6729,12 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
opts->ld_flags = g_strdup (arg + strlen ("ld-flags="));
} else if (str_begins_with (arg, "soft-debug")) {
opts->soft_debug = TRUE;
+ } else if (str_begins_with (arg, "gen-seq-points-file=")) {
+ debug_options.gen_seq_points_compact_data = TRUE;
+ opts->gen_seq_points_file = TRUE;
+ opts->gen_seq_points_file_path = g_strdup (arg + strlen ("gen-seq-points-file="));;
} else if (str_begins_with (arg, "gen-seq-points-file")) {
+ debug_options.gen_seq_points_compact_data = TRUE;
opts->gen_seq_points_file = TRUE;
} else if (str_begins_with (arg, "direct-pinvoke")) {
opts->direct_pinvoke = TRUE;
@@ -8546,8 +8552,9 @@ emit_exception_info (MonoAotCompile *acfg)
}
if (seq_points_to_file) {
- char *seq_points_aot_file;
- mono_image_get_aot_seq_point_path (acfg->image, &seq_points_aot_file);
+ char *seq_points_aot_file = acfg->aot_opts.gen_seq_points_file_path ? acfg->aot_opts.gen_seq_points_file_path
+ : g_strdup_printf("%s%s", acfg->image->name, SEQ_POINT_AOT_EXT);
+ printf("%s\n", seq_points_aot_file);
mono_seq_point_data_write (&sp_data, seq_points_aot_file);
mono_seq_point_data_free (&sp_data);
g_free (seq_points_aot_file);
diff --git a/mono/mini/seq-points.c b/mono/mini/seq-points.c
index ac22ca41f07..434a11f4370 100644
--- a/mono/mini/seq-points.c
+++ b/mono/mini/seq-points.c
@@ -294,11 +294,3 @@ mono_bb_deduplicate_op_il_seq_points (MonoCompile *cfg, MonoBasicBlock *bb)
MONO_REMOVE_INS (bb, prev);
};
}
-
-void
-mono_image_get_aot_seq_point_path (MonoImage *image, char **str)
-{
- int size = strlen (image->name) + strlen (SEQ_POINT_AOT_EXT) + 1;
- *str = (char *)g_malloc (size);
- g_sprintf (*str, "%s%s", image->name, SEQ_POINT_AOT_EXT);
-}
diff --git a/mono/mini/seq-points.h b/mono/mini/seq-points.h
index 3d053dba3dd..d0e6f5aa157 100644
--- a/mono/mini/seq-points.h
+++ b/mono/mini/seq-points.h
@@ -25,7 +25,4 @@ mono_find_seq_point (MonoDomain *domain, MonoMethod *method, gint32 il_offset, M
void
mono_bb_deduplicate_op_il_seq_points (MonoCompile *cfg, MonoBasicBlock *bb);
-void
-mono_image_get_aot_seq_point_path (MonoImage *image, char **str);
-
#endif /* __MONO_SEQ_POINTS_H__ */