aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2015-11-03 13:33:12 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2015-11-03 13:33:12 -0500
commitf4b0a6714adb7371e3b7a0f47589c3dfd958cd09 (patch)
tree6c9c2d0406f7edacbf3a69554eff3303b804ce02 /gdb
parent653090d3219377766f1d4597819fa3c805ce49eb (diff)
downloadgdb-f4b0a6714adb7371e3b7a0f47589c3dfd958cd09.zip
gdb-f4b0a6714adb7371e3b7a0f47589c3dfd958cd09.tar.gz
gdb-f4b0a6714adb7371e3b7a0f47589c3dfd958cd09.tar.bz2
target_ops mask_watchpoint: change int to target_hw_bp_type
Fixes: /home/simark/src/binutils-gdb/gdb/ppc-linux-nat.c: In function ‘int ppc_linux_insert_mask_watchpoint(target_ops*, CORE_ADDR, CORE_ADDR, int)’: /home/simark/src/binutils-gdb/gdb/ppc-linux-nat.c:1730:40: error: invalid conversion from ‘int’ to ‘target_hw_bp_type’ [-fpermissive] p.trigger_type = get_trigger_type (rw); ^ gdb/ChangeLog: * 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/ppc-linux-nat.c4
-rw-r--r--gdb/target-delegates.c16
-rw-r--r--gdb/target.c6
-rw-r--r--gdb/target.h12
5 files changed, 35 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 06c0496..7de4153 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,18 @@
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.
(get_sim_inferior_data): Likewise.
(sim_inferior_data_cleanup): Likewise.
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 55aec00..14ad68e 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1719,7 +1719,7 @@ get_trigger_type (enum target_hw_bp_type type)
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;
@@ -1747,7 +1747,7 @@ ppc_linux_insert_mask_watchpoint (struct target_ops *ops, CORE_ADDR addr,
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;
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index a7271fa..253c9d7 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -587,20 +587,20 @@ debug_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum
}
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);
@@ -612,7 +612,7 @@ debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR
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);
@@ -620,20 +620,20 @@ debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR
}
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);
@@ -645,7 +645,7 @@ debug_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR
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);
diff --git a/gdb/target.c b/gdb/target.c
index 7ad2330..93786c3 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -3529,7 +3529,8 @@ target_verify_memory (const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size)
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 (&current_target,
addr, mask, rw);
@@ -3539,7 +3540,8 @@ target_insert_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask, int 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 (&current_target,
addr, mask, rw);
diff --git a/gdb/target.h b/gdb/target.h
index 2b2db45..0105db2 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -531,10 +531,12 @@ struct target_ops
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);
@@ -1947,14 +1949,16 @@ extern char *target_thread_name (struct thread_info *);
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