[runtime] Use mono_debug_method_lookup_location () instead of mono_debug_symfile_look...
authorZoltan Varga <vargaz@gmail.com>
Wed, 1 Mar 2017 23:05:51 +0000 (18:05 -0500)
committerGitHub <noreply@github.com>
Wed, 1 Mar 2017 23:05:51 +0000 (18:05 -0500)
mono/metadata/profiler.c
mono/mini/aot-compiler.c
mono/mini/debug-mini.c
mono/mini/dwarfwriter.c
mono/mini/mini-llvm.c

index a880ec9330068672aeae59a614df7bf7759d6041..5902d17378a1e47726cc60166c258926bb6816c2 100644 (file)
@@ -1147,7 +1147,7 @@ mono_profiler_coverage_get (MonoProfiler *prof, MonoMethod *method, MonoProfileC
                        if (debug_minfo) {
                                MonoDebugSourceLocation *location;
 
-                               location = mono_debug_symfile_lookup_location (debug_minfo, offset);
+                               location = mono_debug_method_lookup_location (debug_minfo, offset);
                                if (location) {
                                        entry.line = location->row;
                                        entry.col = location->column;
index 6d4f50a42388fb4e9641557cf720f6c0756f0c50..947e4e33d6fdbf9770fd1886413e09ac27e0a973 100644 (file)
@@ -5246,11 +5246,11 @@ compute_line_numbers (MonoMethod *method, int code_size, MonoDebugMethodJitInfo
                if (il_offset == -1 || il_offset == prev_il_offset)
                        continue;
                prev_il_offset = il_offset;
-               loc = mono_debug_symfile_lookup_location (minfo, il_offset);
+               loc = mono_debug_method_lookup_location (minfo, il_offset);
                if (!(loc && loc->source_file))
                        continue;
                if (loc->row == prev_line) {
-                       mono_debug_symfile_free_location (loc);
+                       mono_debug_free_source_location (loc);
                        continue;
                }
                prev_line = loc->row;
@@ -5349,7 +5349,7 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
                                options = "";
                        prologue_end = TRUE;
                        fprintf (acfg->fp, ".loc %d %d 0%s\n", findex, loc->row, options);
-                       mono_debug_symfile_free_location (loc);
+                       mono_debug_free_source_location (loc);
                }
 
                skip = FALSE;
index 41e241a33a8bf1a14ee1b64f4f07f5773fac4a0e..68780e5056a42385db381f00e4d43dfd995403cb 100644 (file)
@@ -152,7 +152,7 @@ mono_debug_add_vg_method (MonoMethod *method, MonoDebugMethodJitInfo *jit)
                for (i = 0; i < header->code_size; ++i) {
                        MonoDebugSourceLocation *location;
 
-                       location = mono_debug_symfile_lookup_location (minfo, i);
+                       location = mono_debug_method_lookup_location (minfo, i);
                        if (!location)
                                continue;
 
index 40960cc4b847a6b3d78780ffab99c33ef8b448dc..5aacab1c440f8bba6cfbc9313530ab57db01ef41 100644 (file)
@@ -21,7 +21,6 @@
 #endif
 
 #include <mono/metadata/mono-endian.h>
-#include <mono/metadata/debug-mono-symfile.h>
 #include <mono/metadata/mono-debug-debugger.h>
 
 #ifndef HOST_WIN32
@@ -1581,11 +1580,11 @@ emit_line_number_info (MonoDwarfWriter *w, MonoMethod *method,
 
                prev_il_offset = il_offset;
 
-               loc = mono_debug_symfile_lookup_location (minfo, il_offset);
+               loc = mono_debug_method_lookup_location (minfo, il_offset);
                if (!loc)
                        continue;
                if (!loc->source_file) {
-                       mono_debug_symfile_free_location (loc);
+                       mono_debug_free_source_location (loc);
                        continue;
                }
 
@@ -1633,7 +1632,7 @@ emit_line_number_info (MonoDwarfWriter *w, MonoMethod *method,
                        prev_native_offset = i;
                }
 
-               mono_debug_symfile_free_location (loc);
+               mono_debug_free_source_location (loc);
                first = FALSE;
        }
 
@@ -1797,7 +1796,7 @@ mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod
 
        minfo = mono_debug_lookup_method (method);
        if (minfo)
-               loc = mono_debug_symfile_lookup_location (minfo, 0);
+               loc = mono_debug_method_lookup_location (minfo, 0);
 
        /* Subprogram */
        names = g_new0 (char *, sig->param_count);
@@ -1818,7 +1817,7 @@ mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod
                emit_uleb128 (w, file_index + 1);
                emit_uleb128 (w, loc->row);
 
-               mono_debug_symfile_free_location (loc);
+               mono_debug_free_source_location (loc);
                loc = NULL;
        } else {
                emit_uleb128 (w, 0);
index 745c29f13e48c77af959d7d831544421eda14bcf..46ddd5085bb8b100760c3482d21b637ded685a06 100644 (file)
@@ -9116,7 +9116,7 @@ emit_dbg_loc (EmitContext *ctx, LLVMBuilderRef builder, const unsigned char *cil
                MonoDebugSourceLocation *loc;
                LLVMValueRef loc_md;
 
-               loc = mono_debug_symfile_lookup_location (ctx->minfo, cil_code - cfg->header->code);
+               loc = mono_debug_method_lookup_location (ctx->minfo, cil_code - cfg->header->code);
 
                if (loc) {
 #if LLVM_API_VERSION > 100
@@ -9134,7 +9134,7 @@ emit_dbg_loc (EmitContext *ctx, LLVMBuilderRef builder, const unsigned char *cil
                        loc_md = LLVMMDNode (md_args, nmd_args);
                        LLVMSetCurrentDebugLocation (builder, loc_md);
 #endif
-                       mono_debug_symfile_free_location (loc);
+                       mono_debug_free_source_location (loc);
                }
        }
 }