From: David Karlaš Date: Wed, 28 May 2014 10:58:38 +0000 (+0200) Subject: Changed API for fetching StackFrames in bulk on multiple threads ThreadMirror.FetchFr... X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=8a4a61c13ca78470158e072bf6c8ec4e09a62855;p=mono.git Changed API for fetching StackFrames in bulk on multiple threads ThreadMirror.FetchFrames instead of automatically on VirtualMachine.GetThreads --- diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs index e8e2574d18d..bf248278690 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs @@ -62,6 +62,17 @@ namespace Mono.Debugger.Soft }); } + public static void FetchFrames(IList 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) diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs index c7c55c0f7a3..af027d808a3 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs @@ -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; }