public bool OnInitialBreakpointReached(int Address, int BreakpointIndex) { if (BreakpointsToAddAfterStartup.Count == 0) { return(false); } // now add all later breakpoints foreach (Types.Breakpoint bp in BreakpointsToAddAfterStartup) { if ((bp.TriggerOnLoad) || (bp.TriggerOnStore)) { if (bp.TriggerOnExec) { // this was already added, remove Debugger.DeleteBreakpoint(bp.RemoteIndex, bp); bp.RemoteIndex = -1; } /* * VICERemoteDebugger.RequestData delData = new VICERemoteDebugger.RequestData( VICERemoteDebugger.Request.ADD_BREAKPOINT, bp.Address ); * delData.Breakpoint = bp; * Debugger.QueueRequest( delData ); */ Debugger.AddBreakpoint(bp); } } // only auto-go on if the initial break point was not the fake first breakpoint if (Address != LateBreakpointOverrideDebugStart) { // need to add new intermediate break point Types.Breakpoint bpTemp = new C64Studio.Types.Breakpoint(); bpTemp.Address = LateBreakpointOverrideDebugStart; bpTemp.TriggerOnExec = true; bpTemp.Temporary = true; Debugger.AddBreakpoint(bpTemp); /* * RemoteDebugger.RequestData addNewBP = new RemoteDebugger.RequestData( RemoteDebugger.Request.ADD_BREAKPOINT, m_LateBreakpointOverrideDebugStart ); * addNewBP.Breakpoint = bpTemp; * Debugger.QueueRequest( addNewBP );*/ } // and auto-go on with debugging Debugger.Run(); if (MarkedDocument != null) { MarkLine(MarkedDocument.DocumentInfo.Project, MarkedDocument.DocumentInfo.FullPath, -1); MarkedDocument = null; } Core.Executing.BringToForeground(); FirstActionAfterBreak = false; Core.MainForm.SetGUIForDebugging(true); return(true); }
public bool OnInitialBreakpointReached(int Address) { if ((BreakpointsToAddAfterStartup.Count == 0) && (Core.Debugging.OverrideDebugStart == -1)) { return(false); } // now add all later breakpoints foreach (Types.Breakpoint bp in BreakpointsToAddAfterStartup) { Debugger.AddBreakpoint(bp); } // only auto-go on if the initial break point was not the fake first breakpoint if (Address != LateBreakpointOverrideDebugStart) { // need to add new intermediate break point Types.Breakpoint bpTemp = new C64Studio.Types.Breakpoint(); bpTemp.Address = LateBreakpointOverrideDebugStart; bpTemp.TriggerOnExec = true; bpTemp.Temporary = true; Debugger.AddBreakpoint(bpTemp); } if (MarkedDocument != null) { MarkLine(MarkedDocument.DocumentInfo.Project, MarkedDocument.DocumentInfo, -1); MarkedDocument = null; } // keep running for non cart if (!Parser.ASMFileParser.IsCartridge(DebugType)) { Debugger.Run(); } Core.Executing.BringToForeground(); FirstActionAfterBreak = false; Core.MainForm.SetGUIForDebugging(true); // force a reset for cartridges, so the debugger starts at the init // can't reset on a normal file, just hope our break point is not hit too early if (Parser.ASMFileParser.IsCartridge(DebugType)) { Debugger.Reset(); } return(true); }
public static async Task AddBreakpointAsync(this IDebugger dbgr, Breakpoint b) { await Task.Run(() => dbgr.AddBreakpoint(b)); }
protected override void DoHandle([NotNull] GameHttpContext context, [NotNull] IDebugger debugger) { debugger.AddBreakpoint(new Breakpoint(context.GetUIntParam("address"), context.GetIntParam("program"), context.GetEnumParam <BreakpointType>("breakpointType"))); }