summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2015-04-21 03:14:29 +0000
committervanjeff <vanjeff@Edk2>2015-04-21 03:14:29 +0000
commitedb4cd76c4f9889d61827d817e031614484dd7ec (patch)
tree6432aa56cc0f83118bc9d2b75d3ceec5003d1f92
parent40ad4b1a6bd2d17b6bd3f0a14f65392a7b7249a1 (diff)
downloadedk2-edb4cd76c4f9889d61827d817e031614484dd7ec.zip
edk2-edb4cd76c4f9889d61827d817e031614484dd7ec.tar.gz
edk2-edb4cd76c4f9889d61827d817e031614484dd7ec.tar.bz2
SourceLevelDebugPkg: Clear Stepping flag as early as possible
It will avoid that exception issued by Debug Agent itself was skipped. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17190 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c
index 42b73f6..f51ad4b 100644
--- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c
+++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c
@@ -1952,10 +1952,6 @@ CommandCommunication (
if (Data8 == DEBUG_DATA_BREAK_CAUSE_IMAGE_LOAD || Data8 == DEBUG_DATA_BREAK_CAUSE_IMAGE_UNLOAD) {
CpuContext->Dr0 = 0;
}
- //
- // Clear Stepping Flag
- //
- SetDebugFlag (DEBUG_AGENT_FLAG_STEPPING, 0);
if (!HaltDeferred) {
//
@@ -2410,6 +2406,10 @@ InterruptProcess (
mDebugMpContext.BreakAtCpuIndex = ProcessorIndex;
}
SendAckPacket (DEBUG_COMMAND_OK);
+ //
+ // Clear Stepping Flag
+ //
+ SetDebugFlag (DEBUG_AGENT_FLAG_STEPPING, 0);
CommandCommunication (Vector, CpuContext, BreakReceived);
break;