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:
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs')
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs30
1 files changed, 29 insertions, 1 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
index 6cfa088437f..400b43ce34f 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
@@ -13,7 +13,6 @@ using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
-using System.Threading.Tasks;
using MonoTests.Helpers;
public class TestsBase
@@ -319,6 +318,10 @@ public class Tests : TestsBase, ITest2
threadpool_io ();
return 0;
}
+ if (args.Length > 0 && args [0] == "attach") {
+ new Tests ().attach ();
+ return 0;
+ }
assembly_load ();
breakpoints ();
single_stepping ();
@@ -1688,6 +1691,26 @@ public class Tests : TestsBase, ITest2
streamOut.Close ();
var bsIn = t.Result;
}
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public void attach_break () {
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public void attach () {
+ AppDomain domain = AppDomain.CreateDomain ("domain");
+
+ CrossDomain o = (CrossDomain)domain.CreateInstanceAndUnwrap (
+ typeof (CrossDomain).Assembly.FullName, "CrossDomain");
+ o.assembly_load ();
+ o.type_load ();
+
+ // Wait for the client to attach
+ while (true) {
+ Thread.Sleep (200);
+ attach_break ();
+ }
+ }
}
public class SentinelClass : MarshalByRefObject {
@@ -1712,6 +1735,11 @@ public class CrossDomain : MarshalByRefObject
public void assembly_load () {
Tests.assembly_load_in_domain ();
}
+
+ public void type_load () {
+ //Activator.CreateInstance (typeof (int).Assembly.GetType ("Microsoft.Win32.RegistryOptions"));
+ var is_server = System.Runtime.GCSettings.IsServerGC;
+ }
}
public class Foo