[Mono.Debugger.Soft] Implement StackFrame.Domain
[mono.git] / mcs / class / Mono.Debugger.Soft / Mono.Debugger.Soft / StackFrame.cs
index 034c6fc8a731c0825fdab7be546f96f202459c47..8549a93700afaf54b7b1e67d4e40a93a842729f5 100644 (file)
@@ -7,6 +7,7 @@ namespace Mono.Debugger.Soft
        public class StackFrame : Mirror
        {
                ThreadMirror thread;
+               AppDomainMirror domain;
                MethodMirror method;
                int il_offset;
                Location location;
@@ -32,6 +33,16 @@ namespace Mono.Debugger.Soft
                        }
                }
 
+               public AppDomainMirror Domain {
+                       get {
+                               vm.CheckProtocolVersion (2, 38);
+                               if (domain == null)
+                                       domain = vm.GetDomain (vm.conn.StackFrame_GetDomain (thread.Id, Id));
+
+                               return domain;
+                       }
+               }
+
                public MethodMirror Method {
                        get {
                                return method;
@@ -44,13 +55,16 @@ namespace Mono.Debugger.Soft
                                        int line_number;
                                        string src_file = null;
                                        byte[] hash = null;
+                                       int column_number = 0;
+                                       int end_line_number = -1;
+                                       int end_column_number = -1;
 
                                        if (il_offset == -1)
                                                line_number = -1;
                                        else
-                                               line_number = method.il_offset_to_line_number (il_offset, out src_file, out hash);
+                                               line_number = method.il_offset_to_line_number (il_offset, out src_file, out hash, out column_number, out end_line_number, out end_column_number);
 
-                                       location = new Location (vm, Method, 0, il_offset, src_file != null ? src_file : method.SourceFile, line_number, 0, hash);
+                                       location = new Location (vm, Method, 0, il_offset, src_file != null ? src_file : method.SourceFile, line_number, column_number, end_line_number, end_column_number, hash);
                                }
                                return location;
                        }
@@ -60,7 +74,7 @@ namespace Mono.Debugger.Soft
                        get {
                                return Location.SourceFile;
                        }
-           }
+               }
 
                public int ILOffset {
                        get {
@@ -72,7 +86,13 @@ namespace Mono.Debugger.Soft
                        get {
                                return Location.LineNumber;
                        }
-           }
+               }
+
+               public int ColumnNumber {
+                       get {
+                               return Location.ColumnNumber;
+                       }
+               }
 
                public bool IsDebuggerInvoke {
                        get {