fix in linux debugger
This commit is contained in:
parent
6eb2456704
commit
4dd97d6a09
|
|
@ -881,6 +881,15 @@ namespace VisualPascalABC
|
|||
return monoDebuggerSession;
|
||||
}
|
||||
}
|
||||
|
||||
public Mono.Debugging.Client.StackFrame StackFrame
|
||||
{
|
||||
get
|
||||
{
|
||||
return stackFrame;
|
||||
}
|
||||
}
|
||||
|
||||
void debugProcessStarted(object sender, ProcessEventArgs e)
|
||||
{
|
||||
workbench.WidgetController.SetDebugTabsVisible(true);
|
||||
|
|
|
|||
|
|
@ -740,6 +740,8 @@ namespace VisualPascalABC
|
|||
{
|
||||
var tm = type as Mono.Debugger.Soft.TypeMirror;
|
||||
var mi = tm.GetMethod(method);
|
||||
if (mi == null)
|
||||
return null;
|
||||
return InvokeMethod(type, mi, obj, args);
|
||||
}
|
||||
|
||||
|
|
@ -6738,6 +6740,8 @@ namespace VisualPascalABC
|
|||
//IList<Debugger.MemberInfo> members = rv.obj_val.Type.GetMember(id.name, BindingFlags.All);
|
||||
if (string.Compare(id.name, "Count", true) == 0)
|
||||
res.monoValue = InvokeMethod(rv.monoValue.Type, "get_Count", rv.monoValue, new Mono.Debugging.Client.ObjectValue[0]);
|
||||
else if (string.Compare(id.name, "Length", true) == 0)
|
||||
res.monoValue = InvokeMethod(rv.monoValue.Type, "get_Length", rv.monoValue, new Mono.Debugging.Client.ObjectValue[0]);
|
||||
else if (rv.monoValue.IsArray)
|
||||
{
|
||||
if (string.Compare(id.name, "Length", true) == 0)
|
||||
|
|
|
|||
|
|
@ -246,6 +246,9 @@ namespace Mono.Debugging.Client
|
|||
|
||||
public static ObjectValue CreateUnknown (string name)
|
||||
{
|
||||
#if (DEBUG)
|
||||
Console.WriteLine("unknown " + name);
|
||||
#endif
|
||||
return CreateUnknown (null, new ObjectPath (name), "");
|
||||
}
|
||||
|
||||
|
|
@ -276,7 +279,9 @@ namespace Mono.Debugging.Client
|
|||
public static ObjectValue CreateFatalError (string name, string message, ObjectValueFlags flags)
|
||||
{
|
||||
var val = new ObjectValue ();
|
||||
Console.WriteLine("create value " + name);
|
||||
#if (DEBUG)
|
||||
Console.WriteLine("create fatal error value " + name);
|
||||
#endif
|
||||
val.flags = flags | ObjectValueFlags.Error;
|
||||
val.value = message;
|
||||
val.name = name;
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ namespace Mono.Debugger.Soft
|
|||
|
||||
static bool opcodes_inited;
|
||||
|
||||
static OpCode [] OneByteOpCode = new OpCode [0xe0 + 1];
|
||||
static OpCode [] TwoBytesOpCode = new OpCode [0x1e + 1];
|
||||
static OpCode [] OneByteOpCode = new OpCode [0xff + 1];
|
||||
static OpCode [] TwoBytesOpCode = new OpCode [0xff + 1];
|
||||
|
||||
Dictionary<int, ResolvedToken> tokensCache = new Dictionary<int, ResolvedToken> ();
|
||||
|
||||
|
|
@ -100,24 +100,45 @@ namespace Mono.Debugger.Soft
|
|||
index = isOneByteOpCode ? value : value & 0xff;
|
||||
#endif
|
||||
if (isOneByteOpCode)
|
||||
OneByteOpCode [index] = val;
|
||||
{
|
||||
if (index >= OneByteOpCode.Length)
|
||||
throw new IndexOutOfRangeException("OpCode "+index.ToString());
|
||||
OneByteOpCode[index] = val;
|
||||
}
|
||||
else
|
||||
TwoBytesOpCode [index] = val;
|
||||
{
|
||||
if (index >= OneByteOpCode.Length)
|
||||
throw new IndexOutOfRangeException("OpCode " + index.ToString());
|
||||
TwoBytesOpCode[index] = val;
|
||||
}
|
||||
|
||||
}
|
||||
opcodes_inited = true;
|
||||
}
|
||||
|
||||
while (br.BaseStream.Position < start + code_size) {
|
||||
OpCode op;
|
||||
OpCode op = default(OpCode);
|
||||
long offset = br.BaseStream.Position - start;
|
||||
int cursor = br.ReadByte ();
|
||||
int token;
|
||||
ResolvedToken t;
|
||||
|
||||
if (cursor == 0xfe)
|
||||
op = TwoBytesOpCode [br.ReadByte ()];
|
||||
{
|
||||
byte b = br.ReadByte();
|
||||
if (b >= 0 && b < TwoBytesOpCode.Length)
|
||||
op = TwoBytesOpCode[b];
|
||||
else
|
||||
throw new IndexOutOfRangeException("OpCode " + b.ToString());
|
||||
}
|
||||
else
|
||||
op = OneByteOpCode [cursor];
|
||||
{
|
||||
if (cursor >= 0 && cursor < OneByteOpCode.Length)
|
||||
op = OneByteOpCode[cursor];
|
||||
else
|
||||
throw new IndexOutOfRangeException("OpCode " + cursor.ToString());
|
||||
}
|
||||
|
||||
|
||||
ILInstruction instr = new ILInstruction ((int)offset, op, null);
|
||||
|
||||
|
|
|
|||
|
|
@ -112,6 +112,9 @@ namespace Mono.Debugging.Evaluation
|
|||
return DC.ObjectValue.CreateError (this, new ObjectPath (Name), Context.Adapter.GetDisplayTypeName (GetContext (options), Type), ex.Message, Flags);
|
||||
} catch (Exception ex) {
|
||||
Context.WriteDebuggerError (ex);
|
||||
#if (DEBUG)
|
||||
Console.WriteLine(ex.Message + " " + ex.StackTrace);
|
||||
#endif
|
||||
return DC.ObjectValue.CreateUnknown (Name);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue