CSetABreakpoint

Sets a hardware breakpoint.

Library:LibC
Classification:NetWare OS
Service:NetWare Platform

Syntax

  #include <netware.h> 
   
  int CSetABreakpoint (
     int       number,
     void     *addr,
     uint8_t   type,
     uint8_t   length );
  

Parameters

number

(IN) Specifies the number for this breakpoint, which is obtained from the ReserveABreakpointRTag function.

addr

(IN) Points to the address for this breakpoint:

  • If you are setting a write or a read/write breakpoint, pass in a pointer to the data.

  • If you are setting an execution breakpoint, pass in a pointer to the code.

type

(IN) Specifies the type of breakpoint with one of the following values:

0

Execution breakpoint.

1

Write breakpoint.

3

Read and write breakpoint.

length

(IN) Specifies the size of the data or of the function's data type with one of the following values:

0

1 byte length

1

2 byte length.

3

Undefined.

4

4 byte length

Execution breakpoints should always be set to 1 byte in length, and breakpoint addresses should be aligned to the length specified.

Return Values

If successful, returns a value from 0 to 3. Otherwise, returns -1.

Remarks

You can set up to 4 breakpoints (numbered 0 through 3). The first set up of a breakpoint returns 0, the next 1, and so on until you have set up 4 breakpoints. If you attempted to set up a fifth breakpoint, the CSetABreakpoint function returns -1.

See Also