+2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint): Change
+ type of rw to enum target_hw_bp_type.
+ (ppc_linux_remove_mask_watchpoint): Likewise.
+ * target.c (target_insert_mask_watchpoint): Likewise.
+ (target_remove_mask_watchpoint): Likewise.
+ * target.h (target_insert_mask_watchpoint): Likewise.
+ (target_remove_mask_watchpoint): Likewise.
+ (struct target_ops) <to_insert_mask_watchpoint>: Likewise.
+ (struct target_ops) <to_remove_mask_watchpoint>: Likewise.
+ * target-delegates.c: Regenerate.
+
2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
* remote-sim.c (check_for_duplicate_sim_descriptor): Add casts.
static int
ppc_linux_insert_mask_watchpoint (struct target_ops *ops, CORE_ADDR addr,
- CORE_ADDR mask, int rw)
+ CORE_ADDR mask, enum target_hw_bp_type rw)
{
struct lwp_info *lp;
struct ppc_hw_breakpoint p;
static int
ppc_linux_remove_mask_watchpoint (struct target_ops *ops, CORE_ADDR addr,
- CORE_ADDR mask, int rw)
+ CORE_ADDR mask, enum target_hw_bp_type rw)
{
struct lwp_info *lp;
struct ppc_hw_breakpoint p;
}
static int
-delegate_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+delegate_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
self = self->beneath;
return self->to_insert_mask_watchpoint (self, arg1, arg2, arg3);
}
static int
-tdefault_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+tdefault_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
return 1;
}
static int
-debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
int result;
fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_mask_watchpoint (...)\n", debug_target.to_shortname);
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_CORE_ADDR (arg2);
fputs_unfiltered (", ", gdb_stdlog);
- target_debug_print_int (arg3);
+ target_debug_print_enum_target_hw_bp_type (arg3);
fputs_unfiltered (") = ", gdb_stdlog);
target_debug_print_int (result);
fputs_unfiltered ("\n", gdb_stdlog);
}
static int
-delegate_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+delegate_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
self = self->beneath;
return self->to_remove_mask_watchpoint (self, arg1, arg2, arg3);
}
static int
-tdefault_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+tdefault_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
return 1;
}
static int
-debug_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+debug_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, enum target_hw_bp_type arg3)
{
int result;
fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_mask_watchpoint (...)\n", debug_target.to_shortname);
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_CORE_ADDR (arg2);
fputs_unfiltered (", ", gdb_stdlog);
- target_debug_print_int (arg3);
+ target_debug_print_enum_target_hw_bp_type (arg3);
fputs_unfiltered (") = ", gdb_stdlog);
target_debug_print_int (result);
fputs_unfiltered ("\n", gdb_stdlog);
target.h. */
int
-target_insert_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask, int rw)
+target_insert_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask,
+ enum target_hw_bp_type rw)
{
return current_target.to_insert_mask_watchpoint (¤t_target,
addr, mask, rw);
target.h. */
int
-target_remove_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask, int rw)
+target_remove_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask,
+ enum target_hw_bp_type rw)
{
return current_target.to_remove_mask_watchpoint (¤t_target,
addr, mask, rw);
TARGET_DEFAULT_RETURN (-1);
int (*to_insert_mask_watchpoint) (struct target_ops *,
- CORE_ADDR, CORE_ADDR, int)
+ CORE_ADDR, CORE_ADDR,
+ enum target_hw_bp_type)
TARGET_DEFAULT_RETURN (1);
int (*to_remove_mask_watchpoint) (struct target_ops *,
- CORE_ADDR, CORE_ADDR, int)
+ CORE_ADDR, CORE_ADDR,
+ enum target_hw_bp_type)
TARGET_DEFAULT_RETURN (1);
int (*to_stopped_by_watchpoint) (struct target_ops *)
TARGET_DEFAULT_RETURN (0);
or hw_access for an access watchpoint. Returns 0 for success, 1 if
masked watchpoints are not supported, -1 for failure. */
-extern int target_insert_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
+extern int target_insert_mask_watchpoint (CORE_ADDR, CORE_ADDR,
+ enum target_hw_bp_type);
/* Remove a masked watchpoint at ADDR with the mask MASK.
RW may be hw_read for a read watchpoint, hw_write for a write watchpoint
or hw_access for an access watchpoint. Returns 0 for success, non-zero
for failure. */
-extern int target_remove_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
+extern int target_remove_mask_watchpoint (CORE_ADDR, CORE_ADDR,
+ enum target_hw_bp_type);
/* Insert a hardware breakpoint at address BP_TGT->placed_address in
the target machine. Returns 0 for success, and returns non-zero or