[Mono.Debugger.Soft] Added PointerValue.cs
authorJeffrey Stedfast <jeff@xamarin.com>
Sat, 28 Apr 2012 00:49:07 +0000 (20:49 -0400)
committerJeffrey Stedfast <jeff@xamarin.com>
Sat, 28 Apr 2012 00:49:07 +0000 (20:49 -0400)
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft-net_2_0.csproj
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft-net_4_0.csproj
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft-net_4_5.csproj
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft.dll.sources
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs [new file with mode: 0644]

index 38aaadeb70954a9fe34d29640dbc103d430977bf..9fc20335d8b55e32f5f07d67afc0d6fdb9c4434c 100644 (file)
@@ -54,6 +54,7 @@
    <Compile Include="Mono.Debugger.Soft\ILInstruction.cs" />
    <Compile Include="Mono.Debugger.Soft\InterfaceMappingMirror.cs" />
    <Compile Include="Mono.Debugger.Soft\PrimitiveValue.cs" />
+   <Compile Include="Mono.Debugger.Soft\PointerValue.cs" />
    <Compile Include="Mono.Debugger.Soft\VMDisconnectedException.cs" />
    <Compile Include="Mono.Debugger.Soft\Mirror.cs" />
    <Compile Include="Mono.Debugger.Soft\EnumMirror.cs" />
index d5335bb42148a4a4d42f21fc259979654f29d0ab..0bb1b993035ed04a2d34847384f01e1e32fb09d0 100644 (file)
@@ -54,6 +54,7 @@
    <Compile Include="Mono.Debugger.Soft\ILInstruction.cs" />
    <Compile Include="Mono.Debugger.Soft\InterfaceMappingMirror.cs" />
    <Compile Include="Mono.Debugger.Soft\PrimitiveValue.cs" />
+   <Compile Include="Mono.Debugger.Soft\PointerValue.cs" />
    <Compile Include="Mono.Debugger.Soft\VMDisconnectedException.cs" />
    <Compile Include="Mono.Debugger.Soft\Mirror.cs" />
    <Compile Include="Mono.Debugger.Soft\EnumMirror.cs" />
index ffcd8c49d63a8422333123e42d3ed5a2b7be87c4..fe9c5b61acac742074499f750268ac8beee3f9c7 100644 (file)
@@ -54,6 +54,7 @@
    <Compile Include="Mono.Debugger.Soft\ILInstruction.cs" />
    <Compile Include="Mono.Debugger.Soft\InterfaceMappingMirror.cs" />
    <Compile Include="Mono.Debugger.Soft\PrimitiveValue.cs" />
+   <Compile Include="Mono.Debugger.Soft\PointerValue.cs" />
    <Compile Include="Mono.Debugger.Soft\VMDisconnectedException.cs" />
    <Compile Include="Mono.Debugger.Soft\Mirror.cs" />
    <Compile Include="Mono.Debugger.Soft\EnumMirror.cs" />
index a7cc5d555f48a93399d7e27d06254455260748d9..803efd849ba58d335e5485a9e4d43b1fdfcf38f4 100644 (file)
@@ -14,6 +14,7 @@ Mono.Debugger.Soft/ThreadStartEvent.cs
 Mono.Debugger.Soft/ILInstruction.cs
 Mono.Debugger.Soft/InterfaceMappingMirror.cs
 Mono.Debugger.Soft/PrimitiveValue.cs
+Mono.Debugger.Soft/PointerValue.cs
 Mono.Debugger.Soft/VMDisconnectedException.cs
 Mono.Debugger.Soft/Mirror.cs
 Mono.Debugger.Soft/EnumMirror.cs
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs
new file mode 100644 (file)
index 0000000..87c2c25
--- /dev/null
@@ -0,0 +1,63 @@
+// 
+// PointerValue.cs
+//  
+// Author: Jeffrey Stedfast <jeff@xamarin.com>
+// 
+// Copyright (c) 2012 Xamarin Inc.
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+
+namespace Mono.Debugger.Soft
+{
+       /*
+        * Represents a value of a pointer type in the debuggee
+        */
+       public class PointerValue : Value {
+               long addr;
+
+               public PointerValue (VirtualMachine vm, long addr) : base (vm, 0) {
+                       this.addr = addr;
+               }
+
+               public long Address {
+                       get { return addr; }
+               }
+
+               public object Value {
+                       get { return addr; }
+               }
+
+               public override bool Equals (object obj) {
+                       if (obj != null && obj is PointerValue)
+                               return addr == (obj as PointerValue).addr;
+                       return base.Equals (obj);
+               }
+
+               public override int GetHashCode () {
+                       return base.GetHashCode ();
+               }
+
+               public override string ToString () {
+                       return string.Format ("PointerValue<0x{0:x}>", addr);
+               }
+       }
+}