Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2015-04-09 21:35:48 +0300
committerZoltan Varga <vargaz@gmail.com>2015-05-06 22:03:37 +0300
commit88674ce9635dd994fc33d8d044c42eedab57c98b (patch)
treea3499693e6f8c320bab8cd898a9f47de053f8b33
parente28071072213c8a366e71370b3424e8e197a319c (diff)
[sdb] Transition from step over to step into when control leaves managed code. Fixes #28557.
-rw-r--r--mono/mini/debugger-agent.c12
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) {