diff options
author | David Karlaš <david.karlas@xamarin.com> | 2014-08-26 00:19:22 +0400 |
---|---|---|
committer | David Karlaš <david.karlas@xamarin.com> | 2014-08-26 00:19:22 +0400 |
commit | efe5c0519566e778a5bec4de72a741dd713840a7 (patch) | |
tree | a240324b97127cfe438c73c130cce614193366ad /main/src/addins/MonoDevelop.HexEditor | |
parent | e703a57058098e8e5dc732b5b09f34ac69f0b68c (diff) | |
parent | b515603c137bb37d916f64c603150c93a8ebab40 (diff) |
Merge branch 'master' into debuggerVisualizers
Conflicts:
main/external/debugger-libs
main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs
Diffstat (limited to 'main/src/addins/MonoDevelop.HexEditor')
-rw-r--r-- | main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs index 2ffd772aa1..c507c137c4 100644 --- a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs +++ b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs @@ -85,15 +85,18 @@ namespace MonoDevelop.HexEditor public override Widget GetVisualizerWidget (ObjectValue val) { - hexEditor = new Mono.MHex.HexEditor (); + var options = DebuggingService.DebuggerSession.EvaluationOptions.Clone (); + options.AllowTargetInvoke = true; + options.ChunkRawStrings = true; IBuffer buffer = null; + hexEditor = new Mono.MHex.HexEditor (); if (val.TypeName != null && val.TypeName.EndsWith ("Foundation.NSData")) { var raw = (RawValueArray)((RawValue)val.GetRawValue ()).CallMethod ("ToArray"); buffer = new RawByteArrayBuffer (raw); } else if (val.TypeName != "string") { - var raw = (RawValueArray)val.GetRawValue (); + var raw = (RawValueArray)val.GetRawValue (options); switch (val.TypeName) { case "sbyte[]": @@ -107,10 +110,7 @@ namespace MonoDevelop.HexEditor break; } } else { - var ops = DebuggingService.DebuggerSession.EvaluationOptions.Clone (); - ops.ChunkRawStrings = true; - - buffer = new RawStringBuffer ((RawValueString)val.GetRawValue (ops)); + buffer = new RawStringBuffer ((RawValueString)val.GetRawValue (options)); } hexEditor.HexEditorData.Buffer = buffer; @@ -126,13 +126,17 @@ namespace MonoDevelop.HexEditor public override bool StoreValue (ObjectValue val) { + var options = DebuggingService.DebuggerSession.EvaluationOptions.Clone (); + options.AllowTargetInvoke = true; + switch (val.TypeName) { case "byte[]": // HACK: make sure to load the full byte stream... long length = hexEditor.HexEditorData.Length; + hexEditor.HexEditorData.GetBytes (length - 1, 1); - val.SetRawValue (hexEditor.HexEditorData.Bytes); + val.SetRawValue (hexEditor.HexEditorData.Bytes, options); return true; default: return false; |