aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 20:26:34 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:30 -0700
commitf09e210795cb9e182feb2d02d97a6c9b22a46f53 (patch)
treece4a5e2e0eb0e4d5072f88cfa128f8e65964b5c0 /gdb/target-delegates.c
parent07366925095c7d091360b92bd686b4dc58ecd4f3 (diff)
downloadgdb-f09e210795cb9e182feb2d02d97a6c9b22a46f53.zip
gdb-f09e210795cb9e182feb2d02d97a6c9b22a46f53.tar.gz
gdb-f09e210795cb9e182feb2d02d97a6c9b22a46f53.tar.bz2
convert to_save_record
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (target_save_record): Unconditionally delegate. * target.h (struct target_ops) <to_save_record>: Use TARGET_DEFAULT_NORETURN.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 4e5fd1a..62f68cc 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -1261,6 +1261,19 @@ tdefault_supports_btrace (struct target_ops *self)
}
static void
+delegate_save_record (struct target_ops *self, const char *arg1)
+{
+ self = self->beneath;
+ self->to_save_record (self, arg1);
+}
+
+static void
+tdefault_save_record (struct target_ops *self, const char *arg1)
+{
+ tcomplain ();
+}
+
+static void
delegate_delete_record (struct target_ops *self)
{
self = self->beneath;
@@ -1631,6 +1644,8 @@ install_delegators (struct target_ops *ops)
ops->to_can_use_agent = delegate_can_use_agent;
if (ops->to_supports_btrace == NULL)
ops->to_supports_btrace = delegate_supports_btrace;
+ if (ops->to_save_record == NULL)
+ ops->to_save_record = delegate_save_record;
if (ops->to_delete_record == NULL)
ops->to_delete_record = delegate_delete_record;
if (ops->to_record_is_replaying == NULL)
@@ -1766,6 +1781,7 @@ install_dummy_methods (struct target_ops *ops)
ops->to_use_agent = tdefault_use_agent;
ops->to_can_use_agent = tdefault_can_use_agent;
ops->to_supports_btrace = tdefault_supports_btrace;
+ ops->to_save_record = tdefault_save_record;
ops->to_delete_record = tdefault_delete_record;
ops->to_record_is_replaying = tdefault_record_is_replaying;
ops->to_goto_record_begin = tdefault_goto_record_begin;