提交 50705bd2 编写于 作者: A Adriano Carlos Verona

do not try to find manage frames when stepping out from either, last managed...

do not try to find manage frames when stepping out from either, last managed frame or frame in between managed/native ones (fix case #573949)
上级 75f15810
......@@ -4295,6 +4295,24 @@ ss_start (SingleStepReq *ss_req, MonoMethod *method, SeqPoint *sp, MonoSeqPointI
}
}
static gboolean
is_parentframe_managed(DebuggerTlsData* tls)
{
// if we have 0 frames, that should never happen anyway.
// if we have 1 frame, our parent is defenitely native.
if (tls->frame_count < 2)
return FALSE;
//if we have at least two frames, the parent could be native. if it is, then the tls->invoke_addr,
//which is the value of the stackpointer when the last mono_runtime_invoke was done, should be "more pushed"
//on the stack than the stackpointer of the candidate parent frame.
if (tls->invoke_addr <= MONO_CONTEXT_GET_SP(&tls->frames[1]->ctx))
return FALSE;
return TRUE;
}
/*
* Start single stepping of thread THREAD
*/
......@@ -4341,6 +4359,12 @@ ss_create (MonoInternalThread *thread, StepSize size, StepDepth depth, EventRequ
g_assert (tls->frame_count);
frame = tls->frames [0];
if (ss_req->depth == STEP_DEPTH_OUT && !is_parentframe_managed(tls))
{
ss_destroy(ss_req);
return ERR_NO_INVOCATION;
}
ss_req->last_method = frame->method;
ss_req->last_line = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册