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:
authorDavid Karlaš <david.karlas@xamarin.com>2017-06-16 10:46:36 +0300
committerDavid Karlaš <david.karlas@xamarin.com>2017-06-16 10:46:57 +0300
commit5a0573df998cf6ad6a263fe5c3bf8297bfd1cca8 (patch)
tree41e034e52d16f14875b019e7c68b293098103e1d /mcs/class/Mono.Debugger.Soft
parentc329548380f72280e46526f9161e45961a3ff60f (diff)
Fixed Mono.Debugger.Soft unit tests and added new `new String('a', 3);` unit test after `return;`
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft')
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs1
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs7
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest.cs11
3 files changed, 17 insertions, 2 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
index 40b7d631556..1eaaac8ec9d 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
@@ -730,6 +730,7 @@ namespace Mono.Debugger.Soft
l.Add (new ThreadStartEvent (vm, req_id, id));
break;
case EventType.ThreadDeath:
+ vm.GetThread (id).InvalidateFrames ();
vm.InvalidateThreadCache ();
l.Add (new ThreadDeathEvent (vm, req_id, id));
break;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
index 141913a228c..27a4e0e55f0 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
@@ -96,8 +96,11 @@ namespace Mono.Debugger.Soft
info.FileName = "valgrind";
info.UseShellExecute = false;
- info.StandardErrorEncoding = Encoding.UTF8;
- info.StandardOutputEncoding = Encoding.UTF8;
+ if (info.RedirectStandardError)
+ info.StandardErrorEncoding = Encoding.UTF8;
+
+ if (info.RedirectStandardOutput)
+ info.StandardOutputEncoding = Encoding.UTF8;
ITargetProcess p;
if (options != null && options.CustomProcessLauncher != null)
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
index 5f80228fe2f..8d22ac808b2 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
@@ -2642,6 +2642,17 @@ public class DebuggerTests
return;
+ // string constructor
+ var stringType = vm.RootDomain.Corlib.GetType ("System.String");
+ var stringConstructor = stringType.GetMethods ().Single (c=>
+ c.Name == ".ctor" &&
+ c.GetParameters ().Length == 2 &&
+ c.GetParameters ()[0].ParameterType.Name == "Char" &&
+ c.GetParameters ()[1].ParameterType.Name == "Int32");
+ var str = stringType.NewInstance (e.Thread, stringConstructor, new Value [] { vm.CreateValue ('a'), vm.CreateValue (3)});
+
+ AssertValue("aaa", str);
+
// pass primitive
m = t.GetMethod ("invoke_pass_primitive");
Value[] args = new Value [] {