* Fixing single step inside Exception on Android...
The method is null because on ss_create_init_args the IL is -1 when calling method Mono_UnhandledException_internal what I think it's expected, because of that I ignore the single step on android if there is no method. (debugger-engine.c)
After that the sequence point cannot be found because it's calling a method of class DynamicMethodNameCounter what I think it's expected, because of that I remove the assert on android. (debugger-agent.c)
Fixes mono/mono#14772
* Changing comment to make it clear...
Commit migrated from https://github.com/mono/mono/commit/
1046dd746f3f99e97f034a2c2b51bdb4e19128ae
found_sp = mono_find_prev_seq_point_for_native_offset (frame->de.domain, frame->de.method, frame->de.native_offset, &info, &args->sp);
if (!found_sp)
no_seq_points_found (frame->de.method, frame->de.native_offset);
- g_assert (found_sp);
- method = frame->de.method;
+#if !defined(HOST_ANDROID) && !defined(TARGET_ANDROID)
+ g_assert (found_sp);
+#else
+ if (found_sp) //it will not find the sp if it is a method of class Android.Runtime.DynamicMethodNameCounter
+#endif
+ method = frame->de.method;
}
}
}
int nframes = ss_args->nframes;
SeqPoint *sp = &ss_args->sp;
+#if defined(HOST_ANDROID) || defined(TARGET_ANDROID)
+ /* this can happen on a single step in a exception on android (Mono_UnhandledException_internal) */
+ if (!method)
+ return;
+#endif
+
/*
* Implement single stepping using breakpoints if possible.
*/