/// <summary> /// Constructs a new breakoint in the debugged process. /// </summary> /// <param name="breakpointCollection">A collection that holds programs breakpoints.</param> /// <param name="location">An object that is capable of resolving breakpoint location.</param> public MDbgFunctionBreakpoint(MDbgBreakpointCollection breakpointCollection, ISequencePointResolver location) : base(breakpointCollection) { m_location = location; Bind(); NotifyChanged(); }
/// <summary> /// Create breakpoint from in location object. /// </summary> /// /// <param name="location">location of the breakpoint.</param> /// <returns>created breakpoint.</returns> /// <remarks> /// Location object must be retrieved from the breakpoint /// using Location property. /// <see cref="MDbgBreakpoint.Location"/> /// </remarks> // location has to be retrieved from existing breakpoint public MDbgBreakpoint CreateBreakpoint(object location) { ISequencePointResolver l = location as ISequencePointResolver; Debug.Assert(l != null); if (l == null) { throw new ArgumentException("incorrect value", "location"); } return(new MDbgFunctionBreakpoint(this, l)); }
private MDbgBreakpoint CreateBreakpointAtPosition(string location) { ISequencePointResolver bploc = shell.BreakpointParser.ParseFunctionBreakpoint(location); if (bploc == null) { throw new Exception("Invalid breakpoint syntax."); } MDbgBreakpoint bpnew = shell.Debugger.Processes.Active.Breakpoints.CreateBreakpoint(bploc); return(bpnew); }
public static void BreakCmd(string arguments, O2Thread.FuncVoidT1 <string> o2Callback) { if (arguments.Length == 0) { ListBreakpoints(o2Callback); return; } // We're adding a breakpoint. Parse the argument string. MDbgBreakpointCollection breakpoints = CommandBase.Debugger.Processes.Active.Breakpoints; ISequencePointResolver bploc = CommandBase.Shell.BreakpointParser.ParseFunctionBreakpoint(arguments); if (bploc == null) { throw new MDbgShellException("Invalid breakpoint syntax."); } MDbgBreakpoint bpnew = CommandBase.Debugger.Processes.Active.Breakpoints.CreateBreakpoint(bploc); CommandBase.WriteOutput(bpnew.ToString()); }