aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-01-16 11:39:32 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:47 -0700
commitc0eca49f4e3382163153a1cdbb090a25b4a32e31 (patch)
tree925e767f99b1ffb1cff3c7d3bdaff7272efb14cc /gdb/target-delegates.c
parent596b6b39ab5f26a86980bc9aa6cf348d32d244b4 (diff)
downloadgdb-c0eca49f4e3382163153a1cdbb090a25b4a32e31.zip
gdb-c0eca49f4e3382163153a1cdbb090a25b4a32e31.tar.gz
gdb-c0eca49f4e3382163153a1cdbb090a25b4a32e31.tar.bz2
convert to_decr_pc_after_break
This converts to_decr_pc_after_break to the new style of delegation, removing forward_target_decr_pc_after_break. 2014-02-19 Tom Tromey <tromey@redhat.com> * record-btrace.c (record_btrace_decr_pc_after_break): Delegate directly. * target-delegates.c: Rebuild. * target.h (struct target_ops) <to_decr_pc_after_break>: Use TARGET_DEFAULT_FUNC. * target.c (default_target_decr_pc_after_break): Rename from forward_target_decr_pc_after_break. Simplify. (target_decr_pc_after_break): Rely on delegation.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 15ab43a..04824f2 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -1572,6 +1572,13 @@ tdefault_augmented_libraries_svr4_read (struct target_ops *self)
return 0;
}
+static CORE_ADDR
+delegate_decr_pc_after_break (struct target_ops *self, struct gdbarch *arg1)
+{
+ self = self->beneath;
+ return self->to_decr_pc_after_break (self, arg1);
+}
+
static void
install_delegators (struct target_ops *ops)
{
@@ -1837,6 +1844,8 @@ install_delegators (struct target_ops *ops)
ops->to_call_history_range = delegate_call_history_range;
if (ops->to_augmented_libraries_svr4_read == NULL)
ops->to_augmented_libraries_svr4_read = delegate_augmented_libraries_svr4_read;
+ if (ops->to_decr_pc_after_break == NULL)
+ ops->to_decr_pc_after_break = delegate_decr_pc_after_break;
}
static void
@@ -1973,4 +1982,5 @@ install_dummy_methods (struct target_ops *ops)
ops->to_call_history_from = tdefault_call_history_from;
ops->to_call_history_range = tdefault_call_history_range;
ops->to_augmented_libraries_svr4_read = tdefault_augmented_libraries_svr4_read;
+ ops->to_decr_pc_after_break = default_target_decr_pc_after_break;
}