diff options
author | Thays Grazia <thaystg@gmail.com> | 2020-01-28 15:43:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 15:43:22 +0300 |
commit | 5e5b5efb6c10cb2b48dbab37f97ca7ac7a67edb2 (patch) | |
tree | 11767a833aa6f787771036c7df9da955d8c7b125 /Mono.Debugger.Soft | |
parent | 4ebcdcc4f6187b236c63335843f4074e6e630bde (diff) |
Related to https://github.com/mono/mono/pull/18537 (#287)
Diffstat (limited to 'Mono.Debugger.Soft')
-rw-r--r-- | Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs b/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs index 3fa359f..d407b41 100644 --- a/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs +++ b/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs @@ -48,6 +48,25 @@ namespace Mono.Debugger.Soft get { return type; } } + // Since protocol version 2.46 + public Value Value { + get { + ValueImpl value; + if (Address == 0) + return null; + try { + value = vm.conn.Pointer_GetValue (Address, Type); + } + catch (CommandException ex) { + if (ex.ErrorCode == ErrorCode.INVALID_ARGUMENT) + throw new ArgumentException ("Invalid pointer address."); + else + throw; + } + return vm.DecodeValue (value); + } + } + public override bool Equals (object obj) { if (obj != null && obj is PointerValue) return addr == (obj as PointerValue).addr; |