Skip to content

Commit

Permalink
[debugger] Fix debugging after hot reloading (#55599)
Browse files Browse the repository at this point in the history
* Fix deug after hotreload.

* do not change mono.proj

* fix formatting.

* Remove extra space.
  • Loading branch information
thaystg authored Jul 14, 2021
1 parent 21e36e8 commit 559011c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/mono/mono/metadata/mono-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,8 +1120,12 @@ mono_debug_get_seq_points (MonoDebugMethodInfo *minfo, char **source_file, GPtrA
if (img->has_updates) {
int idx = mono_metadata_token_index (minfo->method->token);
gpointer ptr = mono_metadata_update_get_updated_method_ppdb (img, idx);
mono_ppdb_get_seq_points_enc (ptr, seq_points, n_seq_points);
} else if (minfo->handle->ppdb)
if (ptr != NULL) {
mono_ppdb_get_seq_points_enc (ptr, seq_points, n_seq_points);
return;
}
}
if (minfo->handle->ppdb)
mono_ppdb_get_seq_points (minfo, source_file, source_file_list, source_files, seq_points, n_seq_points);
else
mono_debug_symfile_get_seq_points (minfo, source_file, source_file_list, source_files, seq_points, n_seq_points);
Expand Down
5 changes: 4 additions & 1 deletion src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -9757,7 +9757,10 @@ mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context, Mon

MonoJitMemoryManager *jit_mm = get_default_jit_mm ();
jit_mm_lock (jit_mm);
g_hash_table_replace (jit_mm->seq_points, imethod->method, imethod->jinfo->seq_points);
gpointer seq_points = g_hash_table_lookup (jit_mm->seq_points, imethod->method);
if (!seq_points || seq_points != imethod->jinfo->seq_points)
g_hash_table_replace (jit_mm->seq_points, imethod->method, imethod->jinfo->seq_points);

jit_mm_unlock (jit_mm);

// FIXME: Add a different callback ?
Expand Down

0 comments on commit 559011c

Please sign in to comment.