IDebugControl::AddBreakpoint method

The AddBreakpoint method creates a new breakpoint for the current target.

Syntax


HRESULT AddBreakpoint(
  [in]  ULONG            Type,
  [in]  ULONG            DesiredId,
  [out] IDebugBreakpoint **Bp
);

Parameters

Type [in]

Specifies the breakpoint type of the new breakpoint. This can be either of the following values:

ValueDescription

DEBUG_BREAKPOINT_CODE

software breakpoint

DEBUG_BREAKPOINT_DATA

processor breakpoint

 

DesiredId [in]

Specifies the desired ID of the new breakpoint. If it is DEBUG_ANY_ID, the engine will pick an unused ID.

Bp [out]

Receives an interface pointer to the new breakpoint.

Return value

Return codeDescription
S_OK

The method was successful.

E_INVALIDARG

The breakpoint couldn't be created with the desired ID or the value of Type was not recognized.

 

This method may also return other error values. See Return Values for more details.

Remarks

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.
 

Requirements

Target platform

Desktop

Header

Dbgeng.h (include Dbgeng.h)

See also

IDebugControl
IDebugControl2
IDebugControl3
Breakpoints
Using Breakpoints
IDebugBreakpoint
RemoveBreakpoint

 

 

Send comments about this topic to Microsoft

Show: