convert to_can_use_hw_breakpoint

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

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_can_use_hw_breakpoint.
	* target.h (struct target_ops) <to_can_use_hw_breakpoint>: Use
	TARGET_DEFAULT_RETURN.
This commit is contained in:
Tom Tromey
2013-12-18 09:58:16 -07:00
parent f86e59b2d1
commit 52b51d06f8
4 changed files with 27 additions and 5 deletions

@ -112,6 +112,19 @@ delegate_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struc
return self->to_remove_breakpoint (self, arg1, arg2);
}
static int
delegate_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int arg3)
{
self = self->beneath;
return self->to_can_use_hw_breakpoint (self, arg1, arg2, arg3);
}
static int
tdefault_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int arg3)
{
return 0;
}
static int
delegate_stopped_by_watchpoint (struct target_ops *self)
{
@ -221,6 +234,8 @@ install_delegators (struct target_ops *ops)
ops->to_insert_breakpoint = delegate_insert_breakpoint;
if (ops->to_remove_breakpoint == NULL)
ops->to_remove_breakpoint = delegate_remove_breakpoint;
if (ops->to_can_use_hw_breakpoint == NULL)
ops->to_can_use_hw_breakpoint = delegate_can_use_hw_breakpoint;
if (ops->to_stopped_by_watchpoint == NULL)
ops->to_stopped_by_watchpoint = delegate_stopped_by_watchpoint;
if (ops->to_stopped_data_address == NULL)
@ -252,6 +267,7 @@ install_dummy_methods (struct target_ops *ops)
ops->to_files_info = tdefault_files_info;
ops->to_insert_breakpoint = memory_insert_breakpoint;
ops->to_remove_breakpoint = memory_remove_breakpoint;
ops->to_can_use_hw_breakpoint = tdefault_can_use_hw_breakpoint;
ops->to_stopped_by_watchpoint = tdefault_stopped_by_watchpoint;
ops->to_stopped_data_address = tdefault_stopped_data_address;
ops->to_rcmd = default_rcmd;