forked from Imagelibrary/binutils-gdb
convert to_ranged_break_num_registers
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (target_ranged_break_num_registers): Unconditionally delegate. * target.h (struct target_ops) <to_ranged_break_num_registers>: Use TARGET_DEFAULT_RETURN.
This commit is contained in:
@@ -137,6 +137,19 @@ tdefault_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
delegate_ranged_break_num_registers (struct target_ops *self)
|
||||
{
|
||||
self = self->beneath;
|
||||
return self->to_ranged_break_num_registers (self);
|
||||
}
|
||||
|
||||
static int
|
||||
tdefault_ranged_break_num_registers (struct target_ops *self)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int
|
||||
delegate_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
|
||||
{
|
||||
@@ -1113,6 +1126,8 @@ install_delegators (struct target_ops *ops)
|
||||
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_ranged_break_num_registers == NULL)
|
||||
ops->to_ranged_break_num_registers = delegate_ranged_break_num_registers;
|
||||
if (ops->to_insert_hw_breakpoint == NULL)
|
||||
ops->to_insert_hw_breakpoint = delegate_insert_hw_breakpoint;
|
||||
if (ops->to_remove_hw_breakpoint == NULL)
|
||||
@@ -1288,6 +1303,7 @@ install_dummy_methods (struct target_ops *ops)
|
||||
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_ranged_break_num_registers = tdefault_ranged_break_num_registers;
|
||||
ops->to_insert_hw_breakpoint = tdefault_insert_hw_breakpoint;
|
||||
ops->to_remove_hw_breakpoint = tdefault_remove_hw_breakpoint;
|
||||
ops->to_remove_watchpoint = tdefault_remove_watchpoint;
|
||||
|
||||
Reference in New Issue
Block a user