You've already forked linux-packaging-mono
Imported Upstream version 6.12.0.86
Former-commit-id: 7a84ce7d08c42c458ac8e74b27186ca863315d79
This commit is contained in:
parent
92747312ea
commit
0b380204a4
@@ -409,6 +409,9 @@ namespace Mono.Debugger.Soft
|
||||
public ErrorCode ErrorCode {
|
||||
get; set;
|
||||
}
|
||||
public string ErrorMessage {
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -436,7 +439,7 @@ namespace Mono.Debugger.Soft
|
||||
* with newer runtimes, and vice versa.
|
||||
*/
|
||||
internal const int MAJOR_VERSION = 2;
|
||||
internal const int MINOR_VERSION = 54;
|
||||
internal const int MINOR_VERSION = 57;
|
||||
|
||||
enum WPSuspendPolicy {
|
||||
NONE = 0,
|
||||
@@ -792,10 +795,12 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
// For reply packets
|
||||
offset = 0;
|
||||
ReadInt (); // length
|
||||
var len = ReadInt (); // length
|
||||
ReadInt (); // id
|
||||
ReadByte (); // flags
|
||||
ErrorCode = ReadShort ();
|
||||
if (ErrorCode == (int)Mono.Debugger.Soft.ErrorCode.INVALID_ARGUMENT && connection.Version.AtLeast (2, 56) && len > offset)
|
||||
ErrorMsg = ReadString ();
|
||||
}
|
||||
|
||||
public CommandSet CommandSet {
|
||||
@@ -810,6 +815,10 @@ namespace Mono.Debugger.Soft
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ErrorMsg {
|
||||
get; internal set;
|
||||
}
|
||||
|
||||
public int Offset {
|
||||
get {
|
||||
return offset;
|
||||
@@ -1792,7 +1801,7 @@ namespace Mono.Debugger.Soft
|
||||
LogPacket (packetId, encoded_packet, reply, command_set, command, watch);
|
||||
if (r.ErrorCode != 0) {
|
||||
if (ErrorHandler != null)
|
||||
ErrorHandler (this, new ErrorHandlerEventArgs () { ErrorCode = (ErrorCode)r.ErrorCode });
|
||||
ErrorHandler (this, new ErrorHandlerEventArgs () { ErrorCode = (ErrorCode)r.ErrorCode, ErrorMessage = r.ErrorMsg});
|
||||
throw new NotImplementedException ("No error handler set.");
|
||||
} else {
|
||||
return r;
|
||||
|
||||
@@ -34,6 +34,11 @@ namespace Mono.Debugger.Soft
|
||||
}
|
||||
}
|
||||
|
||||
public int GetId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public EventType EventType {
|
||||
get {
|
||||
return etype;
|
||||
|
||||
@@ -51,10 +51,19 @@ namespace Mono.Debugger.Soft
|
||||
// Since protocol version 2.46
|
||||
public Value Value {
|
||||
get {
|
||||
ValueImpl value;
|
||||
if (Address == 0)
|
||||
return null;
|
||||
|
||||
return vm.DecodeValue (vm.conn.Pointer_GetValue (Address, Type));
|
||||
try {
|
||||
value = vm.conn.Pointer_GetValue (Address, Type);
|
||||
}
|
||||
catch (CommandException ex) {
|
||||
if (ex.ErrorCode == ErrorCode.INVALID_ARGUMENT)
|
||||
throw new ArgumentException ("Invalid pointer address.");
|
||||
else
|
||||
throw;
|
||||
}
|
||||
return vm.DecodeValue (value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -371,7 +371,7 @@ namespace Mono.Debugger.Soft
|
||||
case ErrorCode.NO_SEQ_POINT_AT_IL_OFFSET:
|
||||
throw new ArgumentException ("Cannot set breakpoint on the specified IL offset.");
|
||||
default:
|
||||
throw new CommandException (args.ErrorCode);
|
||||
throw new CommandException (args.ErrorCode, args.ErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -657,7 +657,9 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
internal EventRequest GetRequest (int id) {
|
||||
lock (requests_lock) {
|
||||
return requests [id];
|
||||
EventRequest obj;
|
||||
requests.TryGetValue (id, out obj);
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -885,13 +887,18 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
public class CommandException : Exception {
|
||||
|
||||
internal CommandException (ErrorCode error_code) : base ("Debuggee returned error code " + error_code + ".") {
|
||||
internal CommandException (ErrorCode error_code, string error_message) : base ("Debuggee returned error code " + error_code + (error_message == null || error_message.Length == 0 ? "." : " - " + error_message + ".")) {
|
||||
ErrorCode = error_code;
|
||||
ErrorMessage = error_message;
|
||||
}
|
||||
|
||||
public ErrorCode ErrorCode {
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ErrorMessage {
|
||||
get; internal set;
|
||||
}
|
||||
}
|
||||
|
||||
public class VMNotSuspendedException : InvalidOperationException
|
||||
|
||||
@@ -609,6 +609,15 @@ public class Tests : TestsBase, ITest2
|
||||
fixed_size_array();
|
||||
test_new_exception_filter();
|
||||
test_async_debug_generics();
|
||||
if (args.Length >0 && args [0] == "pointer_arguments2") {
|
||||
pointers2 ();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length >0 && args [0] == "ss_multi_thread") {
|
||||
ss_multi_thread ();
|
||||
return 0;
|
||||
}
|
||||
test_invalid_argument_assembly_get_type ();
|
||||
return 3;
|
||||
}
|
||||
|
||||
@@ -637,6 +646,10 @@ public class Tests : TestsBase, ITest2
|
||||
LocalReflectClass.RunMe ();
|
||||
}
|
||||
|
||||
public static void test_invalid_argument_assembly_get_type () {
|
||||
|
||||
}
|
||||
|
||||
public static void breakpoints () {
|
||||
/* Call these early so it is JITted by the time a breakpoint is placed on it */
|
||||
bp3 ();
|
||||
@@ -857,6 +870,24 @@ public class Tests : TestsBase, ITest2
|
||||
n.Buffer2 = new char4('a', 'b', 'c', 'd');
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void ss_multi_thread () {
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
var t = new Thread(mt_ss);
|
||||
t.Name = "Thread_" + i;
|
||||
t.Start();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
static void mt_ss()
|
||||
{
|
||||
int a = 12;
|
||||
int b = 13;
|
||||
int c = 13;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void test_new_exception_filter () {
|
||||
test_new_exception_filter1();
|
||||
@@ -2232,6 +2263,17 @@ public class Tests : TestsBase, ITest2
|
||||
rtMethod.Invoke(rtObject, new object[] { });
|
||||
}
|
||||
|
||||
public static unsafe void pointer_arguments2 (int* a) {
|
||||
*a = 0;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static unsafe void pointers2 () {
|
||||
int[] a = new [] {1,2,3};
|
||||
fixed (int* pa = a)
|
||||
pointer_arguments2 (pa);
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void new_thread_hybrid_exception() {
|
||||
try
|
||||
|
||||
@@ -1 +1 @@
|
||||
c385aeecb4b21151e7780126a63be6607f140237
|
||||
8c953f6fe3d5737ec602dd307992ac2919c00ccc
|
||||
Reference in New Issue
Block a user