Skip to content

Commit 5e5b5ef

Browse files
authored
Related to mono/mono#18537 (#287)
1 parent 4ebcdcc commit 5e5b5ef

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,25 @@ public TypeMirror Type {
4848
get { return type; }
4949
}
5050

51+
// Since protocol version 2.46
52+
public Value Value {
53+
get {
54+
ValueImpl value;
55+
if (Address == 0)
56+
return null;
57+
try {
58+
value = vm.conn.Pointer_GetValue (Address, Type);
59+
}
60+
catch (CommandException ex) {
61+
if (ex.ErrorCode == ErrorCode.INVALID_ARGUMENT)
62+
throw new ArgumentException ("Invalid pointer address.");
63+
else
64+
throw;
65+
}
66+
return vm.DecodeValue (value);
67+
}
68+
}
69+
5170
public override bool Equals (object obj) {
5271
if (obj != null && obj is PointerValue)
5372
return addr == (obj as PointerValue).addr;

0 commit comments

Comments
 (0)