Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/debugger-libs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Karlaš <david.karlas@xamarin.com>2016-02-29 15:13:26 +0300
committerDavid Karlaš <david.karlas@xamarin.com>2016-02-29 15:13:26 +0300
commit8152fe367f5ad03058056e4358ce1972d59ea31b (patch)
tree36ae7cc6c872552d20ef23841a371b268235410b
parent03c4af4b2e552b7381a5a172c52ab69607565510 (diff)
parentccb50d1b3afb1f1ffbdea71b0f757f112c03e4e7 (diff)
Merge pull request #71 from joj/cycle6cycle6
Bug 33614 - [Roslyn] Crash in debugger after pausing
-rw-r--r--Mono.Debugging.Soft/SoftDebuggerSession.cs14
-rw-r--r--Mono.Debugging/Mono.Debugging.Client/ProcessInfo.cs11
2 files changed, 11 insertions, 14 deletions
diff --git a/Mono.Debugging.Soft/SoftDebuggerSession.cs b/Mono.Debugging.Soft/SoftDebuggerSession.cs
index 7a3213b..96b97ab 100644
--- a/Mono.Debugging.Soft/SoftDebuggerSession.cs
+++ b/Mono.Debugging.Soft/SoftDebuggerSession.cs
@@ -720,11 +720,15 @@ namespace Mono.Debugging.Soft
return name;
}
- protected override void OnFetchFrames (ThreadInfo[] threads)
+ protected override void OnFetchFrames (ThreadInfo [] threads)
{
- var mirrorThreads = new ThreadMirror[threads.Length];
- for (int i = 0; i < threads.Length; i++)
- mirrorThreads [i] = GetThread (threads [i].Id);
+ var mirrorThreads = new List<ThreadMirror> (threads.Length);
+ for (int i = 0; i < threads.Length; i++) {
+ var thread = GetThread (threads [i].Id);
+ if (thread != null) {
+ mirrorThreads.Add (thread);
+ }
+ }
ThreadMirror.FetchFrames (mirrorThreads);
}
@@ -1912,6 +1916,7 @@ namespace Mono.Debugging.Soft
void HandleThreadStartEvents (ThreadStartEvent[] events)
{
+ current_threads = null;
var thread = events [0].Thread;
if (events.Length > 1 && events.Any (a => a.Thread != thread))
throw new InvalidOperationException ("Simultaneous ThreadStartEvents for multiple threads");
@@ -1926,6 +1931,7 @@ namespace Mono.Debugging.Soft
void HandleThreadDeathEvents (ThreadDeathEvent[] events)
{
+ current_threads = null;
var thread = events [0].Thread;
if (events.Length > 1 && events.Any (a => a.Thread != thread))
throw new InvalidOperationException ("Simultaneous ThreadDeathEvents for multiple threads");
diff --git a/Mono.Debugging/Mono.Debugging.Client/ProcessInfo.cs b/Mono.Debugging/Mono.Debugging.Client/ProcessInfo.cs
index a972965..cf14162 100644
--- a/Mono.Debugging/Mono.Debugging.Client/ProcessInfo.cs
+++ b/Mono.Debugging/Mono.Debugging.Client/ProcessInfo.cs
@@ -36,18 +36,11 @@ namespace Mono.Debugging.Client
string name;
[NonSerialized]
- ThreadInfo[] currentThreads;
-
- [NonSerialized]
DebuggerSession session;
internal void Attach (DebuggerSession session)
{
this.session = session;
- if (currentThreads != null) {
- foreach (ThreadInfo t in currentThreads)
- t.Attach (session);
- }
}
public long Id {
@@ -70,9 +63,7 @@ namespace Mono.Debugging.Client
public ThreadInfo[] GetThreads ()
{
- if (currentThreads == null)
- currentThreads = session.GetThreads (id);
- return currentThreads;
+ return session.GetThreads (id);
}
}
}