You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.309
Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
parent
ee1447783b
commit
94b2861243
@@ -15,10 +15,13 @@ VALID_TEST_PROFILE := $(filter net_4_x, $(PROFILE))
|
||||
# The test exe is not profile specific, and compiling a 2.0 will make the 4.5 tests fail
|
||||
ifdef VALID_TEST_PROFILE
|
||||
|
||||
TEST_HELPERS_SOURCES = \
|
||||
../test-helpers/NetworkHelpers.cs
|
||||
|
||||
test-local: dtest-app.exe dtest-excfilter.exe
|
||||
|
||||
dtest-app.exe: Test/dtest-app.cs
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) -optimize- Test/dtest-app.cs
|
||||
dtest-app.exe: Test/dtest-app.cs $(TEST_HELPERS_SOURCES)
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) -optimize- Test/dtest-app.cs $(TEST_HELPERS_SOURCES)
|
||||
|
||||
dtest-excfilter.exe: Test/dtest-excfilter.il
|
||||
MONO_PATH=$(topdir)/class/lib/$(PROFILE) $(INTERNAL_ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il
|
||||
|
||||
@@ -40,6 +40,7 @@ Mono.Debugger.Soft/BreakpointEventRequest.cs
|
||||
Mono.Debugger.Soft/MethodEntryEventRequest.cs
|
||||
Mono.Debugger.Soft/AssemblyLoadEventRequest.cs
|
||||
Mono.Debugger.Soft/LocalVariable.cs
|
||||
Mono.Debugger.Soft/LocalScope.cs
|
||||
Mono.Debugger.Soft/ParameterInfoMirror.cs
|
||||
Mono.Debugger.Soft/Event.cs
|
||||
Mono.Debugger.Soft/EventSet.cs
|
||||
|
||||
@@ -117,6 +117,8 @@ namespace Mono.Debugger.Soft
|
||||
public string[] names;
|
||||
public int[] live_range_start;
|
||||
public int[] live_range_end;
|
||||
public int[] scopes_start;
|
||||
public int[] scopes_end;
|
||||
}
|
||||
|
||||
struct PropInfo {
|
||||
@@ -418,7 +420,7 @@ namespace Mono.Debugger.Soft
|
||||
* with newer runtimes, and vice versa.
|
||||
*/
|
||||
internal const int MAJOR_VERSION = 2;
|
||||
internal const int MINOR_VERSION = 42;
|
||||
internal const int MINOR_VERSION = 43;
|
||||
|
||||
enum WPSuspendPolicy {
|
||||
NONE = 0,
|
||||
@@ -1910,6 +1912,19 @@ namespace Mono.Debugger.Soft
|
||||
var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_LOCALS_INFO, new PacketWriter ().WriteId (id));
|
||||
|
||||
LocalsInfo info = new LocalsInfo ();
|
||||
|
||||
if (Version.AtLeast (2, 43)) {
|
||||
int nscopes = res.ReadInt ();
|
||||
info.scopes_start = new int [nscopes];
|
||||
info.scopes_end = new int [nscopes];
|
||||
int last_start = 0;
|
||||
for (int i = 0; i < nscopes; ++i) {
|
||||
info.scopes_start [i] = last_start + res.ReadInt ();
|
||||
info.scopes_end [i] = info.scopes_start [i] + res.ReadInt ();
|
||||
last_start = info.scopes_start [i];
|
||||
}
|
||||
}
|
||||
|
||||
int nlocals = res.ReadInt ();
|
||||
info.types = new long [nlocals];
|
||||
for (int i = 0; i < nlocals; ++i)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
public class LocalScope : Mirror {
|
||||
|
||||
MethodMirror method;
|
||||
int live_range_start, live_range_end;
|
||||
|
||||
internal LocalScope (VirtualMachine vm, MethodMirror method, int live_range_start, int live_range_end) : base (vm, 0) {
|
||||
this.method = method;
|
||||
this.live_range_start = live_range_start;
|
||||
this.live_range_end = live_range_end;
|
||||
}
|
||||
|
||||
public MethodMirror Method {
|
||||
get {
|
||||
return method;
|
||||
}
|
||||
}
|
||||
|
||||
public int LiveRangeStart {
|
||||
get {
|
||||
return live_range_start;
|
||||
}
|
||||
}
|
||||
|
||||
public int LiveRangeEnd {
|
||||
get {
|
||||
return live_range_end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace Mono.Debugger.Soft
|
||||
ParameterInfoMirror[] param_info;
|
||||
ParameterInfoMirror ret_param;
|
||||
LocalVariable[] locals;
|
||||
LocalScope[] scopes;
|
||||
IList<Location> locations;
|
||||
MethodBodyMirror body;
|
||||
MethodMirror gmd;
|
||||
@@ -239,6 +240,12 @@ namespace Mono.Debugger.Soft
|
||||
}
|
||||
}
|
||||
|
||||
public LocalScope [] GetScopes () {
|
||||
vm.CheckProtocolVersion (2, 43);
|
||||
GetLocals ();
|
||||
return scopes;
|
||||
}
|
||||
|
||||
public LocalVariable[] GetLocals () {
|
||||
if (locals == null) {
|
||||
LocalsInfo li = new LocalsInfo ();
|
||||
@@ -258,6 +265,12 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
for (int i = 0; i < li.names.Length; ++i)
|
||||
locals [i + pi.Length] = new LocalVariable (vm, this, i, li.types [i], li.names [i], li.live_range_start [i], li.live_range_end [i], false);
|
||||
|
||||
if (vm.Version.AtLeast (2, 43)) {
|
||||
scopes = new LocalScope [li.scopes_start.Length];
|
||||
for (int i = 0; i < scopes.Length; ++i)
|
||||
scopes [i] = new LocalScope (vm, this, li.scopes_start [i], li.scopes_end [i]);
|
||||
}
|
||||
}
|
||||
return locals;
|
||||
}
|
||||
|
||||
@@ -9,8 +9,11 @@ using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using MonoTests.Helpers;
|
||||
|
||||
public class TestsBase
|
||||
{
|
||||
@@ -311,6 +314,10 @@ public class Tests : TestsBase, ITest2
|
||||
wait_one ();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length >0 && args [0] == "threadpool-io") {
|
||||
threadpool_io ();
|
||||
return 0;
|
||||
}
|
||||
breakpoints ();
|
||||
single_stepping ();
|
||||
arguments ();
|
||||
@@ -822,9 +829,7 @@ public class Tests : TestsBase, ITest2
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
#if NET_4_5
|
||||
[StateMachine (typeof (int))]
|
||||
#endif
|
||||
public static void locals2<T> (string[] args, int arg, T t, ref string rs, ref AStruct astruct) {
|
||||
long i = 42;
|
||||
string s = "AB";
|
||||
@@ -1177,12 +1182,10 @@ public class Tests : TestsBase, ITest2
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void unhandled_exception_user () {
|
||||
#if NET_4_5
|
||||
System.Threading.Tasks.Task.Factory.StartNew (() => {
|
||||
Throw ();
|
||||
});
|
||||
Thread.Sleep (10000);
|
||||
#endif
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
@@ -1541,6 +1544,49 @@ public class Tests : TestsBase, ITest2
|
||||
public override string virtual_method () {
|
||||
return "V2";
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void threadpool_bp () { }
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void threadpool_io () {
|
||||
// Start a threadpool task that blocks on I/O.
|
||||
// Regression test for #42625
|
||||
const int nbytes = 16;
|
||||
var bsOut = new byte[nbytes];
|
||||
for (int i = 0; i < nbytes; i++) {
|
||||
bsOut[i] = (byte)i;
|
||||
}
|
||||
var endPoint = NetworkHelpers.LocalEphemeralEndPoint ();
|
||||
var l = new TcpListener (endPoint);
|
||||
l.Start ();
|
||||
Task<byte[]> t = Task.Run (async () => {
|
||||
var c = new TcpClient ();
|
||||
await c.ConnectAsync (endPoint.Address, endPoint.Port);
|
||||
var streamIn = c.GetStream ();
|
||||
var bs = new byte[nbytes];
|
||||
int nread = 0;
|
||||
int nremain = nbytes;
|
||||
while (nread < nbytes) {
|
||||
int r = await streamIn.ReadAsync (bs, nread, nremain);
|
||||
nread += r;
|
||||
nremain -= r;
|
||||
}
|
||||
streamIn.Close ();
|
||||
return bs;
|
||||
});
|
||||
var s = l.AcceptTcpClient ();
|
||||
l.Stop ();
|
||||
// write bytes in two groups so that the task blocks on the ReadAsync
|
||||
var streamOut = s.GetStream ();
|
||||
var nbytesFirst = nbytes / 2;
|
||||
var nbytesRest = nbytes - nbytesFirst;
|
||||
streamOut.Write (bsOut, 0, nbytesFirst);
|
||||
threadpool_bp ();
|
||||
streamOut.Write (bsOut, nbytesFirst, nbytesRest);
|
||||
streamOut.Close ();
|
||||
var bsIn = t.Result;
|
||||
}
|
||||
}
|
||||
|
||||
class TypeLoadClass {
|
||||
|
||||
@@ -1 +1 @@
|
||||
c0af12cb38ac15d9f023d11cfffa62408e2fb559
|
||||
1933fc5e827372129731655297986401622ff064
|
||||
Reference in New Issue
Block a user