diff options
author | Zoltan Varga <vargaz@gmail.com> | 2016-01-26 23:06:35 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2016-01-26 23:06:40 +0300 |
commit | a3c7b1967934a623a416ef24d526d816dd46e248 (patch) | |
tree | 9cc69aca820711440f31e423f1129305b59f0ac5 | |
parent | e978bcdc36332dbe9503a60a80cac9e936c2d38f (diff) |
[runtime] Fix the computation of StackFrame.native_offset for managed-to-native wrappers.
-rw-r--r-- | mono/mini/mini-exceptions.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c index 781aa4b4b08..797a9fd1484 100644 --- a/mono/mini/mini-exceptions.c +++ b/mono/mini/mini-exceptions.c @@ -447,16 +447,17 @@ mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls, const char *real_ip, *start; start = (const char *)ji->code_start; - if (!frame->managed) + if (frame->type == FRAME_TYPE_MANAGED) + real_ip = (const char*)ip; + else /* ctx->ip points into native code */ real_ip = (const char*)MONO_CONTEXT_GET_IP (new_ctx); - else - real_ip = (const char*)ip; if ((real_ip >= start) && (real_ip <= start + ji->code_size)) frame->native_offset = real_ip - start; - else + else { frame->native_offset = -1; + } if (trace) *trace = mono_debug_print_stack_frame (method, frame->native_offset, domain); |