static int nto_remove_point (char type, CORE_ADDR addr, int len) { int wtype = _DEBUG_BREAK_HW; /* Always request HW. */ TRACE ("%s type:%c addr: 0x%08lx len:%d\n", __func__, (int)type, addr, len); switch (type) { case '0': /* software-breakpoint */ wtype = _DEBUG_BREAK_EXEC; break; case '1': /* hardware-breakpoint */ wtype |= _DEBUG_BREAK_EXEC; break; case '2': /* write watchpoint */ wtype |= _DEBUG_BREAK_RW; break; case '3': /* read watchpoint */ wtype |= _DEBUG_BREAK_RD; break; case '4': /* access watchpoint */ wtype |= _DEBUG_BREAK_RW; break; default: return 1; /* Not supported. */ } return nto_breakpoint (addr, wtype, -1); }
static int nto_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp) { int wtype = _DEBUG_BREAK_HW; /* Always request HW. */ TRACE ("%s type:%c addr: 0x%08lx len:%d\n", __func__, (int)type, addr, len); switch (type) { case raw_bkpt_type_sw: wtype = _DEBUG_BREAK_EXEC; break; case raw_bkpt_type_hw: wtype |= _DEBUG_BREAK_EXEC; break; case raw_bkpt_type_write_wp: wtype |= _DEBUG_BREAK_RW; break; case raw_bkpt_type_read_wp: wtype |= _DEBUG_BREAK_RD; break; case raw_bkpt_type_access_wp: wtype |= _DEBUG_BREAK_RW; break; default: return 1; /* Not supported. */ } return nto_breakpoint (addr, wtype, -1); }