aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 14:11:53 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:47:55 -0700
commit9249843f19916f0ba5d02749b0811765babf527a (patch)
treecde5c92d0d534e7e0525d8c5b194663fe17bf6b8 /gdb/target-delegates.c
parentace92e7d1435c46e3085f1183f957ab372b1f4a8 (diff)
downloadgdb-9249843f19916f0ba5d02749b0811765babf527a.zip
gdb-9249843f19916f0ba5d02749b0811765babf527a.tar.gz
gdb-9249843f19916f0ba5d02749b0811765babf527a.tar.bz2
convert to_get_min_fast_tracepoint_insn_len
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default to_get_min_fast_tracepoint_insn_len. (return_minus_one): Remove. * target.h (struct target_ops) <to_get_min_fast_tracepoint_insn_len>: 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 cdf2905..ae9e567 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -859,6 +859,19 @@ tdefault_get_raw_trace_data (struct target_ops *self, gdb_byte *arg1, ULONGEST a
}
static int
+delegate_get_min_fast_tracepoint_insn_len (struct target_ops *self)
+{
+ self = self->beneath;
+ return self->to_get_min_fast_tracepoint_insn_len (self);
+}
+
+static int
+tdefault_get_min_fast_tracepoint_insn_len (struct target_ops *self)
+{
+ return -1;
+}
+
+static int
delegate_supports_btrace (struct target_ops *self)
{
self = self->beneath;
@@ -1020,6 +1033,8 @@ install_delegators (struct target_ops *ops)
ops->to_upload_trace_state_variables = delegate_upload_trace_state_variables;
if (ops->to_get_raw_trace_data == NULL)
ops->to_get_raw_trace_data = delegate_get_raw_trace_data;
+ if (ops->to_get_min_fast_tracepoint_insn_len == NULL)
+ ops->to_get_min_fast_tracepoint_insn_len = delegate_get_min_fast_tracepoint_insn_len;
if (ops->to_supports_btrace == NULL)
ops->to_supports_btrace = delegate_supports_btrace;
}
@@ -1100,5 +1115,6 @@ install_dummy_methods (struct target_ops *ops)
ops->to_upload_tracepoints = tdefault_upload_tracepoints;
ops->to_upload_trace_state_variables = tdefault_upload_trace_state_variables;
ops->to_get_raw_trace_data = tdefault_get_raw_trace_data;
+ ops->to_get_min_fast_tracepoint_insn_len = tdefault_get_min_fast_tracepoint_insn_len;
ops->to_supports_btrace = tdefault_supports_btrace;
}