|
|
@ -366,7 +366,8 @@ namespace DebuggerLibrary |
|
|
|
|
|
|
|
|
|
|
|
public string GetParameterName(int index) |
|
|
|
public string GetParameterName(int index) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return module.MetaData.GetParamForMethodIndex(methodProps.Token, (uint)index).Name; |
|
|
|
// index = 0 is return parameter
|
|
|
|
|
|
|
|
return module.MetaData.GetParamForMethodIndex(methodProps.Token, (uint)index + 1).Name; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int GetArgumentCount { |
|
|
|
public int GetArgumentCount { |
|
|
@ -382,7 +383,8 @@ namespace DebuggerLibrary |
|
|
|
internal ICorDebugValue GetArgumentValue(int index) |
|
|
|
internal ICorDebugValue GetArgumentValue(int index) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ICorDebugValue arg; |
|
|
|
ICorDebugValue arg; |
|
|
|
corILFrame.GetArgument((uint)index, out arg); |
|
|
|
// Non-static functions include 'this' as first argument
|
|
|
|
|
|
|
|
corILFrame.GetArgument((uint)(IsStatic? index : (index + 1)), out arg); |
|
|
|
return arg; |
|
|
|
return arg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -392,7 +394,11 @@ namespace DebuggerLibrary |
|
|
|
|
|
|
|
|
|
|
|
int argCount = GetArgumentCount; |
|
|
|
int argCount = GetArgumentCount; |
|
|
|
|
|
|
|
|
|
|
|
for (int i = (IsStatic?0:1); i < argCount; i++) { |
|
|
|
if (!IsStatic) { |
|
|
|
|
|
|
|
argCount--; // Remove 'this' from count
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < argCount; i++) { |
|
|
|
arguments.Add(VariableFactory.CreateVariable(debugger, GetArgumentValue(i), GetParameterName(i))); |
|
|
|
arguments.Add(VariableFactory.CreateVariable(debugger, GetArgumentValue(i), GetParameterName(i))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|