From 715ff09b936c3fe225ade28dcf5a5b007da73cdd Mon Sep 17 00:00:00 2001 From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498> Date: Sat, 24 Jul 2010 23:07:32 +0000 Subject: [PATCH] --- .../Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Engine.cs | 6 ++---- .../Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Process.cs | 8 +++----- .../Engine.Impl/BreakpointManager.cs | 10 ++++++---- source2/Debug/Cosmos.Debug.VSDebugEngine/ReadMe.html | 1 + 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Engine.cs b/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Engine.cs index c944a7e38..1dc42de23 100644 --- a/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Engine.cs +++ b/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Engine.cs @@ -205,14 +205,12 @@ namespace Cosmos.Debug.VSDebugEngine { // Creates a pending breakpoint in the engine. A pending breakpoint is contains all the information needed to bind a breakpoint to // a location in the debuggee. - int IDebugEngine2.CreatePendingBreakpoint(IDebugBreakpointRequest2 pBPRequest, out IDebugPendingBreakpoint2 ppPendingBP) - { + int IDebugEngine2.CreatePendingBreakpoint(IDebugBreakpointRequest2 pBPRequest, out IDebugPendingBreakpoint2 ppPendingBP) { Trace.WriteLine(new StackTrace(false).GetFrame(0).GetMethod().GetFullName()); System.Diagnostics.Debug.Assert(m_breakpointManager != null); ppPendingBP = null; - try - { + try { m_breakpointManager.CreatePendingBreakpoint(pBPRequest, out ppPendingBP); } catch (Exception e) diff --git a/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Process.cs b/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Process.cs index 931e1078c..8e0f43324 100644 --- a/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Process.cs +++ b/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Process.cs @@ -242,11 +242,9 @@ namespace Cosmos.Debug.VSDebugEngine mEngine.Callback.OnOutputString("Hit Breakpoint 0x" + xActualAddress.ToString("X8").ToUpper()); var xActionPoints = new List(); var xBoundBreakpoints = new List(); - foreach (var xBP in mEngine.m_breakpointManager.m_pendingBreakpoints) - { - foreach(var xBBP in xBP.m_boundBreakpoints){ - if (xBBP.m_address == xActualAddress) - { + foreach (var xBP in mEngine.m_breakpointManager.mPendingBreakpoints) { + foreach(var xBBP in xBP.m_boundBreakpoints) { + if (xBBP.m_address == xActualAddress) { xBoundBreakpoints.Add(xBBP); } } diff --git a/source2/Debug/Cosmos.Debug.VSDebugEngine/Engine.Impl/BreakpointManager.cs b/source2/Debug/Cosmos.Debug.VSDebugEngine/Engine.Impl/BreakpointManager.cs index 3f59d5eef..9f57ed218 100644 --- a/source2/Debug/Cosmos.Debug.VSDebugEngine/Engine.Impl/BreakpointManager.cs +++ b/source2/Debug/Cosmos.Debug.VSDebugEngine/Engine.Impl/BreakpointManager.cs @@ -5,9 +5,11 @@ using Microsoft.VisualStudio.Debugger.Interop; namespace Cosmos.Debug.VSDebugEngine { // This class manages breakpoints for the engine. + // Breakpoint types: http://msdn.microsoft.com/en-us/library/bb161312%28VS.80%29.aspx\ + // Binding breakpoints: http://msdn.microsoft.com/en-us/library/bb146593%28v=VS.80%29.aspx class BreakpointManager { private AD7Engine mEngine; - internal List m_pendingBreakpoints = new List(); + internal List mPendingBreakpoints = new List(); public BreakpointManager(AD7Engine aEngine) { mEngine = aEngine; @@ -17,13 +19,13 @@ namespace Cosmos.Debug.VSDebugEngine { public void CreatePendingBreakpoint(IDebugBreakpointRequest2 pBPRequest, out IDebugPendingBreakpoint2 ppPendingBP) { AD7PendingBreakpoint pendingBreakpoint = new AD7PendingBreakpoint(pBPRequest, mEngine, this); ppPendingBP = (IDebugPendingBreakpoint2)pendingBreakpoint; - m_pendingBreakpoints.Add(pendingBreakpoint); + mPendingBreakpoints.Add(pendingBreakpoint); } // Called from the engine's detach method to remove the debugger's breakpoint instructions. public void ClearBoundBreakpoints() { - foreach (AD7PendingBreakpoint pendingBreakpoint in m_pendingBreakpoints) { - pendingBreakpoint.ClearBoundBreakpoints(); + foreach (var xBP in mPendingBreakpoints) { + xBP.ClearBoundBreakpoints(); } } } diff --git a/source2/Debug/Cosmos.Debug.VSDebugEngine/ReadMe.html b/source2/Debug/Cosmos.Debug.VSDebugEngine/ReadMe.html index 22e766d6d..7b87b9935 100644 --- a/source2/Debug/Cosmos.Debug.VSDebugEngine/ReadMe.html +++ b/source2/Debug/Cosmos.Debug.VSDebugEngine/ReadMe.html @@ -12,6 +12,7 @@
  • AD7.Impl/AD7Process.cs does the lanching of the DebugHost, which then launches VMWare etc
  • +
  • BreakpointManager.cs contains notes on breakpoints