Debugging Tools for Windows |
The AddBreakpoint and AddBreakpoint2 methods create a new breakpoint for the current target.
HRESULT
IDebugControl::AddBreakpoint(
IN ULONG Type,
IN ULONG DesiredId,
OUT IDebugBreakpoint * * Bp
);
HRESULT
IDebugControl4::AddBreakpoint2(
IN ULONG Type,
IN ULONG DesiredId,
OUT IDebugBreakpoint2 * * Bp
);
Value | Description |
---|---|
DEBUG_BREAKPOINT_CODE | software breakpoint |
DEBUG_BREAKPOINT_DATA | processor breakpoint |
This method may also return other error values. See Return Values for more details.
AddBreakpoint is available in all versions of IDebugControl. AddBreakpoint2 is available in IDebugControl4 and later versions.
If DesiredId is not DEBUG_ANY_ID and another breakpoint already uses the ID DesiredId, these methods will fail.
Breakpoints are created empty and disabled. See Using Breakpoints for details on configuring and enabling the breakpoint.
The client is saved as the adder of the new breakpoint. See GetAdder.
Note Even though IDebugBreakpoint extends the COM interface IUnknown, the lifetime of the breakpoint is not controlled using the IUnknown interface. Instead, the breakpoint is deleted after RemoveBreakpoint is called.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.
Breakpoints, Using Breakpoints, IDebugBreakpoint, RemoveBreakpoint