static int aarch64_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, int len, struct raw_breakpoint *bp) { int ret; enum target_hw_bp_type targ_type; struct aarch64_debug_reg_state *state = aarch64_get_debug_reg_state (pid_of (current_thread)); if (show_debug_regs) fprintf (stderr, "remove_point on entry (addr=0x%08lx, len=%d)\n", (unsigned long) addr, len); /* Determine the type from the raw breakpoint type. */ targ_type = raw_bkpt_type_to_target_hw_bp_type (type); /* Set up state pointers. */ if (targ_type != hw_execute) ret = aarch64_handle_watchpoint (targ_type, addr, len, 0 /* is_insert */, state); else ret = aarch64_handle_breakpoint (targ_type, addr, len, 0 /* is_insert */, state); if (show_debug_regs) aarch64_show_debug_reg_state (state, "remove_point", addr, len, targ_type); return ret; }
static int aarch64_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, int len, struct raw_breakpoint *bp) { int ret; enum target_hw_bp_type targ_type; if (show_debug_regs) fprintf (stderr, "insert_point on entry (addr=0x%08lx, len=%d)\n", (unsigned long) addr, len); /* Determine the type from the raw breakpoint type. */ targ_type = raw_bkpt_type_to_target_hw_bp_type (type); if (targ_type != hw_execute) ret = aarch64_handle_watchpoint (targ_type, addr, len, 1 /* is_insert */); else ret = aarch64_handle_breakpoint (targ_type, addr, len, 1 /* is_insert */); if (show_debug_regs) aarch64_show_debug_reg_state (aarch64_get_debug_reg_state (), "insert_point", addr, len, targ_type); return ret; }
static int i386_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp) { switch (type) { case raw_bkpt_type_write_wp: case raw_bkpt_type_access_wp: { enum target_hw_bp_type hw_type = raw_bkpt_type_to_target_hw_bp_type (type); return i386_low_remove_watchpoint (&debug_reg_state, hw_type, addr, size); } default: /* Unsupported. */ return 1; } }