Imported Upstream version 6.4.0.137

Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-07-26 19:53:28 +00:00
parent e9207cf623
commit ef583813eb
2712 changed files with 74169 additions and 40587 deletions

View File

@@ -10,17 +10,14 @@ KEYFILE = $(LIBRARY_SNK)
TEST_LIB_REFS = Mono.Cecil System System.Core
VALID_TEST_PROFILE := $(filter net_4_x, $(PROFILE))
ifdef VALID_TEST_PROFILE
ifneq ($(filter monodroid monotouch monotouch_tv monotouch_watch wasm net_4_x,$(PROFILE)),)
test-local: build-dtest
endif
else
ifneq ($(filter monodroid monotouch monotouch_tv monotouch_watch wasm,$(PROFILE)),)
NO_INSTALL=1
NO_BUILD=1
NO_TEST=1
check:
endif
test_output_dir=$(topdir)/class/lib/$(PROFILE)/tests

View File

@@ -21,6 +21,7 @@ namespace Mono.Debugger.Soft
byte[] metadata_blob;
bool? isDynamic;
byte[] pdb_blob;
bool? has_debug_info;
Dictionary<string, long> typeCacheIgnoreCase = new Dictionary<string, long> (StringComparer.InvariantCultureIgnoreCase);
Dictionary<string, long> typeCache = new Dictionary<string, long> ();
Dictionary<uint, long> tokenTypeCache = new Dictionary<uint, long> ();
@@ -222,5 +223,17 @@ namespace Mono.Debugger.Soft
}
return vm.GetMethod (methodId);
}
}
public bool HasDebugInfo {
get {
if (has_debug_info.HasValue)
return has_debug_info.Value;
vm.CheckProtocolVersion (2, 51);
has_debug_info = vm.conn.Assembly_HasDebugInfo (id);
return has_debug_info.Value;
}
}
}
}

View File

@@ -427,7 +427,7 @@ namespace Mono.Debugger.Soft
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
internal const int MINOR_VERSION = 50;
internal const int MINOR_VERSION = 51;
enum WPSuspendPolicy {
NONE = 0,
@@ -548,7 +548,8 @@ namespace Mono.Debugger.Soft
GET_IS_DYNAMIC = 9,
GET_PDB_BLOB = 10,
GET_TYPE_FROM_TOKEN = 11,
GET_METHOD_FROM_TOKEN = 12
GET_METHOD_FROM_TOKEN = 12,
HAS_DEBUG_INFO = 13,
}
enum CmdModule {
@@ -1618,8 +1619,8 @@ namespace Mono.Debugger.Soft
/* Wait for the reply packet */
while (true) {
lock (reply_packets_monitor) {
if (reply_packets.ContainsKey (packetId)) {
byte[] reply = reply_packets [packetId];
byte[] reply;
if (reply_packets.TryGetValue (packetId, out reply)) {
reply_packets.Remove (packetId);
PacketReader r = new PacketReader (this, reply);
@@ -2226,6 +2227,10 @@ namespace Mono.Debugger.Soft
return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_METHOD_FROM_TOKEN, new PacketWriter ().WriteId (id).WriteInt ((int)token)).ReadId ();
}
internal bool Assembly_HasDebugInfo (long id) {
return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.HAS_DEBUG_INFO, new PacketWriter ().WriteId (id)).ReadBool ();
}
/*
* TYPE
*/

View File

@@ -109,6 +109,21 @@ namespace Mono.Debugger.Soft
}
}
public EventSet GetNextEventSet (int timeoutInMilliseconds) {
lock (queue_monitor) {
if (queue.Count == 0) {
if (!Monitor.Wait (queue_monitor, timeoutInMilliseconds)) {
return null;
}
}
current_es = null;
current_es_index = 0;
return (EventSet)queue.Dequeue ();
}
}
[Obsolete ("Use GetNextEventSet () instead")]
public T GetNextEvent<T> () where T : Event {
return GetNextEvent () as T;
@@ -135,8 +150,8 @@ namespace Mono.Debugger.Soft
}
public void Detach () {
conn.VM_Dispose ();
conn.Close ();
conn.VM_Dispose ();
notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, 0, 0, null, 0);
}

View File

@@ -5,13 +5,13 @@
}
.assembly 'dtest-lib' { }
.class public auto ansi ExceptionFilterTest
.class public auto ansi Tests
extends [mscorlib]System.Object
{
.method public static void Main () cil managed
.method public static void Main (string[] args) cil managed
{
.entrypoint
call void class ExceptionFilterTest::Test ()
call void class Tests::Test ()
ret
}
@@ -35,11 +35,11 @@
leave end
} filter {
castclass [mscorlib]System.Exception
call int32 class ExceptionFilterTest::Filter([mscorlib]System.Exception)
call int32 class Tests::Filter([mscorlib]System.Exception)
endfilter
} {
castclass [mscorlib]System.Exception
call void class ExceptionFilterTest::Handler([mscorlib]System.Exception)
call void class Tests::Handler([mscorlib]System.Exception)
leave end
}

View File

@@ -1 +1 @@
6ac1934d3bf36a8694c80b93904eb5ddf2895af3
1f394d53c53a481ed108fe1e55be458a7fb03923