Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / metadata / debug-mono-ppdb.c
index 776a4187ff0fec862966d123eac5534f70bb5307..3ad5235610a05a02fff9f0ff3282548d6fe13715 100644 (file)
@@ -284,13 +284,12 @@ get_docname (MonoPPDBFile *ppdb, MonoImage *image, int docidx)
 
 /**
  * mono_ppdb_lookup_location:
- * @minfo: A `MonoDebugMethodInfo' which can be retrieved by
- *         mono_debug_lookup_method().
- * @offset: IL offset within the corresponding method's CIL code.
+ * \param minfo A \c MonoDebugMethodInfo which can be retrieved by mono_debug_lookup_method().
+ * \param offset IL offset within the corresponding method's CIL code.
  *
  * This function is similar to mono_debug_lookup_location(), but we
  * already looked up the method and also already did the
- * `native address -> IL offset' mapping.
+ * native address -> IL offset mapping.
  */
 MonoDebugSourceLocation *
 mono_ppdb_lookup_location (MonoDebugMethodInfo *minfo, uint32_t offset)
@@ -435,6 +434,9 @@ mono_ppdb_get_seq_points (MonoDebugMethodInfo *minfo, char **source_file, GPtrAr
        if (sfiles)
                g_ptr_array_add (sfiles, docinfo);
 
+       if (source_file)
+               *source_file = g_strdup (docinfo->source_file);
+
        iloffset = 0;
        start_line = 0;
        start_col = 0;
@@ -492,8 +494,6 @@ mono_ppdb_get_seq_points (MonoDebugMethodInfo *minfo, char **source_file, GPtrAr
                memcpy (*seq_points, sps->data, sps->len * sizeof (MonoSymSeqPoint));
        }
 
-       if (source_file)
-               *source_file = g_strdup (((MonoDebugSourceInfo*)g_ptr_array_index (sfiles, 0))->source_file);
        if (source_files) {
                *source_files = g_new (int, sps->len);
                for (i = 0; i < sps->len; ++i)