|
|
|
@ -379,6 +379,25 @@ namespace Debugger |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> Gets value of given name which is accessible from this function </summary>
|
|
|
|
|
|
|
|
/// <returns> Null if not found </returns>
|
|
|
|
|
|
|
|
public Value GetValue(string name) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (name == "this") { |
|
|
|
|
|
|
|
return ThisValue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (Arguments.Contains(name)) { |
|
|
|
|
|
|
|
return Arguments[name]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (LocalVariables.Contains(name)) { |
|
|
|
|
|
|
|
return LocalVariables[name]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (ContaingClassVariables.Contains(name)) { |
|
|
|
|
|
|
|
return ContaingClassVariables[name]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets all variables in the lexical scope of the function.
|
|
|
|
/// Gets all variables in the lexical scope of the function.
|
|
|
|
/// That is, arguments, local variables and varables of the containing class.
|
|
|
|
/// That is, arguments, local variables and varables of the containing class.
|
|
|
|
@ -418,6 +437,7 @@ namespace Debugger |
|
|
|
if (thisValueCache == null) { |
|
|
|
if (thisValueCache == null) { |
|
|
|
thisValueCache = new Value( |
|
|
|
thisValueCache = new Value( |
|
|
|
process, |
|
|
|
process, |
|
|
|
|
|
|
|
"this", |
|
|
|
delegate { return ThisCorValue; } |
|
|
|
delegate { return ThisCorValue; } |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -480,8 +500,11 @@ namespace Debugger |
|
|
|
/// <param name="index"> Zero-based index </param>
|
|
|
|
/// <param name="index"> Zero-based index </param>
|
|
|
|
public Value GetArgument(int index) |
|
|
|
public Value GetArgument(int index) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
string name = GetParameterName(index); |
|
|
|
|
|
|
|
|
|
|
|
return new Value( |
|
|
|
return new Value( |
|
|
|
process, |
|
|
|
process, |
|
|
|
|
|
|
|
name, |
|
|
|
delegate { return GetArgumentCorValue(index); } |
|
|
|
delegate { return GetArgumentCorValue(index); } |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -546,8 +569,9 @@ namespace Debugger |
|
|
|
if (symMethod != null) { // TODO: Is this needed?
|
|
|
|
if (symMethod != null) { // TODO: Is this needed?
|
|
|
|
ISymUnmanagedScope symRootScope = symMethod.RootScope; |
|
|
|
ISymUnmanagedScope symRootScope = symMethod.RootScope; |
|
|
|
foreach(Value var in GetLocalVariablesInScope(symRootScope)) { |
|
|
|
foreach(Value var in GetLocalVariablesInScope(symRootScope)) { |
|
|
|
// TODO: Compiler generated variables
|
|
|
|
if (!var.Name.StartsWith("CS$")) { // TODO: Generalize
|
|
|
|
yield return var; |
|
|
|
yield return var; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -569,6 +593,7 @@ namespace Debugger |
|
|
|
{ |
|
|
|
{ |
|
|
|
return new Value( |
|
|
|
return new Value( |
|
|
|
process, |
|
|
|
process, |
|
|
|
|
|
|
|
symVar.Name, |
|
|
|
delegate { return GetCorValueOfLocalVariable(symVar); } |
|
|
|
delegate { return GetCorValueOfLocalVariable(symVar); } |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|