aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c45
1 files changed, 40 insertions, 5 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 9cdb31e..e026179 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -3114,28 +3114,30 @@ debug_supports_btrace (struct target_ops *self, enum btrace_format arg1)
}
static struct btrace_target_info *
-delegate_enable_btrace (struct target_ops *self, ptid_t arg1)
+delegate_enable_btrace (struct target_ops *self, ptid_t arg1, const struct btrace_config *arg2)
{
self = self->beneath;
- return self->to_enable_btrace (self, arg1);
+ return self->to_enable_btrace (self, arg1, arg2);
}
static struct btrace_target_info *
-tdefault_enable_btrace (struct target_ops *self, ptid_t arg1)
+tdefault_enable_btrace (struct target_ops *self, ptid_t arg1, const struct btrace_config *arg2)
{
tcomplain ();
}
static struct btrace_target_info *
-debug_enable_btrace (struct target_ops *self, ptid_t arg1)
+debug_enable_btrace (struct target_ops *self, ptid_t arg1, const struct btrace_config *arg2)
{
struct btrace_target_info * result;
fprintf_unfiltered (gdb_stdlog, "-> %s->to_enable_btrace (...)\n", debug_target.to_shortname);
- result = debug_target.to_enable_btrace (&debug_target, arg1);
+ result = debug_target.to_enable_btrace (&debug_target, arg1, arg2);
fprintf_unfiltered (gdb_stdlog, "<- %s->to_enable_btrace (", debug_target.to_shortname);
target_debug_print_struct_target_ops_p (&debug_target);
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_ptid_t (arg1);
+ fputs_unfiltered (", ", gdb_stdlog);
+ target_debug_print_const_struct_btrace_config_p (arg2);
fputs_unfiltered (") = ", gdb_stdlog);
target_debug_print_struct_btrace_target_info_p (result);
fputs_unfiltered ("\n", gdb_stdlog);
@@ -3225,6 +3227,35 @@ debug_read_btrace (struct target_ops *self, struct btrace_data *arg1, struct btr
return result;
}
+static const struct btrace_config *
+delegate_btrace_conf (struct target_ops *self, const struct btrace_target_info *arg1)
+{
+ self = self->beneath;
+ return self->to_btrace_conf (self, arg1);
+}
+
+static const struct btrace_config *
+tdefault_btrace_conf (struct target_ops *self, const struct btrace_target_info *arg1)
+{
+ return NULL;
+}
+
+static const struct btrace_config *
+debug_btrace_conf (struct target_ops *self, const struct btrace_target_info *arg1)
+{
+ const struct btrace_config * result;
+ fprintf_unfiltered (gdb_stdlog, "-> %s->to_btrace_conf (...)\n", debug_target.to_shortname);
+ result = debug_target.to_btrace_conf (&debug_target, arg1);
+ fprintf_unfiltered (gdb_stdlog, "<- %s->to_btrace_conf (", debug_target.to_shortname);
+ target_debug_print_struct_target_ops_p (&debug_target);
+ fputs_unfiltered (", ", gdb_stdlog);
+ target_debug_print_const_struct_btrace_target_info_p (arg1);
+ fputs_unfiltered (") = ", gdb_stdlog);
+ target_debug_print_const_struct_btrace_config_p (result);
+ fputs_unfiltered ("\n", gdb_stdlog);
+ return result;
+}
+
static void
delegate_stop_recording (struct target_ops *self)
{
@@ -3972,6 +4003,8 @@ install_delegators (struct target_ops *ops)
ops->to_teardown_btrace = delegate_teardown_btrace;
if (ops->to_read_btrace == NULL)
ops->to_read_btrace = delegate_read_btrace;
+ if (ops->to_btrace_conf == NULL)
+ ops->to_btrace_conf = delegate_btrace_conf;
if (ops->to_stop_recording == NULL)
ops->to_stop_recording = delegate_stop_recording;
if (ops->to_info_record == NULL)
@@ -4135,6 +4168,7 @@ install_dummy_methods (struct target_ops *ops)
ops->to_disable_btrace = tdefault_disable_btrace;
ops->to_teardown_btrace = tdefault_teardown_btrace;
ops->to_read_btrace = tdefault_read_btrace;
+ ops->to_btrace_conf = tdefault_btrace_conf;
ops->to_stop_recording = tdefault_stop_recording;
ops->to_info_record = tdefault_info_record;
ops->to_save_record = tdefault_save_record;
@@ -4278,6 +4312,7 @@ init_debug_target (struct target_ops *ops)
ops->to_disable_btrace = debug_disable_btrace;
ops->to_teardown_btrace = debug_teardown_btrace;
ops->to_read_btrace = debug_read_btrace;
+ ops->to_btrace_conf = debug_btrace_conf;
ops->to_stop_recording = debug_stop_recording;
ops->to_info_record = debug_info_record;
ops->to_save_record = debug_save_record;