Skip to content

Commit

Permalink
[debugger] Reverting part of this commit mono#12114, removing this pa…
Browse files Browse the repository at this point in the history
…rt the test ShouldCorrectlyStepOverOnExitFromArgsAfterStepInMethodParameter continues working and solve the regressions of 12881.

Inserted a new test that reproduces the regression.
Fixes mono#12881
  • Loading branch information
thaystg committed Feb 12, 2019
1 parent e160257 commit 35561a1
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
17 changes: 17 additions & 0 deletions mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
Expand Up @@ -489,9 +489,26 @@ public static void wait_one ()
elapsed_time();
field_with_unsafe_cast_value();
inspect_enumerator_in_generic_struct();
if_property_stepping();
return 3;
}

private class TestClass {
private string oneLineProperty = "";
public string OneLineProperty
{
get { return oneLineProperty; }/*3722cad3-7da1-4c86-a398-bb2cf6cc65a9*/
set { oneLineProperty = value; }
}
}

public static void if_property_stepping() {
var test = new TestClass();
if (test.OneLineProperty == "someInvalidValue6049e709-7271-41a1-bc0a-f1f1b80d4125")
return;
Console.Write("");
}

public static void local_reflect () {
//Breakpoint line below, and reflect someField via ObjectMirror;
LocalReflectClass.RunMe ();
Expand Down
19 changes: 19 additions & 0 deletions mcs/class/Mono.Debugger.Soft/Test/dtest.cs
Expand Up @@ -4828,5 +4828,24 @@ public void Bug59649 ()
AssertValue ("abc", variable);

}
[Test]
public void IfPropertyStepping ()
{
Event e = run_until ("if_property_stepping");
var req = create_step (e);
req.Enable ();
e = step_once ();
e = step_over ();
e = step_into ();
e = step_into ();
e = step_into ();
e = step_into ();
e = step_into ();
e = step_into ();
e = step_into ();
e = step_into ();
e = step_into ();
assert_location(e, "op_Equality");
}
} // class DebuggerTests
} // namespace
2 changes: 1 addition & 1 deletion mono/mini/debugger-engine.c
Expand Up @@ -954,7 +954,7 @@ mono_de_ss_update (SingleStepReq *req, MonoJitInfo *ji, SeqPoint *sp, void *tls,
}
}

if (req->depth == STEP_DEPTH_INTO && req->size == STEP_SIZE_MIN && (sp->flags & MONO_SEQ_POINT_FLAG_NONEMPTY_STACK) && !(sp->flags & MONO_SEQ_POINT_FLAG_NESTED_CALL) && req->start_method) {
if (req->depth == STEP_DEPTH_INTO && req->size == STEP_SIZE_MIN && (sp->flags & MONO_SEQ_POINT_FLAG_NONEMPTY_STACK) && req->start_method) {
int nframes;
rt_callbacks.ss_calculate_framecount (tls, ctx, FALSE, NULL, &nframes);
if (req->start_method == method && req->nframes && nframes == req->nframes) { //Check also frame count(could be recursion)
Expand Down

0 comments on commit 35561a1

Please sign in to comment.