aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-19 08:19:41 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:38 -0700
commit6dc7fcf4c1e9cbea86ebd067ce226ffdffa16c08 (patch)
tree79b9bfc2d0a5ad16d46667625aeec725301350b8 /gdb/target-delegates.c
parenteb5b20d4902e973cad84b9ba8eef2e404a6804d5 (diff)
downloadgdb-6dc7fcf4c1e9cbea86ebd067ce226ffdffa16c08.zip
gdb-6dc7fcf4c1e9cbea86ebd067ce226ffdffa16c08.tar.gz
gdb-6dc7fcf4c1e9cbea86ebd067ce226ffdffa16c08.tar.bz2
convert to_enable_btrace
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (target_enable_btrace): Unconditionally delegate. * target.h (struct target_ops) <to_enable_btrace>: 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 1b956d2..df17c7b 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -1300,6 +1300,19 @@ tdefault_supports_btrace (struct target_ops *self)
return 0;
}
+static struct btrace_target_info *
+delegate_enable_btrace (struct target_ops *self, ptid_t arg1)
+{
+ self = self->beneath;
+ return self->to_enable_btrace (self, arg1);
+}
+
+static struct btrace_target_info *
+tdefault_enable_btrace (struct target_ops *self, ptid_t arg1)
+{
+ tcomplain ();
+}
+
static void
delegate_disable_btrace (struct target_ops *self, struct btrace_target_info *arg1)
{
@@ -1731,6 +1744,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_enable_btrace == NULL)
+ ops->to_enable_btrace = delegate_enable_btrace;
if (ops->to_disable_btrace == NULL)
ops->to_disable_btrace = delegate_disable_btrace;
if (ops->to_teardown_btrace == NULL)
@@ -1878,6 +1893,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_enable_btrace = tdefault_enable_btrace;
ops->to_disable_btrace = tdefault_disable_btrace;
ops->to_teardown_btrace = tdefault_teardown_btrace;
ops->to_read_btrace = tdefault_read_btrace;