* Doing the same fix from Android to IOS.
* On mini-exceptions.c check if there is no ji we can continue and generate the exception without checking wrapper_type.
Fixes mono/mono#16824
Commit migrated from https://github.com/mono/mono/commit/
1a277c31a095a1b5b8212ed6c0425fad7bb4a42b
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) */
+ /* this can happen on a single step in a exception on android (Mono_UnhandledException_internal) and on IOS */
if (!method)
return;
-#endif
/*
* Implement single stepping using breakpoints if possible.
if (unhandled)
mini_get_dbg_callbacks ()->handle_exception ((MonoException *)obj, ctx, NULL, NULL);
- else if (jinfo_get_method (ji)->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE) {
+ else if (!ji || (jinfo_get_method (ji)->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE)) {
mini_get_dbg_callbacks ()->handle_exception ((MonoException *)obj, ctx, NULL, NULL);
mini_get_dbg_callbacks ()->handle_exception ((MonoException *)obj, ctx, &ctx_cp, &catch_frame);
}