2008-03-14 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Fri, 14 Mar 2008 17:58:20 +0000 (17:58 -0000)
committerMartin Baulig <martin@novell.com>
Fri, 14 Mar 2008 17:58:20 +0000 (17:58 -0000)
* symbolwriter.cs: Added the new symbol writer function from the
debugger's `terrania' branch; temporarily enclose them inside
`#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
my vacations.

svn path=/trunk/mcs/; revision=98304

mcs/mcs/ChangeLog
mcs/mcs/symbolwriter.cs

index 33659e7da7815bc34f9b49582279ca1d7f052f4f..bf3439bbd079b719d189a51e096f3fcaa19bb857 100644 (file)
@@ -1,3 +1,10 @@
+2008-03-14  Martin Baulig  <martin@ximian.com>
+
+       * symbolwriter.cs: Added the new symbol writer function from the
+       debugger's `terrania' branch; temporarily enclose them inside
+       `#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
+       my vacations.
+
 2008-03-14  Martin Baulig  <martin@ximian.com>
 
        * symbolwriter.cs
index f5a3adff420d697a5caa6ca21a96ae682b4d6401..df9014613f41f38269ba40f6125a5b8e91666ac3 100644 (file)
@@ -125,6 +125,136 @@ namespace Mono.CSharp {
                                return -1;
                }
 
+#region Terrania additions
+               public static void DefineAnonymousScope (int id)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null)
+                               symwriter.DefineAnonymousScope (id);
+#endif
+               }
+
+               public static void DefineScopeVariable (int scope, LocalBuilder builder)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null) {
+                               int index = MonoDebuggerSupport.GetLocalIndex (builder);
+                               symwriter.DefineScopeVariable (scope, index);
+                       }
+#endif
+               }
+
+               public static void DefineScopeVariable (int scope)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null)
+                               symwriter.DefineScopeVariable (scope, -1);
+#endif
+               }
+
+               public static void DefineCapturedLocal (int scope_id, string name,
+                                                       string captured_name)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null)
+                               symwriter.DefineCapturedLocal (scope_id, name, captured_name);
+#endif
+               }
+
+               public static void DefineCapturedParameter (int scope_id, string name,
+                                                           string captured_name)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null)
+                               symwriter.DefineCapturedParameter (scope_id, name, captured_name);
+#endif
+               }
+
+               public static void DefineCapturedThis (int scope_id, string captured_name)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null)
+                               symwriter.DefineCapturedThis (scope_id, captured_name);
+#endif
+               }
+
+               public static void DefineCapturedScope (int scope_id, int id, string captured_name)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null)
+                               symwriter.DefineCapturedScope (scope_id, id, captured_name);
+#endif
+               }
+
+               public static void SetRealMethodName (string name)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null)
+                               symwriter.SetRealMethodName (name);
+#endif
+               }
+
+               public static void OpenCompilerGeneratedBlock (ILGenerator ig)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null) {
+                               int offset = symwriter.GetILOffset (ig);
+                               symwriter.OpenCompilerGeneratedBlock (offset);
+                       }
+#endif
+               }
+
+               public static void CloseCompilerGeneratedBlock (ILGenerator ig)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null) {
+                               int offset = symwriter.GetILOffset (ig);
+                               symwriter.CloseCompilerGeneratedBlock (offset);
+                       }
+#endif
+               }
+
+               public static void StartIteratorBody (ILGenerator ig)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null) {
+                               int offset = symwriter.GetILOffset (ig);
+                               symwriter.StartIteratorBody (offset);
+                       }
+#endif
+               }
+
+               public static void EndIteratorBody (ILGenerator ig)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null) {
+                               int offset = symwriter.GetILOffset (ig);
+                               symwriter.EndIteratorBody (offset);
+                       }
+#endif
+               }
+
+               public static void StartIteratorDispatcher (ILGenerator ig)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null) {
+                               int offset = symwriter.GetILOffset (ig);
+                               symwriter.StartIteratorDispatcher (offset);
+                       }
+#endif
+               }
+
+               public static void EndIteratorDispatcher (ILGenerator ig)
+               {
+#if !DISABLE_TERRANIA_CHANGES
+                       if (symwriter != null) {
+                               int offset = symwriter.GetILOffset (ig);
+                               symwriter.EndIteratorDispatcher (offset);
+                       }
+#endif
+               }
+#endregion
+
                public static void MarkSequencePoint (ILGenerator ig, int row, int column)
                {
                        if (symwriter != null) {