aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-nat.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-08-02 11:46:50 -0700
committerPedro Alves <palves@redhat.com>2015-08-02 11:46:50 -0700
commite76460dbb9b9b34b9c7fc2f2e4faae38730d00b0 (patch)
treec4c515591cb561961dd992daeadcdd5b0932f431 /gdb/ppc-linux-nat.c
parent835a09d99d585bfdc9f760970908e10bd8b2fec2 (diff)
downloadgdb-e76460dbb9b9b34b9c7fc2f2e4faae38730d00b0.zip
gdb-e76460dbb9b9b34b9c7fc2f2e4faae38730d00b0.tar.gz
gdb-e76460dbb9b9b34b9c7fc2f2e4faae38730d00b0.tar.bz2
Unbreak PPC gdb builds
Commit f486487f5586 (Mostly trivial enum fixes) missed updating ppc-linux-nat.c, resulting in: ../../src/gdb/ppc-linux-nat.c: In function ‘_initialize_ppc_linux_nat’: ../../src/gdb/ppc-linux-nat.c:2503:27: error: assignment from incompatible pointer type [-Werror] ../../src/gdb/ppc-linux-nat.c:2504:27: error: assignment from incompatible pointer type [-Werror] gdb/ChangeLog 2015-08-02 Pedro Alves <palves@redhat.com> * ppc-linux-nat.c (get_trigger_type, create_watchpoint_request) (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint): Change parameter 'rw's type to enum target_hw_bp_type and rename to 'type'.
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r--gdb/ppc-linux-nat.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index df69b06..3d99d1e 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1699,13 +1699,13 @@ ppc_linux_remove_hw_breakpoint (struct target_ops *self,
}
static int
-get_trigger_type (int rw)
+get_trigger_type (enum target_hw_bp_type type)
{
int t;
- if (rw == hw_read)
+ if (type == hw_read)
t = PPC_BREAKPOINT_TRIGGER_READ;
- else if (rw == hw_write)
+ else if (type == hw_write)
t = PPC_BREAKPOINT_TRIGGER_WRITE;
else
t = PPC_BREAKPOINT_TRIGGER_READ | PPC_BREAKPOINT_TRIGGER_WRITE;
@@ -1984,8 +1984,8 @@ ppc_linux_can_accel_watchpoint_condition (struct target_ops *self,
static void
create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
- int len, int rw, struct expression *cond,
- int insert)
+ int len, enum target_hw_bp_type type,
+ struct expression *cond, int insert)
{
if (len == 1
|| !(hwdebug_info.features & PPC_DEBUG_FEATURE_DATA_BP_RANGE))
@@ -2024,13 +2024,13 @@ create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
}
p->version = PPC_DEBUG_CURRENT_VERSION;
- p->trigger_type = get_trigger_type (rw);
+ p->trigger_type = get_trigger_type (type);
p->addr = (uint64_t) addr;
}
static int
-ppc_linux_insert_watchpoint (struct target_ops *self,
- CORE_ADDR addr, int len, int rw,
+ppc_linux_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
+ enum target_hw_bp_type type,
struct expression *cond)
{
struct lwp_info *lp;
@@ -2040,7 +2040,7 @@ ppc_linux_insert_watchpoint (struct target_ops *self,
{
struct ppc_hw_breakpoint p;
- create_watchpoint_request (&p, addr, len, rw, cond, 1);
+ create_watchpoint_request (&p, addr, len, type, cond, 1);
ALL_LWPS (lp)
hwdebug_insert_point (&p, ptid_get_lwp (lp->ptid));
@@ -2068,7 +2068,7 @@ ppc_linux_insert_watchpoint (struct target_ops *self,
}
dabr_value = addr & ~(read_mode | write_mode);
- switch (rw)
+ switch (type)
{
case hw_read:
/* Set read and translate bits. */
@@ -2098,8 +2098,8 @@ ppc_linux_insert_watchpoint (struct target_ops *self,
}
static int
-ppc_linux_remove_watchpoint (struct target_ops *self,
- CORE_ADDR addr, int len, int rw,
+ppc_linux_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
+ enum target_hw_bp_type type,
struct expression *cond)
{
struct lwp_info *lp;
@@ -2109,7 +2109,7 @@ ppc_linux_remove_watchpoint (struct target_ops *self,
{
struct ppc_hw_breakpoint p;
- create_watchpoint_request (&p, addr, len, rw, cond, 0);
+ create_watchpoint_request (&p, addr, len, type, cond, 0);
ALL_LWPS (lp)
hwdebug_remove_point (&p, ptid_get_lwp (lp->ptid));