Browse Source

Initial support for pointer types

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3195 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 17 years ago
parent
commit
72fa7ab914
  1. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/ValueNode.cs
  2. 4
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs
  3. 16
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/StackFrame.cs
  4. 78
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs
  5. 8
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Array.cs
  6. 14
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Helpers.cs
  7. 19
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Object.cs
  8. 24
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Primitive.cs
  9. 84
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.cs
  10. 374
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugTypes.cs
  11. 2
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/ValueNode.cs

@ -95,7 +95,7 @@ namespace Debugger.AddIn.TreeModel @@ -95,7 +95,7 @@ namespace Debugger.AddIn.TreeModel
}
if (DebuggingOptions.ICorDebugVisualizerEnabled) {
AbstractNode info = ICorDebug.GetDebugInfoRoot(val.Process, val.RawCorValue);
AbstractNode info = ICorDebug.GetDebugInfoRoot(val.Process, val.CorValue);
this.ChildNodes = PrependNode(info, this.ChildNodes);
}

4
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs

@ -226,10 +226,10 @@ namespace Debugger @@ -226,10 +226,10 @@ namespace Debugger
"Expected: " + method.DeclaringType.FullName + " Seen: " + thisValue.Type.FullName
);
}
corArgs.Add(thisValue.SoftReference);
corArgs.Add(thisValue.CorValue);
}
foreach(Value arg in args) {
corArgs.Add(arg.SoftReference);
corArgs.Add(arg.CorValue);
}
ICorDebugType[] genericArgs = method.DeclaringType.GetGenericArgumentsAsCorDebugType();

16
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/StackFrame.cs

@ -252,13 +252,19 @@ namespace Debugger @@ -252,13 +252,19 @@ namespace Debugger
ICorDebugValue GetThisCorValue()
{
if (this.MethodInfo.IsStatic) throw new GetValueException("Static method does not have 'this'.");
ICorDebugValue corValue;
try {
return CorILFrame.GetArgument(0);
corValue = CorILFrame.GetArgument(0);
} catch (COMException e) {
// System.Runtime.InteropServices.COMException (0x80131304): An IL variable is not available at the current native IP. (See Forum-8640)
if ((uint)e.ErrorCode == 0x80131304) throw new GetValueException("Not available in the current state");
throw;
}
// This can be 'by ref' for value types
if (corValue.Type == (uint)CorElementType.BYREF) {
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference();
}
return corValue;
}
/// <summary> Total number of arguments (excluding implicit 'this' argument) </summary>
@ -282,13 +288,19 @@ namespace Debugger @@ -282,13 +288,19 @@ namespace Debugger
ICorDebugValue GetArgumentCorValue(int index)
{
ICorDebugValue corValue;
try {
// Non-static methods include 'this' as first argument
return CorILFrame.GetArgument((uint)(this.MethodInfo.IsStatic? index : (index + 1)));
corValue = CorILFrame.GetArgument((uint)(this.MethodInfo.IsStatic? index : (index + 1)));
} catch (COMException e) {
if ((uint)e.ErrorCode == 0x80131304) throw new GetValueException("Unavailable in optimized code");
throw;
}
// Method arguments can be passed 'by ref'
if (corValue.Type == (uint)CorElementType.BYREF) {
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference();
}
return corValue;
}
#region Convenience methods

78
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs

