Changed API for fetching StackFrames in bulk on multiple threads ThreadMirror.FetchFr...
authorDavid Karlaš <david.karlas@xamarin.com>
Wed, 28 May 2014 10:58:38 +0000 (12:58 +0200)
committerDavid Karlaš <david.karlas@xamarin.com>
Wed, 28 May 2014 10:58:38 +0000 (12:58 +0200)
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs

index e8e2574d18d0fd882576da911d261ac74d81ecf4..bf2482786901af7a3330b60837d753d76c11f809 100644 (file)
@@ -62,6 +62,17 @@ namespace Mono.Debugger.Soft
                        });
                }
 
+               public static void FetchFrames(IList<ThreadMirror> threads)
+               {
+                       if (threads.Count == 0)
+                               return;
+                       threads [0].vm.conn.StartBuffering ();
+                       foreach (var thread in threads) {
+                               thread.FetchFrames ();
+                       }
+                       threads [0].vm.conn.StopBuffering ();
+               }
+
                public string Name {
                        get {
                                if (name == null)
index c7c55c0f7a3b46c5063e5de1de176cfc408dd2a5..af027d808a367e63e594eace723027c60e8f05dd 100644 (file)
@@ -187,12 +187,6 @@ namespace Mono.Debugger.Soft
                                        threadsCache = new ThreadMirror [ids.Length];
                                        for (int i = 0; i < ids.Length; ++i)
                                                threadsCache [i] = GetThread (ids [i]);
-                                       if (Version.AtLeast (2, 34)) {
-                                               conn.StartBuffering ();
-                                               foreach (var thread in threadsCache)
-                                                       thread.FetchFrames ();
-                                               conn.StopBuffering ();
-                                       }
                                }
                                return threadsCache;
                        }