if ((CpuContext->Dr6 & BIT14) != 0) {\r
Cause = DEBUG_DATA_BREAK_CAUSE_STEPPING;\r
//\r
- // If it's single step, no need to check DR0, to ensure single step work in PeCoffExtraActionLib\r
- // (right after triggering a breakpoint to report image load/unload).\r
+ // DR6.BIT14 Indicates (when set) that the debug exception was\r
+ // triggered by the single step execution mode.\r
+ // The single-step mode is the highest priority debug exception.\r
+ // This is single step, no need to check DR0, to ensure single step\r
+ // work in PeCoffExtraActionLib (right after triggering a breakpoint\r
+ // to report image load/unload).\r
//\r
return Cause;\r
\r
// Check if this exception is issued by Debug Agent itself\r
// If yes, fill the debug agent exception buffer and LongJump() back to\r
// the saved CPU content in CommandCommunication()\r
+ // If exception is issued when executing Stepping, will be handled in\r
+ // exception handle procedure.\r
//\r
if (GetDebugFlag (DEBUG_AGENT_FLAG_AGENT_IN_PROGRESS) == 1) {\r
- DebugAgentMsgPrint (DEBUG_AGENT_ERROR, "Debug agent meet one Exception, ExceptionNum is %d, EIP = 0x%x.\n", Vector, (UINTN)CpuContext->Eip);\r
+ DebugAgentMsgPrint (\r
+ DEBUG_AGENT_ERROR,\r
+ "Debug agent meet one Exception, ExceptionNum is %d, EIP = 0x%x.\n",\r
+ Vector,\r
+ (UINTN)CpuContext->Eip\r
+ );\r
ExceptionBuffer = (DEBUG_AGENT_EXCEPTION_BUFFER *) (UINTN) GetMailboxPointer()->ExceptionBufferPointer;\r
ExceptionBuffer->ExceptionContent.ExceptionNum = (UINT8) Vector;\r
ExceptionBuffer->ExceptionContent.ExceptionData = (UINT32) CpuContext->ExceptionData;\r
\r
default:\r
if (Vector <= DEBUG_EXCEPT_SIMD) {\r
+ DebugAgentMsgPrint (\r
+ DEBUG_AGENT_ERROR,\r
+ "Exception happened, ExceptionNum is %d, EIP = 0x%x.\n",\r
+ Vector,\r
+ (UINTN) CpuContext->Eip\r
+ );\r
if (BreakCause == DEBUG_DATA_BREAK_CAUSE_STEPPING) {\r
//\r
- // Stepping is finished, send Ack package.\r
+ // If exception happened when executing Stepping, send Ack package.\r
+ // HOST consider Stepping command was finished.\r
//\r
if (MultiProcessorDebugSupport()) {\r
mDebugMpContext.BreakAtCpuIndex = ProcessorIndex;\r