|
|
|
@ -343,12 +343,12 @@ namespace Debugger.MetaData |
|
|
|
uint token = 0; |
|
|
|
uint token = 0; |
|
|
|
|
|
|
|
|
|
|
|
bool success = |
|
|
|
bool success = |
|
|
|
(Read(code, 0x00) || true) && // nop || nothing
|
|
|
|
(Read(code, 0x00) || true) && // nop || nothing
|
|
|
|
(Read(code, 0x02, 0x7B) || Read(code, 0x7E)) && // ldarg.0; ldfld || ldsfld
|
|
|
|
(Read(code, 0x02, 0x7B) || Read(code, 0x7E)) && // ldarg.0; ldfld || ldsfld
|
|
|
|
ReadToken(code, ref token) && // <field token>
|
|
|
|
ReadToken(code, ref token) && // <field token>
|
|
|
|
(Read(code, 0x0A, 0x2B, 0x00, 0x06) || true) && // stloc.0; br.s; offset+00; ldloc.0 || nothing
|
|
|
|
(Read(code, 0x0A, 0x2B, 0x00, 0x06) || true) && // stloc.0; br.s; offset+00; ldloc.0 || nothing
|
|
|
|
Read(code, 0x2A); // ret
|
|
|
|
Read(code, 0x2A); // ret
|
|
|
|
|
|
|
|
|
|
|
|
if (!success) return; |
|
|
|
if (!success) return; |
|
|
|
|
|
|
|
|
|
|
|
if (this.Process.Options.Verbose) { |
|
|
|
if (this.Process.Options.Verbose) { |
|
|
|
@ -427,7 +427,7 @@ namespace Debugger.MetaData |
|
|
|
// Look on the method
|
|
|
|
// Look on the method
|
|
|
|
DebugType.IsDefined( |
|
|
|
DebugType.IsDefined( |
|
|
|
this, |
|
|
|
this, |
|
|
|
false, |
|
|
|
false, |
|
|
|
typeof(System.Diagnostics.DebuggerStepThroughAttribute), |
|
|
|
typeof(System.Diagnostics.DebuggerStepThroughAttribute), |
|
|
|
typeof(System.Diagnostics.DebuggerNonUserCodeAttribute), |
|
|
|
typeof(System.Diagnostics.DebuggerNonUserCodeAttribute), |
|
|
|
typeof(System.Diagnostics.DebuggerHiddenAttribute)) |
|
|
|
typeof(System.Diagnostics.DebuggerHiddenAttribute)) |
|
|
|
@ -435,7 +435,7 @@ namespace Debugger.MetaData |
|
|
|
// Look on the type
|
|
|
|
// Look on the type
|
|
|
|
DebugType.IsDefined( |
|
|
|
DebugType.IsDefined( |
|
|
|
declaringType, |
|
|
|
declaringType, |
|
|
|
false, |
|
|
|
false, |
|
|
|
typeof(System.Diagnostics.DebuggerStepThroughAttribute), |
|
|
|
typeof(System.Diagnostics.DebuggerStepThroughAttribute), |
|
|
|
typeof(System.Diagnostics.DebuggerNonUserCodeAttribute), |
|
|
|
typeof(System.Diagnostics.DebuggerNonUserCodeAttribute), |
|
|
|
typeof(System.Diagnostics.DebuggerHiddenAttribute)); |
|
|
|
typeof(System.Diagnostics.DebuggerHiddenAttribute)); |
|
|
|
@ -464,6 +464,18 @@ namespace Debugger.MetaData |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static Value GetLocalVariableValue(StackFrame context, int varIndex) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ICorDebugValue corVal; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
corVal = context.CorILFrame.GetLocalVariable((uint)varIndex); |
|
|
|
|
|
|
|
} catch (COMException e) { |
|
|
|
|
|
|
|
if ((uint)e.ErrorCode == 0x80131304) throw new GetValueException("Unavailable in optimized code"); |
|
|
|
|
|
|
|
throw; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return new Value(context.AppDomain, corVal); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public DebugLocalVariableInfo GetLocalVariable(int offset, string name) |
|
|
|
public DebugLocalVariableInfo GetLocalVariable(int offset, string name) |
|
|
|
{ |
|
|
|
{ |
|
|
|
foreach(DebugLocalVariableInfo loc in GetLocalVariables(offset)) { |
|
|
|
foreach(DebugLocalVariableInfo loc in GetLocalVariables(offset)) { |
|
|
|
|