Add target_ops argument to to_insert_watchpoint
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_insert_watchpoint>: Add argument. (target_insert_watchpoint): Add argument. * target.c (debug_to_insert_watchpoint): Add argument. (update_current_target): Update. * s390-linux-nat.c (s390_insert_watchpoint): Add 'self' argument. * remote.c (remote_insert_watchpoint): Add 'self' argument. * remote-mips.c (mips_insert_watchpoint): Add 'self' argument. * remote-m32r-sdi.c (m32r_insert_watchpoint): Add 'self' argument. * procfs.c (procfs_insert_watchpoint): Add 'self' argument. * ppc-linux-nat.c (ppc_linux_insert_watchpoint): Add 'self' argument. * nto-procfs.c (procfs_insert_hw_watchpoint): Add 'self' argument. (procfs_insert_hw_watchpoint): Add 'self' argument. * mips-linux-nat.c (mips_linux_insert_watchpoint): Add 'self' argument. * inf-ttrace.c (inf_ttrace_insert_watchpoint): Add 'self' argument. * ia64-linux-nat.c (ia64_linux_insert_watchpoint): Add 'self' argument. * i386-nat.c (i386_insert_watchpoint): Add 'self' argument. * arm-linux-nat.c (arm_linux_insert_watchpoint): Add 'self' argument. * aarch64-linux-nat.c (aarch64_linux_insert_watchpoint): Add 'self' argument.
This commit is contained in:
parent
11b5219af5
commit
7bb99c5383
@ -1,3 +1,31 @@
|
||||
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* target.h (struct target_ops) <to_insert_watchpoint>: Add
|
||||
argument.
|
||||
(target_insert_watchpoint): Add argument.
|
||||
* target.c (debug_to_insert_watchpoint): Add argument.
|
||||
(update_current_target): Update.
|
||||
* s390-linux-nat.c (s390_insert_watchpoint): Add 'self' argument.
|
||||
* remote.c (remote_insert_watchpoint): Add 'self' argument.
|
||||
* remote-mips.c (mips_insert_watchpoint): Add 'self' argument.
|
||||
* remote-m32r-sdi.c (m32r_insert_watchpoint): Add 'self' argument.
|
||||
* procfs.c (procfs_insert_watchpoint): Add 'self' argument.
|
||||
* ppc-linux-nat.c (ppc_linux_insert_watchpoint): Add 'self'
|
||||
argument.
|
||||
* nto-procfs.c (procfs_insert_hw_watchpoint): Add 'self' argument.
|
||||
(procfs_insert_hw_watchpoint): Add 'self' argument.
|
||||
* mips-linux-nat.c (mips_linux_insert_watchpoint): Add 'self'
|
||||
argument.
|
||||
* inf-ttrace.c (inf_ttrace_insert_watchpoint): Add 'self'
|
||||
argument.
|
||||
* ia64-linux-nat.c (ia64_linux_insert_watchpoint): Add 'self'
|
||||
argument.
|
||||
* i386-nat.c (i386_insert_watchpoint): Add 'self' argument.
|
||||
* arm-linux-nat.c (arm_linux_insert_watchpoint): Add 'self'
|
||||
argument.
|
||||
* aarch64-linux-nat.c (aarch64_linux_insert_watchpoint): Add
|
||||
'self' argument.
|
||||
|
||||
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* target.h (struct target_ops) <to_remove_watchpoint>: Add
|
||||
|
@ -1340,7 +1340,8 @@ aarch64_handle_watchpoint (int type, CORE_ADDR addr, int len, int is_insert)
|
||||
of the type TYPE. Return 0 on success, -1 on failure. */
|
||||
|
||||
static int
|
||||
aarch64_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
aarch64_linux_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
int ret;
|
||||
|
@ -1108,7 +1108,8 @@ arm_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
|
||||
|
||||
/* Insert a Hardware breakpoint. */
|
||||
static int
|
||||
arm_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
|
||||
arm_linux_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int rw,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
|
@ -589,7 +589,8 @@ i386_update_inferior_debug_regs (struct i386_debug_reg_state *new_state)
|
||||
of the type TYPE. Return 0 on success, -1 on failure. */
|
||||
|
||||
static int
|
||||
i386_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
i386_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct i386_debug_reg_state *state
|
||||
|
@ -542,7 +542,8 @@ is_power_of_2 (int val)
|
||||
}
|
||||
|
||||
static int
|
||||
ia64_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
|
||||
ia64_linux_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int rw,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
|
@ -314,7 +314,8 @@ inf_ttrace_disable_page_protections (pid_t pid)
|
||||
type TYPE. */
|
||||
|
||||
static int
|
||||
inf_ttrace_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
inf_ttrace_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
const int pagesize = inf_ttrace_page_dict.pagesize;
|
||||
|
@ -645,7 +645,8 @@ mips_linux_new_thread (struct lwp_info *lp)
|
||||
watch. Return zero on success. */
|
||||
|
||||
static int
|
||||
mips_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
mips_linux_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct pt_watch_regs regs;
|
||||
|
@ -70,7 +70,8 @@ static ptid_t do_attach (ptid_t ptid);
|
||||
static int procfs_can_use_hw_breakpoint (struct target_ops *self,
|
||||
int, int, int);
|
||||
|
||||
static int procfs_insert_hw_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
static int procfs_insert_hw_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond);
|
||||
|
||||
static int procfs_remove_hw_watchpoint (struct target_ops *self,
|
||||
@ -1505,7 +1506,8 @@ procfs_remove_hw_watchpoint (struct target_ops *self,
|
||||
}
|
||||
|
||||
static int
|
||||
procfs_insert_hw_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
procfs_insert_hw_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
return procfs_hw_watchpoint (addr, len, type);
|
||||
|
@ -2076,7 +2076,8 @@ create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
|
||||
}
|
||||
|
||||
static int
|
||||
ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
|
||||
ppc_linux_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int rw,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
|
@ -4899,7 +4899,8 @@ procfs_stopped_data_address (struct target_ops *targ, CORE_ADDR *addr)
|
||||
}
|
||||
|
||||
static int
|
||||
procfs_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
procfs_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
if (!target_have_steppable_watchpoint
|
||||
|
@ -1418,7 +1418,8 @@ m32r_can_use_hw_watchpoint (struct target_ops *self,
|
||||
watchpoint. */
|
||||
|
||||
static int
|
||||
m32r_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
m32r_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
int i;
|
||||
|
@ -2426,7 +2426,8 @@ calculate_mask (CORE_ADDR addr, int len)
|
||||
watchpoint. */
|
||||
|
||||
static int
|
||||
mips_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
mips_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
if (mips_set_breakpoint (addr, len, type))
|
||||
|
@ -8166,7 +8166,8 @@ watchpoint_to_Z_packet (int type)
|
||||
}
|
||||
|
||||
static int
|
||||
remote_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
remote_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct remote_state *rs = get_remote_state ();
|
||||
|
@ -508,7 +508,8 @@ s390_fix_watch_points (struct lwp_info *lp)
|
||||
}
|
||||
|
||||
static int
|
||||
s390_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
s390_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
|
12
gdb/target.c
12
gdb/target.c
@ -111,7 +111,8 @@ static int debug_to_remove_hw_breakpoint (struct target_ops *self,
|
||||
struct gdbarch *,
|
||||
struct bp_target_info *);
|
||||
|
||||
static int debug_to_insert_watchpoint (CORE_ADDR, int, int,
|
||||
static int debug_to_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR, int, int,
|
||||
struct expression *);
|
||||
|
||||
static int debug_to_remove_watchpoint (struct target_ops *self,
|
||||
@ -749,7 +750,8 @@ update_current_target (void)
|
||||
struct bp_target_info *))
|
||||
return_minus_one);
|
||||
de_fault (to_insert_watchpoint,
|
||||
(int (*) (CORE_ADDR, int, int, struct expression *))
|
||||
(int (*) (struct target_ops *, CORE_ADDR, int, int,
|
||||
struct expression *))
|
||||
return_minus_one);
|
||||
de_fault (to_remove_watchpoint,
|
||||
(int (*) (struct target_ops *, CORE_ADDR, int, int,
|
||||
@ -4754,12 +4756,14 @@ debug_to_remove_hw_breakpoint (struct target_ops *self,
|
||||
}
|
||||
|
||||
static int
|
||||
debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type,
|
||||
debug_to_insert_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR addr, int len, int type,
|
||||
struct expression *cond)
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = debug_target.to_insert_watchpoint (addr, len, type, cond);
|
||||
retval = debug_target.to_insert_watchpoint (&debug_target,
|
||||
addr, len, type, cond);
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"target_insert_watchpoint (%s, %d, %d, %s) = %ld\n",
|
||||
|
@ -461,7 +461,8 @@ struct target_ops
|
||||
provided with the corresponding target_* macros. */
|
||||
int (*to_remove_watchpoint) (struct target_ops *,
|
||||
CORE_ADDR, int, int, struct expression *);
|
||||
int (*to_insert_watchpoint) (CORE_ADDR, int, int, struct expression *);
|
||||
int (*to_insert_watchpoint) (struct target_ops *,
|
||||
CORE_ADDR, int, int, struct expression *);
|
||||
|
||||
int (*to_insert_mask_watchpoint) (struct target_ops *,
|
||||
CORE_ADDR, CORE_ADDR, int);
|
||||
@ -1615,7 +1616,8 @@ extern char *target_thread_name (struct thread_info *);
|
||||
-1 for failure. */
|
||||
|
||||
#define target_insert_watchpoint(addr, len, type, cond) \
|
||||
(*current_target.to_insert_watchpoint) (addr, len, type, cond)
|
||||
(*current_target.to_insert_watchpoint) (¤t_target, \
|
||||
addr, len, type, cond)
|
||||
|
||||
#define target_remove_watchpoint(addr, len, type, cond) \
|
||||
(*current_target.to_remove_watchpoint) (¤t_target, \
|
||||
|
Loading…
x
Reference in New Issue
Block a user