This commit is contained in:
kudzu_cp 2010-07-24 23:07:32 +00:00
parent 10724f3ad7
commit 715ff09b93
4 changed files with 12 additions and 13 deletions

View file

@ -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)

View file

@ -242,11 +242,9 @@ namespace Cosmos.Debug.VSDebugEngine
mEngine.Callback.OnOutputString("Hit Breakpoint 0x" + xActualAddress.ToString("X8").ToUpper());
var xActionPoints = new List<object>();
var xBoundBreakpoints = new List<IDebugBoundBreakpoint2>();
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);
}
}

View file

@ -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<AD7PendingBreakpoint> m_pendingBreakpoints = new List<AD7PendingBreakpoint>();
internal List<AD7PendingBreakpoint> mPendingBreakpoints = new List<AD7PendingBreakpoint>();
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();
}
}
}

View file

@ -12,6 +12,7 @@
<ul>
<li>AD7.Impl/AD7Process.cs does the lanching of the DebugHost, which then launches
VMWare etc</li>
<li>BreakpointManager.cs contains notes on breakpoints</li>
</ul>
</body>