static int x86_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, enum target_hw_bp_type type, struct expression *cond) { struct x86_debug_reg_state *state = x86_debug_reg_state (ptid_get_pid (inferior_ptid)); return x86_dr_insert_watchpoint (state, type, addr, len); }
static int x86_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) { struct x86_debug_reg_state *state = x86_debug_reg_state (ptid_get_pid (inferior_ptid)); bp_tgt->placed_address = bp_tgt->reqstd_address; return x86_dr_insert_watchpoint (state, hw_execute, bp_tgt->placed_address, 1) ? EBUSY : 0; }
static int i386_insert_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 x86_dr_insert_watchpoint (&debug_reg_state, hw_type, addr, size); } default: /* Unsupported. */ return 1; } }