Skip to content

Commit

Permalink
use HandleCollection for goto targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Trass3r committed Sep 9, 2020
1 parent 464d27f commit 59c8b02
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/OpenDebugAD7/AD7DebugSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal sealed class AD7DebugSession : DebugAdapterBase, IDebugPortNotify2, IDe

private readonly DebugEventLogger m_logger;
private readonly Dictionary<string, Dictionary<int, IDebugPendingBreakpoint2>> m_breakpoints;
private readonly List<IDebugCodeContext2> m_gotoCodeContexts = new List<IDebugCodeContext2>();
private readonly HandleCollection<IDebugCodeContext2> m_gotoCodeContexts = new HandleCollection<IDebugCodeContext2>();

private Dictionary<string, IDebugPendingBreakpoint2> m_functionBreakpoints;
private readonly Dictionary<int, ThreadFrameEnumInfo> m_threadFrameEnumInfos = new Dictionary<int, ThreadFrameEnumInfo>();
Expand Down Expand Up @@ -1258,8 +1258,7 @@ protected override void HandleGotoTargetsRequestAsync(IRequestResponder<GotoTarg
var codeContext = codeContexts[0];
string contextName;
codeContext.GetName(out contextName);
m_gotoCodeContexts.Add(codeContext);
targets.Add(new GotoTarget(m_gotoCodeContexts.Count - 1, contextName, responder.Arguments.Line)); // TODO: get the real line
targets.Add(new GotoTarget(m_gotoCodeContexts.Create(codeContext), contextName, responder.Arguments.Line)); // TODO: get the real line
}
}

Expand Down

0 comments on commit 59c8b02

Please sign in to comment.