subsys/debug/gdb_server.c
/**
 * @brief remove an hardware breakpoint from debug registers set
 *
 * This routine removes an hardware breakpoint from debug registers structure.
 * It does not update the debug registers.
 *
 * @param addr Address where to set the breakpoint
 * @param type Type of breakpoint
 * @param len Length of data
 * @param err Container for returning error code
 *
 * @return 0 on success, -1 if failed (Error code returned via @a err).
 */
@brief remove an hardware breakpoint from debug registers set
This routine removes an hardware breakpoint from debug registers structure.
It does not update the debug registers.

@param addr Address where to set the breakpoint
@param type Type of breakpoint
@param len Length of data
@param err Container for returning error code

@return 0 on success, -1 if failed (Error code returned via @a err).
@brief remove an hardware breakpoint from debug registers set This routine removes an hardware breakpoint from debug registers structure . It does not update the debug registers . @param addr Address where to set the breakpoint @param type Type of breakpoint @param len Length of data @param err Container for returning error code @return 0 on success - 1 if failed ( Error code returned via @a err ) .
static int remove_hw_bp(long addr, enum gdb_bp_type type, int len,
			enum gdb_error_code *err)
{
#ifdef GDB_ARCH_HAS_HW_BP
	if (gdb_hw_bp_clear(&dbg_regs, addr, type, len, err) == -1) {
		return -1;
	}
	hw_bp_cnt--;
	return 0;
#else
	*err = GDB_ERROR_HW_BP_NOT_SUP;
	return -1;
#endif
}
static int remove_hw_bp ( long addr , enum gdb_bp_type type , int len , enum gdb_error_code * err ) { #ifdef GDB_ARCH_HAS_HW_BP if ( gdb_hw_bp_clear ( & dbg_regs , addr , type , len , err ) == -1 ) { return -1 ; } hw_bp_cnt -- ; return 0 ; #else * err = GDB_ERROR_HW_BP_NOT_SUP ; return -1 ; #endif }
@brief remove an hardware breakpoint from debug registers set
 This routine removes an hardware breakpoint from debug registers structure.
@brief remove an hardware breakpoint from debug registers set This routine removes an hardware breakpoint from debug registers structure .