aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 14:10:14 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:47:53 -0700
commit1e949b005fbc5a62ba4479a9861e861bc72de2a1 (patch)
treea91e8028af961e7e3a98ade4b897963c932c16f8 /gdb/target-delegates.c
parenta2e6c147fcef5671c6c99f647a8e4587a117db30 (diff)
downloadgdb-1e949b005fbc5a62ba4479a9861e861bc72de2a1.zip
gdb-1e949b005fbc5a62ba4479a9861e861bc72de2a1.tar.gz
gdb-1e949b005fbc5a62ba4479a9861e861bc72de2a1.tar.bz2
convert to_upload_tracepoints
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default to_upload_tracepoints. * target.h (struct target_ops) <to_upload_tracepoints>: Use TARGET_DEFAULT_RETURN.
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 a1844d8..87feef0 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -820,6 +820,19 @@ tdefault_save_trace_data (struct target_ops *self, const char *arg1)
}
static int
+delegate_upload_tracepoints (struct target_ops *self, struct uploaded_tp **arg1)
+{
+ self = self->beneath;
+ return self->to_upload_tracepoints (self, arg1);
+}
+
+static int
+tdefault_upload_tracepoints (struct target_ops *self, struct uploaded_tp **arg1)
+{
+ return 0;
+}
+
+static int
delegate_supports_btrace (struct target_ops *self)
{
self = self->beneath;
@@ -975,6 +988,8 @@ install_delegators (struct target_ops *ops)
ops->to_get_trace_state_variable_value = delegate_get_trace_state_variable_value;
if (ops->to_save_trace_data == NULL)
ops->to_save_trace_data = delegate_save_trace_data;
+ if (ops->to_upload_tracepoints == NULL)
+ ops->to_upload_tracepoints = delegate_upload_tracepoints;
if (ops->to_supports_btrace == NULL)
ops->to_supports_btrace = delegate_supports_btrace;
}
@@ -1052,5 +1067,6 @@ install_dummy_methods (struct target_ops *ops)
ops->to_trace_find = tdefault_trace_find;
ops->to_get_trace_state_variable_value = tdefault_get_trace_state_variable_value;
ops->to_save_trace_data = tdefault_save_trace_data;
+ ops->to_upload_tracepoints = tdefault_upload_tracepoints;
ops->to_supports_btrace = tdefault_supports_btrace;
}