Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs')
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs
index 2cf9dfa418b..d407b417b51 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs
@@ -51,10 +51,19 @@ namespace Mono.Debugger.Soft
// Since protocol version 2.46
public Value Value {
get {
+ ValueImpl value;
if (Address == 0)
return null;
-
- return vm.DecodeValue (vm.conn.Pointer_GetValue (Address, Type));
+ 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);
}
}