Browse Source

If parameter of a function is a value type unbox it. This does not always work, but it is a better guess.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3466 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 17 years ago
parent
commit
a49fe97ea7
  1. 8
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs
  2. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Primitive.cs

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

@ -236,7 +236,13 @@ namespace Debugger @@ -236,7 +236,13 @@ namespace Debugger
corArgs.Add(thisValue.CorValue);
}
foreach(Value arg in args) {
corArgs.Add(arg.CorValue);
// TODO: It is importatnt to pass the parameted in the correct form (boxed/unboxed)
// This is just a good guess
if (arg.Type.IsValueType) {
corArgs.Add(arg.CorGenericValue.CastTo<ICorDebugValue>());
} else {
corArgs.Add(arg.CorValue);
}
}
ICorDebugType[] genericArgs = method.DeclaringType.GenericArgumentsAsCorDebugType;

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

@ -15,7 +15,7 @@ namespace Debugger @@ -15,7 +15,7 @@ namespace Debugger
// eg int, bool, string
public partial class Value
{
ICorDebugGenericValue CorGenericValue {
internal ICorDebugGenericValue CorGenericValue {
get {
if (!this.Type.IsPrimitive && !this.Type.IsValueType) throw new DebuggerException("Value is not a 'generic'");

Loading…
Cancel
Save