summaryrefslogtreecommitdiff
path: root/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs')
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs77
1 files changed, 75 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 7cf688c0d2..e1d912ec4e 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
@@ -132,6 +132,13 @@ public struct GStruct<T> {
}
}
+public struct NestedStruct {
+ NestedInner nested1, nested2;
+}
+
+public struct NestedInner {
+}
+
interface ITest
{
void Foo ();
@@ -202,6 +209,7 @@ public class Tests : TestsBase, ITest2
[ThreadStatic]
public static int tls_i;
public static bool is_attached = Debugger.IsAttached;
+ public NestedStruct nested_struct;
#pragma warning restore 0414
@@ -349,7 +357,10 @@ public class Tests : TestsBase, ITest2
} catch {
}
ss7 ();
+ ss_nested ();
ss_regress_654694 ();
+ ss_step_through ();
+ ss_recursive (1);
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
@@ -424,6 +435,57 @@ public class Tests : TestsBase, ITest2
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss_nested () {
+ ss_nested_1 (ss_nested_2 ());
+ ss_nested_1 (ss_nested_2 ());
+ ss_nested_3 ();
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss_nested_1 (int i) {
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static int ss_nested_2 () {
+ return 0;
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss_nested_3 () {
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss_step_through () {
+ step_through_1 ();
+ StepThroughClass.step_through_2 ();
+ step_through_3 ();
+ }
+
+ [DebuggerStepThrough]
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void step_through_1 () {
+ }
+
+ [DebuggerStepThrough]
+ class StepThroughClass {
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void step_through_2 () {
+ }
+ }
+
+ [DebuggerStepThrough]
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void step_through_3 () {
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss_recursive (int n) {
+ if (n == 10)
+ return;
+ ss_recursive (n + 1);
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
public static bool is_even (int i) {
return i % 2 == 0;
}
@@ -535,8 +597,9 @@ public class Tests : TestsBase, ITest2
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void locals () {
string s = null;
+ var astruct = new AStruct () { i = 42 };
locals1 (null);
- locals2<string> (null, 5, "ABC", ref s);
+ locals2<string> (null, 5, "ABC", ref s, ref astruct);
locals3 ();
locals6 ();
locals7<int> (22);
@@ -562,7 +625,7 @@ public class Tests : TestsBase, ITest2
#if NET_4_5
[StateMachine (typeof (int))]
#endif
- public static void locals2<T> (string[] args, int arg, T t, ref string rs) {
+ public static void locals2<T> (string[] args, int arg, T t, ref string rs, ref AStruct astruct) {
long i = 42;
string s = "AB";
@@ -571,6 +634,7 @@ public class Tests : TestsBase, ITest2
i ++;
if (t != null)
i ++;
+ astruct = new AStruct ();
}
rs = "A";
}
@@ -840,6 +904,15 @@ public class Tests : TestsBase, ITest2
throw new OverflowException ();
} catch (Exception) {
}
+ // no subclasses
+ try {
+ throw new OverflowException ();
+ } catch (Exception) {
+ }
+ try {
+ throw new Exception ();
+ } catch (Exception) {
+ }
object o = null;
try {