}
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;
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))
}
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;
{
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));
}
dabr_value = addr & ~(read_mode | write_mode);
- switch (rw)
+ switch (type)
{
case hw_read:
/* Set read and translate bits. */
}
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;
{
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));