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
path: root/mcs
diff options
context:
space:
mode:
authorAlexander Kyte <alexmkyte@gmail.com>2018-01-22 23:55:12 +0300
committerLudovic Henry <luhenry@microsoft.com>2018-01-22 23:55:12 +0300
commit3363ec9cc4160bba07339d5c5337011a793652bd (patch)
tree276603f547bee4063de47341ac6950b5dc3d27d0 /mcs
parent51e1e5af325baa566bd6b65dd045e461eb1cef7c (diff)
[runtime] Apply cctor filters to callees of cctors (#6562)
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs24
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest.cs27
2 files changed, 49 insertions, 2 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
index d65463f5a6a..743047ef3f1 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
@@ -357,6 +357,7 @@ public class Tests : TestsBase, ITest2
if (args.Length > 0 && args [0] == "invoke-abort")
new Tests ().invoke_abort ();
new Tests ().evaluate_method ();
+ Bug59649 ();
return 3;
}
@@ -1736,6 +1737,11 @@ public class Tests : TestsBase, ITest2
attach_break ();
}
}
+
+ public static void Bug59649 ()
+ {
+ UninitializedClass.Call();//Breakpoint here and step in
+ }
}
public class SentinelClass : MarshalByRefObject {
@@ -1814,5 +1820,23 @@ public class LineNumbers
}
}
+class UninitializedClass
+{
+ static string DummyCall()
+ {
+ //Should NOT step into this method
+ //if StepFilter.StaticCtor is set
+ //because this is part of static class initilization
+ return String.Empty;
+ }
+
+ static string staticField = DummyCall();
+
+ public static void Call()
+ {
+ //Should step into this method
+ //Console.WriteLine ("Call called");
+ }
+}
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
index 2e196c8a965..78be9f85a2d 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
@@ -4388,6 +4388,29 @@ public class DebuggerTests
}
}
-}
+ [Test]
+ public void Bug59649 ()
+ {
+ Event e = run_until ("Bug59649");
-}
+ var req = create_step (e);
+ req.Filter = StepFilter.StaticCtor;
+ req.Enable ();
+
+ // Approach call instruction
+ e = step_once ();
+ //StackTraceDump (e);
+
+ // Follow call
+ e = step_into ();
+ //StackTraceDump (e);
+
+ e = step_into ();
+ //StackTraceDump (e);
+
+ // Is cctor in this bug, ends up in the static field constructor
+ // DummyCall
+ assert_location (e, "Call");
+ }
+} // class DebuggerTests
+} // namespace