Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix xamarin-android 6161
  • Loading branch information
thaystg authored and github-actions committed Aug 19, 2021
commit 704c3c7212f02252a63c14f43857fc7fa77eb575
10 changes: 5 additions & 5 deletions src/mono/mono/component/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -8572,7 +8572,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
return ERR_INVALID_ARGUMENT;
}

locals = mono_debug_lookup_locals (method, FALSE);
locals = mono_debug_lookup_locals (method);
if (!locals) {
if (CHECK_PROTOCOL_VERSION (2, 43)) {
/* Scopes */
Expand Down Expand Up @@ -9291,8 +9291,8 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
} else {
MonoDebugLocalsInfo *locals;

locals = mono_debug_lookup_locals (frame->de.method, TRUE);
if (locals) {
locals = mono_debug_lookup_locals (frame->de.method);
if (locals && CHECK_ICORDBG (FALSE)) { //on icordbg the index value is correct, we don't need to fix it.
g_assert (pos < locals->num_locals);
pos = locals->locals [pos].index;
mono_debug_free_locals (locals);
Expand Down Expand Up @@ -9345,8 +9345,8 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
} else {
MonoDebugLocalsInfo *locals;

locals = mono_debug_lookup_locals (frame->de.method, TRUE);
if (locals) {
locals = mono_debug_lookup_locals (frame->de.method);
if (locals && CHECK_ICORDBG (FALSE)) {
g_assert (pos < locals->num_locals);
pos = locals->locals [pos].index;
mono_debug_free_locals (locals);
Expand Down
22 changes: 10 additions & 12 deletions src/mono/mono/metadata/mono-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ mono_debug_method_lookup_location (MonoDebugMethodInfo *minfo, int il_offset)
* The result should be freed using mono_debug_free_locals ().
*/
MonoDebugLocalsInfo*
mono_debug_lookup_locals (MonoMethod *method, mono_bool ignore_pdb)
mono_debug_lookup_locals (MonoMethod *method)
{
MonoDebugMethodInfo *minfo;
MonoDebugLocalsInfo *res;
Expand All @@ -893,18 +893,16 @@ mono_debug_lookup_locals (MonoMethod *method, mono_bool ignore_pdb)
return NULL;
}

if (ignore_pdb)
res = mono_debug_symfile_lookup_locals (minfo);
else {
if (minfo->handle->ppdb) {
res = mono_ppdb_lookup_locals (minfo);
} else {
if (!minfo->handle->symfile || !mono_debug_symfile_is_loaded (minfo->handle->symfile))
res = NULL;
else
res = mono_debug_symfile_lookup_locals (minfo);
}

if (minfo->handle->ppdb) {
res = mono_ppdb_lookup_locals (minfo);
} else {
if (!minfo->handle->symfile || !mono_debug_symfile_is_loaded (minfo->handle->symfile))
res = NULL;
else
res = mono_debug_symfile_lookup_locals (minfo);
}

mono_debugger_unlock ();

return res;
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/mono-debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ MONO_API void
mono_debug_add_delegate_trampoline (void* code, int size);

MONO_API MonoDebugLocalsInfo*
mono_debug_lookup_locals (MonoMethod *method, mono_bool ignore_pdb);
mono_debug_lookup_locals (MonoMethod *method);

MONO_API MonoDebugMethodAsyncInfo*
mono_debug_lookup_method_async_debug_info (MonoMethod *method);
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/dwarfwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1899,7 +1899,7 @@ mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod
g_free (names);

/* Locals */
locals_info = mono_debug_lookup_locals (method, FALSE);
locals_info = mono_debug_lookup_locals (method);

for (i = 0; i < header->num_locals; ++i) {
MonoInst *ins = locals [i];
Expand Down