Skip to content
Prev Previous commit
Next Next commit
Addressing PR issues
  • Loading branch information
WardenGnaw committed Jan 29, 2021
commit 8fe364ac26c76a26ab77caff01965d9328d21bd7
10 changes: 6 additions & 4 deletions src/OpenDebugAD7/AD7DebugSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public void BeforeContinue()
m_isStopped = false;
m_variableManager.Reset();
m_frameHandles.Reset();
m_gotoCodeContexts.Clear();
m_gotoCodeContexts.Clear();
}

public void Stopped(IDebugThread2 thread)
Expand Down Expand Up @@ -1326,15 +1326,16 @@ protected override void HandlePauseRequestAsync(IRequestResponder<PauseArguments

protected override void HandleGotoRequestAsync(IRequestResponder<GotoArguments> responder)
{
responder.SetError(new ProtocolException("Not implemented exception."));
responder.SetError(new ProtocolException(AD7Resources.Error_NotImplementedSetNextStatement));
}

protected override void HandleGotoTargetsRequestAsync(IRequestResponder<GotoTargetsArguments, GotoTargetsResponse> responder)
{
var response = new GotoTargetsResponse();

var source = responder.Arguments.Source;
// TODO: handle this for disassembly debugging

// Virtual documents don't have paths
if (source.Path == null)
{
responder.SetResponse(response);
Expand Down Expand Up @@ -1373,7 +1374,8 @@ protected override void HandleGotoTargetsRequestAsync(IRequestResponder<GotoTarg

string instructionPointerReference = null;
CONTEXT_INFO[] contextInfo = new CONTEXT_INFO[1];
if (codeContext.GetInfo(enum_CONTEXT_INFO_FIELDS.CIF_ADDRESS, contextInfo) == HRConstants.S_OK)
if (codeContext.GetInfo(enum_CONTEXT_INFO_FIELDS.CIF_ADDRESS, contextInfo) == HRConstants.S_OK &&
contextInfo[0].dwFields.HasFlag(enum_CONTEXT_INFO_FIELDS.CIF_ADDRESS))
{
instructionPointerReference = contextInfo[0].bstrAddress;
}
Expand Down
28 changes: 18 additions & 10 deletions src/OpenDebugAD7/AD7Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/OpenDebugAD7/AD7Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,7 @@
<data name="Error_Scenario_StackTrace" xml:space="preserve">
<value>Unable to retrieve stack trace. {0}</value>
</data>
<data name="Error_NotImplementedSetNextStatement" xml:space="preserve">
<value>Set next statement is not supported by the current debugger.</value>
</data>
</root>