diff options
author | Zoltan Varga <vargaz@gmail.com> | 2015-04-09 21:35:48 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2015-05-06 22:03:37 +0300 |
commit | 88674ce9635dd994fc33d8d044c42eedab57c98b (patch) | |
tree | a3499693e6f8c320bab8cd898a9f47de053f8b33 | |
parent | e28071072213c8a366e71370b3424e8e197a319c (diff) |
[sdb] Transition from step over to step into when control leaves managed code. Fixes #28557.
-rw-r--r-- | mono/mini/debugger-agent.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c index 9573009003c..bfa2ae3f3f1 100644 --- a/mono/mini/debugger-agent.c +++ b/mono/mini/debugger-agent.c @@ -5310,6 +5310,18 @@ ss_start (SingleStepReq *ss_req, MonoMethod *method, SeqPoint* sp, MonoSeqPointI if (ss_req->nframes == 0) ss_req->nframes = nframes; + + if ((ss_req->depth == STEP_DEPTH_OVER) && (!sp && !parent_sp)) { + DEBUG_PRINTF (1, "[dbg] No parent frame for step over, transition to step into.\n"); + /* + * This is needed since if we leave managed code, and later return to it, step over + * is not going to stop. + * This approach is a bit ugly, since we change the step depth, but it only affects + * clients who reuse the same step request, and only in this special case. + */ + ss_req->depth = STEP_DEPTH_INTO; + } + if (ss_req->depth == STEP_DEPTH_OVER) { /* Need to stop in catch clauses as well */ for (i = 0; i < nframes; ++i) { |