Revision: 17206
http://sourceforge.net/p/edk2/code/17206
Author: vanjeff
Date: 2015-04-27 05:26:03 +0000 (Mon, 27 Apr 2015)
Log Message:
-----------
SourceLevelDebugPkg/DebugAgent: Add some comments and debug message
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Modified Paths:
--------------
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c
Modified:
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c
===================================================================
---
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c
2015-04-27 05:25:03 UTC (rev 17205)
+++
trunk/edk2/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.c
2015-04-27 05:26:03 UTC (rev 17206)
@@ -1335,8 +1335,12 @@
if ((CpuContext->Dr6 & BIT14) != 0) {
Cause = DEBUG_DATA_BREAK_CAUSE_STEPPING;
//
- // If it's single step, no need to check DR0, to ensure single step
work in PeCoffExtraActionLib
- // (right after triggering a breakpoint to report image load/unload).
+ // DR6.BIT14 Indicates (when set) that the debug exception was
+ // triggered by the single step execution mode.
+ // The single-step mode is the highest priority debug exception.
+ // This is single step, no need to check DR0, to ensure single step
+ // work in PeCoffExtraActionLib (right after triggering a breakpoint
+ // to report image load/unload).
//
return Cause;
@@ -2392,9 +2396,16 @@
// Check if this exception is issued by Debug Agent itself
// If yes, fill the debug agent exception buffer and LongJump() back to
// the saved CPU content in CommandCommunication()
+ // If exception is issued when executing Stepping, will be handled in
+ // exception handle procedure.
//
if (GetDebugFlag (DEBUG_AGENT_FLAG_AGENT_IN_PROGRESS) == 1) {
- DebugAgentMsgPrint (DEBUG_AGENT_ERROR, "Debug agent meet one Exception,
ExceptionNum is %d, EIP = 0x%x.\n", Vector, (UINTN)CpuContext->Eip);
+ DebugAgentMsgPrint (
+ DEBUG_AGENT_ERROR,
+ "Debug agent meet one Exception, ExceptionNum is %d, EIP = 0x%x.\n",
+ Vector,
+ (UINTN)CpuContext->Eip
+ );
ExceptionBuffer = (DEBUG_AGENT_EXCEPTION_BUFFER *) (UINTN)
GetMailboxPointer()->ExceptionBufferPointer;
ExceptionBuffer->ExceptionContent.ExceptionNum = (UINT8) Vector;
ExceptionBuffer->ExceptionContent.ExceptionData = (UINT32)
CpuContext->ExceptionData;
@@ -2604,9 +2615,16 @@
default:
if (Vector <= DEBUG_EXCEPT_SIMD) {
+ DebugAgentMsgPrint (
+ DEBUG_AGENT_ERROR,
+ "Exception happened, ExceptionNum is %d, EIP = 0x%x.\n",
+ Vector,
+ (UINTN) CpuContext->Eip
+ );
if (BreakCause == DEBUG_DATA_BREAK_CAUSE_STEPPING) {
//
- // Stepping is finished, send Ack package.
+ // If exception happened when executing Stepping, send Ack package.
+ // HOST consider Stepping command was finished.
//
if (MultiProcessorDebugSupport()) {
mDebugMpContext.BreakAtCpuIndex = ProcessorIndex;
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits