You've already forked linux-packaging-mono
Imported Upstream version 5.8.0.22
Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
parent
5f4a27cc8a
commit
7d05485754
@@ -5,7 +5,8 @@ LIBRARY = Mono.Debugger.Soft.dll
|
||||
LIBRARY_SNK = ../mono.snk
|
||||
|
||||
LIB_REFS = System Mono.Cecil System.Core
|
||||
LIB_MCS_FLAGS = /unsafe -D:MONO_DATACONVERTER_STATIC_METHODS -keyfile:$(LIBRARY_SNK) /publicsign
|
||||
LIB_MCS_FLAGS = /unsafe -D:MONO_DATACONVERTER_STATIC_METHODS /publicsign
|
||||
KEYFILE = $(LIBRARY_SNK)
|
||||
|
||||
TEST_MCS_FLAGS =
|
||||
TEST_LIB_REFS = Mono.Cecil System System.Core
|
||||
|
||||
@@ -2214,7 +2214,7 @@ namespace Mono.Debugger.Soft
|
||||
internal ValueImpl[] Type_GetValues (long id, long[] fields, long thread_id) {
|
||||
int len = fields.Length;
|
||||
PacketReader r;
|
||||
if (thread_id != 0)
|
||||
if (thread_id != 0 && Version.AtLeast(2, 3))
|
||||
r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES_2, new PacketWriter ().WriteId (id).WriteId (thread_id).WriteInt (len).WriteIds (fields));
|
||||
else
|
||||
r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (len).WriteIds (fields));
|
||||
|
||||
@@ -30,6 +30,11 @@ namespace Mono.Debugger.Soft
|
||||
if (args != null && args.Length != 0)
|
||||
throw new NotSupportedException ();
|
||||
|
||||
//If method is virtual we can't optimize(execute IL) because it's maybe
|
||||
//overriden... call runtime to invoke overriden version...
|
||||
if (method.IsVirtual)
|
||||
throw new NotSupportedException ();
|
||||
|
||||
if (method.IsStatic || method.DeclaringType.IsValueType || this_val == null || !(this_val is ObjectMirror))
|
||||
throw new NotSupportedException ();
|
||||
|
||||
@@ -350,6 +355,12 @@ namespace Mono.Debugger.Soft
|
||||
} catch {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
} else if (method.ReturnType.IsEnum && primitive != null) {
|
||||
try {
|
||||
res = method.VirtualMachine.CreateEnumMirror (method.ReturnType, primitive);
|
||||
} catch {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Mono.Debugger.Soft
|
||||
sb.Append (ReturnType.Name);
|
||||
sb.Append (' ');
|
||||
if (type_namespace != String.Empty)
|
||||
sb.Append (type_namespace + ".");
|
||||
sb.Append (type_namespace).Append (".");
|
||||
sb.Append(type_name);
|
||||
sb.Append(":");
|
||||
sb.Append(Name);
|
||||
|
||||
@@ -102,6 +102,18 @@ namespace Mono.Debugger.Soft
|
||||
}
|
||||
}
|
||||
|
||||
public int EndLineNumber {
|
||||
get {
|
||||
return Location.EndLineNumber;
|
||||
}
|
||||
}
|
||||
|
||||
public int EndColumnNumber {
|
||||
get {
|
||||
return Location.EndColumnNumber;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsDebuggerInvoke {
|
||||
get {
|
||||
return (flags & StackFrameFlags.DEBUGGER_INVOKE) != 0;
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace Mono.Debugger.Soft
|
||||
ManualResetEvent fetchingEvent = new ManualResetEvent (false);
|
||||
ThreadInfo info;
|
||||
StackFrame[] frames;
|
||||
bool threadStateInvalid = true;
|
||||
ThreadState threadState;
|
||||
|
||||
internal ThreadMirror (VirtualMachine vm, long id) : base (vm, id) {
|
||||
}
|
||||
@@ -30,6 +32,7 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
internal void InvalidateFrames () {
|
||||
cacheInvalid = true;
|
||||
threadStateInvalid = true;
|
||||
}
|
||||
|
||||
internal void FetchFrames (bool mustFetch = false) {
|
||||
@@ -91,7 +94,11 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
public ThreadState ThreadState {
|
||||
get {
|
||||
return (ThreadState)vm.conn.Thread_GetState (id);
|
||||
if (threadStateInvalid) {
|
||||
threadState = (ThreadState) vm.conn.Thread_GetState (id);
|
||||
threadStateInvalid = false;
|
||||
}
|
||||
return threadState;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -665,7 +665,7 @@ namespace Mono.Debugger.Soft
|
||||
return res;
|
||||
}
|
||||
|
||||
internal ValueImpl EncodeValue (Value v) {
|
||||
internal ValueImpl EncodeValue (Value v, List<Value> duplicates = null) {
|
||||
if (v is PrimitiveValue) {
|
||||
object val = (v as PrimitiveValue).Value;
|
||||
if (val == null)
|
||||
@@ -675,16 +675,22 @@ namespace Mono.Debugger.Soft
|
||||
} else if (v is ObjectMirror) {
|
||||
return new ValueImpl { Type = ElementType.Object, Objid = (v as ObjectMirror).Id };
|
||||
} else if (v is StructMirror) {
|
||||
return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields) };
|
||||
if (duplicates == null)
|
||||
duplicates = new List<Value> ();
|
||||
if (duplicates.Contains (v))
|
||||
return new ValueImpl { Type = (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL, Objid = 0 };
|
||||
duplicates.Add (v);
|
||||
|
||||
return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields, duplicates) };
|
||||
} else {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal ValueImpl[] EncodeValues (IList<Value> values) {
|
||||
internal ValueImpl[] EncodeValues (IList<Value> values, List<Value> duplicates = null) {
|
||||
ValueImpl[] res = new ValueImpl [values.Count];
|
||||
for (int i = 0; i < values.Count; ++i)
|
||||
res [i] = EncodeValue (values [i]);
|
||||
res [i] = EncodeValue (values [i], duplicates);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -724,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;
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Text;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
@@ -95,6 +96,12 @@ namespace Mono.Debugger.Soft
|
||||
info.FileName = "valgrind";
|
||||
info.UseShellExecute = false;
|
||||
|
||||
if (info.RedirectStandardError)
|
||||
info.StandardErrorEncoding = Encoding.UTF8;
|
||||
|
||||
if (info.RedirectStandardOutput)
|
||||
info.StandardOutputEncoding = Encoding.UTF8;
|
||||
|
||||
ITargetProcess p;
|
||||
if (options != null && options.CustomProcessLauncher != null)
|
||||
p = new ProcessWrapper (options.CustomProcessLauncher (info));
|
||||
|
||||
@@ -1165,10 +1165,18 @@ public class Tests : TestsBase, ITest2
|
||||
return 42;
|
||||
}
|
||||
|
||||
public int invoke_pass_nullable (int? i) {
|
||||
return (int)i;
|
||||
}
|
||||
|
||||
public int? invoke_return_nullable_null () {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int invoke_pass_nullable_null (int? i) {
|
||||
return i.HasValue ? 1 : 2;
|
||||
}
|
||||
|
||||
public void invoke_type_load () {
|
||||
new Class3 ();
|
||||
}
|
||||
|
||||
@@ -34,9 +34,11 @@
|
||||
|
||||
leave end
|
||||
} filter {
|
||||
castclass [mscorlib]System.Exception
|
||||
call int32 class ExceptionFilterTest::Filter([mscorlib]System.Exception)
|
||||
endfilter
|
||||
} {
|
||||
castclass [mscorlib]System.Exception
|
||||
call void class ExceptionFilterTest::Handler([mscorlib]System.Exception)
|
||||
leave end
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
631b5985db1ff7129d11b1443984be1b7c2fabcb
|
||||
94316e7e9644e47a94a5d9b28932a0377d822191
|
||||
Reference in New Issue
Block a user