@ -86,13 +86,6 @@ namespace Debugger.MetaData @@ -86,13 +86,6 @@ namespace Debugger.MetaData
}
}
/// <summary> Returns true if this type represents interface </summary>
public bool IsInterface {
get {
return IsClass && classProps.IsInterface;
}
}
/// <summary> Returns a string describing the type including the namespace
/// and generic arguments but excluding the assembly name. </summary>
public string FullName {
@ -116,7 +109,7 @@ namespace Debugger.MetaData @@ -116,7 +109,7 @@ namespace Debugger.MetaData
/// (ie array, reference or pointer) </summary>
public bool HasElementType {
get {
return IsArray;
return IsArray || IsPointer;
}
}
@ -131,23 +124,6 @@ namespace Debugger.MetaData @@ -131,23 +124,6 @@ namespace Debugger.MetaData
}
}
/// <summary> Gets a value indicating whether the type is an array </summary>
public bool IsArray {
get {
return this.corElementType == CorElementType.ARRAY ||
this.corElementType == CorElementType.SZARRAY;
}
}
/// <summary> Gets a value indicating whether the immediate type is generic.
/// Arrays, references and pointers are never generic types. </summary>
public bool IsGenericType {
get {
return (IsClass || IsValueType) &&
typeArguments.Count > 0;
}
}
/// <summary> Gets a list of all interfaces that this type implements </summary>
public List<DebugType> Interfaces {
get {
@ -191,6 +167,23 @@ namespace Debugger.MetaData @@ -191,6 +167,23 @@ namespace Debugger.MetaData
return types.ToArray();
}
/// <summary> Gets a value indicating whether the type is an array </summary>
public bool IsArray {
get {
return this.corElementType == CorElementType.ARRAY ||
this.corElementType == CorElementType.SZARRAY;
}
}
/// <summary> Gets a value indicating whether the immediate type is generic.
/// Arrays, references and pointers are never generic types. </summary>
public bool IsGenericType {
get {
return (IsClass || IsValueType) &&
typeArguments.Count > 0;
}
}
/// <summary> Gets a value indicating whether the type is a class </summary>
public bool IsClass {
get {
@ -199,6 +192,13 @@ namespace Debugger.MetaData @@ -199,6 +192,13 @@ namespace Debugger.MetaData
}
}
/// <summary> Returns true if this type represents interface </summary>
public bool IsInterface {
get {
return IsClass && classProps.IsInterface;
}
}
/// <summary> Gets a value indicating whether the type is a value type (that is, a structre in C#) </summary>
public bool IsValueType {
get {
@ -243,6 +243,21 @@ namespace Debugger.MetaData @@ -243,6 +243,21 @@ namespace Debugger.MetaData
}
}
[Tests.Ignore] // TODO: Remove
public bool IsPointer {
get {
return this.corElementType == CorElementType.PTR ||
this.corElementType == CorElementType.BYREF;
}
}
[Tests.Ignore] // TODO: Remove
public bool IsVoid {
get {
return this.corElementType == CorElementType.VOID;
}
}
internal uint? AppDomainID {
get {
if (IsClass || IsValueType) {
@ -292,7 +307,7 @@ namespace Debugger.MetaData @@ -292,7 +307,7 @@ namespace Debugger.MetaData
this.classProps = module.MetaData.GetTypeDefProps(corClass.Token);
}
if (this.IsClass || this.IsValueType || this.IsArray) {
if (this.IsClass || this.IsValueType || this.IsArray || this.IsPointer) {
foreach(ICorDebugType t in corType.EnumerateTypeParameters().Enumerator) {
typeArguments.Add(DebugType.Create(process, t));
}
@ -434,6 +449,10 @@ namespace Debugger.MetaData @@ -434,6 +449,10 @@ namespace Debugger.MetaData
}
} else if (IsPrimitive) {
return this.ManagedType.ToString();
} else if (IsPointer) {
return this.GetElementType().FullName + (this.corElementType == CorElementType.BYREF ? "&" : "*");
} else if (IsVoid) {
return "System.Void";
} else {
throw new DebuggerException("Unknown type: " + this.corElementType.ToString());
}
@ -536,6 +555,13 @@ namespace Debugger.MetaData @@ -536,6 +555,13 @@ namespace Debugger.MetaData
other.Module == this.Module &&
other.MetadataToken == this.MetadataToken;
}
if (this.IsPointer) {
return other.IsPointer &&
other.GetElementType().Equals(this.GetElementType());
}
if (this.IsVoid) {
return other.IsVoid;
}
throw new DebuggerException("Unknown type");
} else {
return false;

8
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Array.cs

@ -21,11 +21,9 @@ namespace Debugger @@ -21,11 +21,9 @@ namespace Debugger
{
ICorDebugArrayValue CorArrayValue {
get {
if (IsArray) {
return CorValue.CastTo<ICorDebugArrayValue>();
} else {
throw new DebuggerException("Value is not an array");
}
if (!IsArray) throw new DebuggerException("Value is not an array");
return this.CorReferenceValue.Dereference().CastTo<ICorDebugArrayValue>();
}
}

14
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Helpers.cs

@ -16,20 +16,6 @@ namespace Debugger @@ -16,20 +16,6 @@ namespace Debugger
{
internal static ICorDebugValue DereferenceUnbox(ICorDebugValue corValue)
{
// Method arguments can be passed 'by ref'
if (corValue.Type == (uint)CorElementType.BYREF) {
try {
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference();
} catch (COMException e) {
// This might be an issue in optimized code. (try stepping through a Console.Write(string))
// A reference value was found to be bad during dereferencing. (Exception from HRESULT: 0x80131305)
if ((uint)e.ErrorCode == 0x80131305) {
throw new GetValueException("A reference value was found to be bad during dereferencing");
}
throw;
}
}
// Pointers may be used in 'unsafe' code - CorElementType.PTR
// Classes need to be dereferenced
while (corValue.Is<ICorDebugReferenceValue>()) {

19
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Object.cs

@ -19,11 +19,20 @@ namespace Debugger @@ -19,11 +19,20 @@ namespace Debugger
{
internal ICorDebugObjectValue CorObjectValue {
get {
if (IsObject) {
return CorValue.CastTo<ICorDebugObjectValue>();
} else {
throw new DebuggerException("Value is not an object");
if (!IsObject) throw new DebuggerException("Value is not an object");
if (this.Type.IsClass) {
return this.CorReferenceValue.Dereference().CastTo<ICorDebugObjectValue>();
}
if (this.Type.IsValueType) {
// Dereference and unbox
if (corValue.Is<ICorDebugReferenceValue>()) {
return this.CorReferenceValue.Dereference().CastTo<ICorDebugBoxValue>().Object;
} else {
return corValue.CastTo<ICorDebugObjectValue>();
}
}
throw new DebuggerException("Unknown type");
}
}
@ -169,7 +178,7 @@ namespace Debugger @@ -169,7 +178,7 @@ namespace Debugger
return new Value(
propertyInfo.Process,
new MemberReferenceExpression(objectInstanceExpression, propertyInfo, argumentExpressions.ToArray()),
Value.InvokeMethod(objectInstance, propertyInfo.GetMethod, arguments).RawCorValue
Value.InvokeMethod(objectInstance, propertyInfo.GetMethod, arguments).CorValue
);
}

24
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Primitive.cs

@ -17,14 +17,25 @@ namespace Debugger @@ -17,14 +17,25 @@ namespace Debugger
{
ICorDebugGenericValue CorGenericValue {
get {
if (IsPrimitive) {
return CorValue.CastTo<ICorDebugGenericValue>();
if (!IsPrimitive) throw new DebuggerException("Value is not a primitive type");
// Dereference and unbox
if (corValue.Is<ICorDebugReferenceValue>()) {
return this.CorReferenceValue.Dereference().CastTo<ICorDebugBoxValue>().Object.CastTo<ICorDebugGenericValue>();
} else {
throw new DebuggerException("Value is not a primitive type");
return corValue.CastTo<ICorDebugGenericValue>();
}
}
}
ICorDebugStringValue CorStringValue {
get {
if (CorType != CorElementType.STRING) throw new DebuggerException("Value is not a string");
return CorReferenceValue.Dereference().CastTo<ICorDebugStringValue>();
}
}
/// <summary>
/// Returns true if the value is an primitive type.
/// eg int, bool, string
@ -49,8 +60,13 @@ namespace Debugger @@ -49,8 +60,13 @@ namespace Debugger
/// </summary>
public object PrimitiveValue {
get {
if (!IsPrimitive) throw new DebuggerException("Value is not a primitive type");
if (CorType == CorElementType.STRING) {
return (CorValue.CastTo<ICorDebugStringValue>()).String;
if (IsNull) {
return null;
} else {
return this.CorStringValue.String;
}
} else {
return CorGenericValue.Value;
}

84
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.cs

@ -24,8 +24,6 @@ namespace Debugger @@ -24,8 +24,6 @@ namespace Debugger
{
Process process;
Expression expression;
ICorDebugValue rawCorValue;
PauseSession rawCorValue_pauseSession;
ICorDebugValue corValue;
PauseSession corValue_pauseSession;
DebugType type;
@ -38,7 +36,10 @@ namespace Debugger @@ -38,7 +36,10 @@ namespace Debugger
/// <summary> Returns true if the value is null </summary>
public bool IsNull {
get {
return CorValue == null;
return
(this.Type.IsClass || this.Type.IsValueType || this.Type.IsArray || this.CorType == CorElementType.STRING) &&
this.CorValue.Is<ICorDebugReferenceValue>() &&
this.CorReferenceValue.IsNull != 0;
}
}
@ -65,30 +66,27 @@ namespace Debugger @@ -65,30 +66,27 @@ namespace Debugger
/// Value is valid only until the debuggee is resummed. </summary>
public bool IsInvalid {
get {
return rawCorValue_pauseSession != process.PauseSession &&
!rawCorValue.Is<ICorDebugHandleValue>();
return corValue_pauseSession != process.PauseSession &&
!corValue.Is<ICorDebugHandleValue>();
}
}
[Tests.Ignore]
public ICorDebugValue RawCorValue {
public ICorDebugValue CorValue {
get {
if (this.IsInvalid) throw new GetValueException("Value is no longer valid");
return rawCorValue;
return corValue;
}
}
[Tests.Ignore]
public ICorDebugValue CorValue {
ICorDebugReferenceValue CorReferenceValue {
get {
if (this.IsInvalid) throw new GetValueException("Value is no longer valid");
if (corValue_pauseSession != process.PauseSession) {
corValue = DereferenceUnbox(rawCorValue);
corValue_pauseSession = process.PauseSession;
if (this.CorValue.Is<ICorDebugReferenceValue>()) {
return this.CorValue.CastTo<ICorDebugReferenceValue>();
} else {
throw new GetValueException("Reference value was expected");
}
return corValue;
}
}
@ -102,54 +100,33 @@ namespace Debugger @@ -102,54 +100,33 @@ namespace Debugger
}
}
internal ICorDebugValue SoftReference {
get {
ICorDebugValue corValue = this.RawCorValue;
if (corValue != null && corValue.Is<ICorDebugHandleValue>()) {
return corValue;
}
corValue = DereferenceUnbox(corValue);
if (corValue != null && corValue.Is<ICorDebugHeapValue2>()) {
return corValue.As<ICorDebugHeapValue2>().CreateHandle(CorDebugHandleType.HANDLE_WEAK_TRACK_RESURRECTION).CastTo<ICorDebugValue>();
} else {
return corValue; // Value type - return value type
}
}
}
public Value GetPermanentReference()
{
ICorDebugValue corValue;
corValue = this.RawCorValue;
corValue = DereferenceUnbox(corValue);
if (corValue.Is<ICorDebugHeapValue2>()) {
corValue = corValue.CastTo<ICorDebugHeapValue2>().CreateHandle(CorDebugHandleType.HANDLE_STRONG).CastTo<ICorDebugValue>();
ICorDebugValue corValue = this.CorValue;
if (this.Type.IsClass) {
corValue = this.CorObjectValue.CastTo<ICorDebugHeapValue2>().CreateHandle(CorDebugHandleType.HANDLE_STRONG).CastTo<ICorDebugValue>();
}
return new Value(process, expression, corValue);
}
internal Value(Process process,
ICorDebugValue rawCorValue)
:this (process, new EmptyExpression(), rawCorValue)
internal Value(Process process, ICorDebugValue corValue)
:this (process, new EmptyExpression(), corValue)
{
}
internal Value(Process process,
Expression expression,
ICorDebugValue rawCorValue)
internal Value(Process process, Expression expression, ICorDebugValue corValue)
{
if (corValue == null) {
throw new ArgumentNullException("corValue");
}
this.process = process;
this.expression = expression;
this.rawCorValue = rawCorValue;
this.rawCorValue_pauseSession = process.PauseSession;
this.corValue = corValue;
this.corValue_pauseSession = process.PauseSession;
if (this.CorValue == null) {
type = DebugType.Create(this.Process, null, "System.Object");
} else {
ICorDebugType exactType = this.CorValue.CastTo<ICorDebugValue2>().ExactType;
type = DebugType.Create(this.Process, exactType);
}
ICorDebugType exactType = this.CorValue.CastTo<ICorDebugValue2>().ExactType;
type = DebugType.Create(this.Process, exactType);
}
/// <summary> Returns the <see cref="Debugger.DebugType"/> of the value </summary>
@ -162,15 +139,12 @@ namespace Debugger @@ -162,15 +139,12 @@ namespace Debugger
/// <summary> Copy the acutal value from some other Value object </summary>
public void SetValue(Value newValue)
{
ICorDebugValue corValue = this.RawCorValue;
ICorDebugValue newCorValue = newValue.RawCorValue;
if (newCorValue.Type == (uint)CorElementType.BYREF) {
newCorValue = newCorValue.As<ICorDebugReferenceValue>().Dereference();
}
ICorDebugValue corValue = this.CorValue;
ICorDebugValue newCorValue = newValue.CorValue;
if (corValue.Is<ICorDebugReferenceValue>()) {
if (newCorValue.Is<ICorDebugObjectValue>()) {
ICorDebugValue box = Eval.NewObjectNoConstructor(newValue.Type).RawCorValue;
ICorDebugValue box = Eval.NewObjectNoConstructor(newValue.Type).CorValue;
newCorValue = box;
}
corValue.CastTo<ICorDebugReferenceValue>().SetValue(newCorValue.CastTo<ICorDebugReferenceValue>().Value);

374
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugTypes.cs

@ -18,6 +18,8 @@ namespace Debugger.Tests.TestPrograms @@ -18,6 +18,8 @@ namespace Debugger.Tests.TestPrograms
public static unsafe void Main()
{
object nullObject = null;
string nullString = null;
int loc = 42;
int locByRef = 43;
int* locPtr = &loc;
@ -30,6 +32,7 @@ namespace Debugger.Tests.TestPrograms @@ -30,6 +32,7 @@ namespace Debugger.Tests.TestPrograms
char[,] locArray = new char[2,2];
Point locStruct;
Point* locStructPtr = &locStruct;
object box = 40;
System.Diagnostics.Debugger.Break();
@ -37,14 +40,16 @@ namespace Debugger.Tests.TestPrograms @@ -37,14 +40,16 @@ namespace Debugger.Tests.TestPrograms
locPtrPtr, locVoidPtr,
locObj, ref locObjByRef,
locSZArray, locArray,
locStruct, ref locStruct, locStructPtr);
locStruct, ref locStruct, locStructPtr,
box, ref box);
}
static unsafe void Fun(int arg, ref int argByRef, int* argPtr, ref int* argPtrByRef,
int** argPtrPtr, void* argVoidPtr,
object argObj, ref object argObjByRef,
char[] argSZArray, char[,] argArray,
Point argStruct, ref Point argStructByRef, Point* argStructPtr)
Point argStruct, ref Point argStructByRef, Point* argStructPtr,
object argBox, ref object argBoxByRef)
{
System.Diagnostics.Debugger.Break();
}
@ -83,7 +88,73 @@ namespace Debugger.Tests { @@ -83,7 +88,73 @@ namespace Debugger.Tests {
<DebuggingPaused>Break</DebuggingPaused>
<LocalVariables
Capacity="16"
Count="12">
Count="15">
<Item>
<Value
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="null"
Expression="nullObject"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="True"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object">
<Type>
<DebugType
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Object"
HasElementType="False"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPrimitive="False"
IsValueType="False"
ManagedType="System.Object"
Module="mscorlib.dll" />
</Type>
</Value>
</Item>
<Item>
<Value
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="null"
Expression="nullString"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="True"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String">
<Type>
<DebugType
BaseType="System.Object"
FullName="System.String"
HasElementType="False"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPrimitive="True"
IsValueType="False"
ManagedType="System.String"
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
</Item>
<Item>
<Value
ArrayDimensions="{Exception: Value is not an array}"
@ -155,30 +226,30 @@ namespace Debugger.Tests { @@ -155,30 +226,30 @@ namespace Debugger.Tests {
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="42"
AsString="{Exception: Unknown value type}"
Expression="locPtr"
IsArray="False"
IsInteger="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="42"
Type="System.Int32">
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32*">
<Type>
<DebugType
BaseType="System.Object"
FullName="System.Int32"
HasElementType="False"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Int32*"
HasElementType="True"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="True"
IsInteger="False"
IsInterface="False"
IsPrimitive="True"
IsPrimitive="False"
IsValueType="False"
ManagedType="System.Int32"
ManagedType="null"
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
@ -188,30 +259,30 @@ namespace Debugger.Tests { @@ -188,30 +259,30 @@ namespace Debugger.Tests {
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="42"
AsString="{Exception: Unknown value type}"
Expression="locPtrByRef"
IsArray="False"
IsInteger="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="42"
Type="System.Int32">
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32*">
<Type>
<DebugType
BaseType="System.Object"
FullName="System.Int32"
HasElementType="False"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Int32*"
HasElementType="True"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="True"
IsInteger="False"
IsInterface="False"
IsPrimitive="True"
IsPrimitive="False"
IsValueType="False"
ManagedType="System.Int32"
ManagedType="null"
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
@ -221,30 +292,30 @@ namespace Debugger.Tests { @@ -221,30 +292,30 @@ namespace Debugger.Tests {
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="42"
AsString="{Exception: Unknown value type}"
Expression="locPtrPtr"
IsArray="False"
IsInteger="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="42"
Type="System.Int32">
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32**">
<Type>
<DebugType
BaseType="System.Object"
FullName="System.Int32"
HasElementType="False"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Int32**"
HasElementType="True"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="True"
IsInteger="False"
IsInterface="False"
IsPrimitive="True"
IsPrimitive="False"
IsValueType="False"
ManagedType="System.Int32"
ManagedType="null"
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
@ -254,31 +325,31 @@ namespace Debugger.Tests { @@ -254,31 +325,31 @@ namespace Debugger.Tests {
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="null"
AsString="{Exception: Unknown value type}"
Expression="locVoidPtr"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="True"
IsNull="False"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object">
Type="System.Void*">
<Type>
<DebugType
BaseType="null"
FullName="System.Object"
HasElementType="False"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Void*"
HasElementType="True"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPrimitive="False"
IsValueType="False"
ManagedType="null"
Module="mscorlib.dll" />
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
</Item>
@ -299,7 +370,7 @@ namespace Debugger.Tests { @@ -299,7 +370,7 @@ namespace Debugger.Tests {
Type="System.Object">
<Type>
<DebugType
BaseType="null"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Object"
HasElementType="False"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
@ -310,7 +381,7 @@ namespace Debugger.Tests { @@ -310,7 +381,7 @@ namespace Debugger.Tests {
IsInterface="False"
IsPrimitive="False"
IsValueType="False"
ManagedType="null"
ManagedType="System.Object"
Module="mscorlib.dll" />
</Type>
</Value>
@ -332,7 +403,7 @@ namespace Debugger.Tests { @@ -332,7 +403,7 @@ namespace Debugger.Tests {
Type="System.Object">
<Type>
<DebugType
BaseType="null"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Object"
HasElementType="False"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
@ -343,7 +414,7 @@ namespace Debugger.Tests { @@ -343,7 +414,7 @@ namespace Debugger.Tests {
IsInterface="False"
IsPrimitive="False"
IsValueType="False"
ManagedType="null"
ManagedType="System.Object"
Module="mscorlib.dll" />
</Type>
</Value>
@ -452,20 +523,53 @@ namespace Debugger.Tests { @@ -452,20 +523,53 @@ namespace Debugger.Tests {
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="{Point}"
AsString="{Exception: Unknown value type}"
Expression="locStructPtr"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Point*">
<Type>
<DebugType
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="Point*"
HasElementType="True"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPrimitive="False"
IsValueType="False"
ManagedType="null"
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
</Item>
<Item>
<Value
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="{System.Int32}"
Expression="box"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="True"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Point">
Type="System.Int32">
<Type>
<DebugType
BaseType="System.ValueType"
FullName="Point"
FullName="System.Int32"
HasElementType="False"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
@ -476,7 +580,7 @@ namespace Debugger.Tests { @@ -476,7 +580,7 @@ namespace Debugger.Tests {
IsPrimitive="False"
IsValueType="True"
ManagedType="null"
Module="DebugTypes.exe" />
Module="mscorlib.dll" />
</Type>
</Value>
</Item>
@ -484,7 +588,7 @@ namespace Debugger.Tests { @@ -484,7 +588,7 @@ namespace Debugger.Tests {
<DebuggingPaused>Break</DebuggingPaused>
<Arguments
Capacity="16"
Count="13">
Count="15">
<Item>
<Value
ArrayDimensions="{Exception: Value is not an array}"
@ -556,30 +660,30 @@ namespace Debugger.Tests { @@ -556,30 +660,30 @@ namespace Debugger.Tests {
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="42"
AsString="{Exception: Unknown value type}"
Expression="argPtr"
IsArray="False"
IsInteger="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="42"
Type="System.Int32">
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32*">
<Type>
<DebugType
BaseType="System.Object"
FullName="System.Int32"
HasElementType="False"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Int32*"
HasElementType="True"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="True"
IsInteger="False"
IsInterface="False"
IsPrimitive="True"
IsPrimitive="False"
IsValueType="False"
ManagedType="System.Int32"
ManagedType="null"
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
@ -589,30 +693,30 @@ namespace Debugger.Tests { @@ -589,30 +693,30 @@ namespace Debugger.Tests {
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="42"
AsString="{Exception: Unknown value type}"
Expression="argPtrByRef"
IsArray="False"
IsInteger="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="42"
Type="System.Int32">
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32*">
<Type>
<DebugType
BaseType="System.Object"
FullName="System.Int32"
HasElementType="False"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Int32*"
HasElementType="True"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="True"
IsInteger="False"
IsInterface="False"
IsPrimitive="True"
IsPrimitive="False"
IsValueType="False"
ManagedType="System.Int32"
ManagedType="null"
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
@ -622,30 +726,30 @@ namespace Debugger.Tests { @@ -622,30 +726,30 @@ namespace Debugger.Tests {
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="42"
AsString="{Exception: Unknown value type}"
Expression="argPtrPtr"
IsArray="False"
IsInteger="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="42"
Type="System.Int32">
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32**">
<Type>
<DebugType
BaseType="System.Object"
FullName="System.Int32"
HasElementType="False"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Int32**"
HasElementType="True"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="True"
IsInteger="False"
IsInterface="False"
IsPrimitive="True"
IsPrimitive="False"
IsValueType="False"
ManagedType="System.Int32"
ManagedType="null"
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
@ -655,31 +759,31 @@ namespace Debugger.Tests { @@ -655,31 +759,31 @@ namespace Debugger.Tests {
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="null"
AsString="{Exception: Unknown value type}"
Expression="argVoidPtr"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="True"
IsNull="False"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object">
Type="System.Void*">
<Type>
<DebugType
BaseType="null"
FullName="System.Object"
HasElementType="False"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Void*"
HasElementType="True"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPrimitive="False"
IsValueType="False"
ManagedType="null"
Module="mscorlib.dll" />
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
</Item>
@ -700,7 +804,7 @@ namespace Debugger.Tests { @@ -700,7 +804,7 @@ namespace Debugger.Tests {
Type="System.Object">
<Type>
<DebugType
BaseType="null"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Object"
HasElementType="False"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
@ -711,7 +815,7 @@ namespace Debugger.Tests { @@ -711,7 +815,7 @@ namespace Debugger.Tests {
IsInterface="False"
IsPrimitive="False"
IsValueType="False"
ManagedType="null"
ManagedType="System.Object"
Module="mscorlib.dll" />
</Type>
</Value>
@ -733,7 +837,7 @@ namespace Debugger.Tests { @@ -733,7 +837,7 @@ namespace Debugger.Tests {
Type="System.Object">
<Type>
<DebugType
BaseType="null"
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="System.Object"
HasElementType="False"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
@ -744,7 +848,7 @@ namespace Debugger.Tests { @@ -744,7 +848,7 @@ namespace Debugger.Tests {
IsInterface="False"
IsPrimitive="False"
IsValueType="False"
ManagedType="null"
ManagedType="System.Object"
Module="mscorlib.dll" />
</Type>
</Value>
@ -886,20 +990,53 @@ namespace Debugger.Tests { @@ -886,20 +990,53 @@ namespace Debugger.Tests {
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="{Point}"
AsString="{Exception: Unknown value type}"
Expression="argStructPtr"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Point*">
<Type>
<DebugType
BaseType="{Exception: Value does not fall within the expected range.}"
FullName="Point*"
HasElementType="True"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPrimitive="False"
IsValueType="False"
ManagedType="null"
Module="{Exception: The type is not a class or value type.}" />
</Type>
</Value>
</Item>
<Item>
<Value
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="{System.Int32}"
Expression="argBox"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="True"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Point">
Type="System.Int32">
<Type>
<DebugType
BaseType="System.ValueType"
FullName="Point"
FullName="System.Int32"
HasElementType="False"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
@ -910,7 +1047,40 @@ namespace Debugger.Tests { @@ -910,7 +1047,40 @@ namespace Debugger.Tests {
IsPrimitive="False"
IsValueType="True"
ManagedType="null"
Module="DebugTypes.exe" />
Module="mscorlib.dll" />
</Type>
</Value>
</Item>
<Item>
<Value
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
AsString="{System.Int32}"
Expression="argBoxByRef"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="True"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32">
<Type>
<DebugType
BaseType="System.ValueType"
FullName="System.Int32"
HasElementType="False"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPrimitive="False"
IsValueType="True"
ManagedType="null"
Module="mscorlib.dll" />
</Type>
</Value>
</Item>

2
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs

@ -143,7 +143,7 @@ namespace Debugger.Tests { @@ -143,7 +143,7 @@ namespace Debugger.Tests {
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object" />
Type="System.String" />
</Item>
<Item>
<Value

Loading…
Cancel
Save