NWSetBreakpoint

Sets a breakpoint programmatically

Local Servers:nonblocking
Local Servers:blocking
Classification:3.x, 4.x, 5.x, 6.x
Service:Debug

Syntax

  #include <nwdebug.h>  
   
  int NWSetBreakpoint  (  
     LONG   address,  
     int    breakType ;
  

Parameters

address

(IN) Specifies the location of the breakpoint to set.

breakType

(IN) Specifies the breakpoint type.

Return Values

0-3 indicate success.

-1 indicates failure.

Remarks

NWSetBreakpoint provides a programmatic way to set a breakpoint dynamically.

For the address parameter, pass in a pointer to data if you are setting a write or a read/write breakpoint. Pass in a pointer to code if you are setting an execution breakpoint.

For the breakType parameter, pass in one of the following three constants, according to the type of breakpoint you are setting:

Constant Name

Defined Value

EXECUTION_BREAKPOINT

0

WRITE_BREAKPOINT

1

READ_WRITE_BREAKPOINT

3

If fewer than four breakpoints are set, NWSetBreakpoint returns the next higher zero-based count of breakpoints and sets the requested breakpoint. If all four breakpoints are already set when you call NWSetBreakpoint, the function fails and returns -1.

See Also

NWClearBreakpoint