Add target_ops argument to to_can_use_hw_breakpoint

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_can_use_hw_breakpoint>: Add
	argument.
	(target_can_use_hardware_watchpoint): Add argument.
	* target.c (debug_to_can_use_hw_breakpoint): Add argument.
	(update_current_target): Update.
	* spu-linux-nat.c (spu_can_use_hw_breakpoint): Add 'self'
	argument.
	* s390-linux-nat.c (s390_can_use_hw_breakpoint): Add 'self'
	argument.
	* remote.c (remote_check_watch_resources): Add 'self' argument.
	* remote-mips.c (mips_can_use_watchpoint): Add 'self' argument.
	* remote-m32r-sdi.c (m32r_can_use_hw_watchpoint): Add 'self'
	argument.
	* procfs.c (procfs_can_use_hw_breakpoint): Add 'self' argument.
	* ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Add 'self'
	argument.
	* nto-procfs.c (procfs_can_use_hw_breakpoint): Add 'self'
	argument.
	* mips-linux-nat.c (mips_linux_can_use_hw_breakpoint): Add 'self'
	argument.
	* inf-ttrace.c (inf_ttrace_can_use_hw_breakpoint): Add 'self'
	argument.
	* ia64-linux-nat.c (ia64_linux_can_use_hw_breakpoint): Add 'self'
	argument.
	* ia64-hpux-nat.c (ia64_hpux_can_use_hw_breakpoint): Add 'self'
	argument.
	* i386-nat.c (i386_can_use_hw_breakpoint): Add 'self' argument.
	* arm-linux-nat.c (arm_linux_can_use_hw_breakpoint): Add 'self'
	argument.
	* aarch64-linux-nat.c (aarch64_linux_can_use_hw_breakpoint): Add
	'self' argument.
This commit is contained in:
Tom Tromey
2013-12-17 21:28:37 -07:00
parent f045800c90
commit 5461485a87
18 changed files with 78 additions and 23 deletions

View File

@@ -100,7 +100,8 @@ static int debug_to_insert_breakpoint (struct target_ops *, struct gdbarch *,
static int debug_to_remove_breakpoint (struct target_ops *, struct gdbarch *,
struct bp_target_info *);
static int debug_to_can_use_hw_breakpoint (int, int, int);
static int debug_to_can_use_hw_breakpoint (struct target_ops *self,
int, int, int);
static int debug_to_insert_hw_breakpoint (struct gdbarch *,
struct bp_target_info *);
@@ -734,7 +735,7 @@ update_current_target (void)
(void (*) (struct target_ops *))
target_ignore);
de_fault (to_can_use_hw_breakpoint,
(int (*) (int, int, int))
(int (*) (struct target_ops *, int, int, int))
return_zero);
de_fault (to_insert_hw_breakpoint,
(int (*) (struct gdbarch *, struct bp_target_info *))
@@ -4620,11 +4621,13 @@ debug_to_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
}
static int
debug_to_can_use_hw_breakpoint (int type, int cnt, int from_tty)
debug_to_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int from_tty)
{
int retval;
retval = debug_target.to_can_use_hw_breakpoint (type, cnt, from_tty);
retval = debug_target.to_can_use_hw_breakpoint (&debug_target,
type, cnt, from_tty);
fprintf_unfiltered (gdb_stdlog,
"target_can_use_hw_breakpoint (%ld, %ld, %ld) = %ld\n",