aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2013-11-13 15:31:07 +0100
committerMarkus Metzger <markus.t.metzger@intel.com>2015-02-09 09:21:44 +0100
commit734b0e4bda4c56d0003182cdc3f5137d4bea00d4 (patch)
treea34c2a80c9f4bdea4085d614b3999b0d06af22f3 /gdb/target-delegates.c
parent989f98793c06132bb5cdc2f7807b7eee5108342f (diff)
downloadfsf-binutils-gdb-734b0e4bda4c56d0003182cdc3f5137d4bea00d4.zip
fsf-binutils-gdb-734b0e4bda4c56d0003182cdc3f5137d4bea00d4.tar.gz
fsf-binutils-gdb-734b0e4bda4c56d0003182cdc3f5137d4bea00d4.tar.bz2
btrace: add struct btrace_data
Add a structure to hold the branch trace data and an enum to describe the format of that data. So far, only BTS is supported. Also added a NONE format to indicate that no branch trace data is available. This will make it easier to support different branch trace formats in the future. 2015-02-09 Markus Metzger <markus.t.metzger@intel.com> * Makefile.in (SFILES): Add common/btrace-common.c. (COMMON_OBS): Add common/btrace-common.o. (btrace-common.o): Add build rules. * btrace.c (parse_xml_btrace): Update parameters. (parse_xml_btrace_block): Set format field. (btrace_add_pc, btrace_fetch): Use struct btrace_data. (do_btrace_data_cleanup, make_cleanup_btrace_data): New. (btrace_compute_ftrace): Split into this and... (btrace_compute_ftrace_bts): ...this. (btrace_stitch_trace): Split into this and... (btrace_stitch_bts): ...this. * btrace.h (parse_xml_btrace): Update parameters. (make_cleanup_btrace_data): New. * common/btrace-common.c: New. * common/btrace-common.h: Include common-defs.h. (btrace_block_s): Update comment. (btrace_format): New. (btrace_format_string): New. (btrace_data_bts): New. (btrace_data): New. (btrace_data_init, btrace_data_fini, btrace_data_empty): New. * remote.c (remote_read_btrace): Update parameters. * target.c (target_read_btrace): Update parameters. * target.h (target_read_btrace): Update parameters. (target_ops)<to_read_btrace>: Update parameters. * x86-linux-nat.c (x86_linux_read_btrace): Update parameters. * target-delegates.c: Regenerate. * target-debug (target_debug_print_struct_btrace_data_p): New. * nat/linux-btrace.c (linux_read_btrace): Split into this and... (linux_read_bts): ...this. * nat/linux-btrace.h (linux_read_btrace): Update parameters. gdbserver/ * Makefile.in (SFILES): Add common/btrace-common.c. (OBS): Add common/btrace-common.o. (btrace-common.o): Add build rules. * linux-low: Include btrace-common.h. (linux_low_read_btrace): Use struct btrace_data. Call btrace_data_init and btrace_data_fini.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 9beb5ff..00956ba 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -3191,20 +3191,20 @@ debug_teardown_btrace (struct target_ops *self, struct btrace_target_info *arg1)
}
static enum btrace_error
-delegate_read_btrace (struct target_ops *self, VEC (btrace_block_s) **arg1, struct btrace_target_info *arg2, enum btrace_read_type arg3)
+delegate_read_btrace (struct target_ops *self, struct btrace_data *arg1, struct btrace_target_info *arg2, enum btrace_read_type arg3)
{
self = self->beneath;
return self->to_read_btrace (self, arg1, arg2, arg3);
}
static enum btrace_error
-tdefault_read_btrace (struct target_ops *self, VEC (btrace_block_s) **arg1, struct btrace_target_info *arg2, enum btrace_read_type arg3)
+tdefault_read_btrace (struct target_ops *self, struct btrace_data *arg1, struct btrace_target_info *arg2, enum btrace_read_type arg3)
{
tcomplain ();
}
static enum btrace_error
-debug_read_btrace (struct target_ops *self, VEC (btrace_block_s) **arg1, struct btrace_target_info *arg2, enum btrace_read_type arg3)
+debug_read_btrace (struct target_ops *self, struct btrace_data *arg1, struct btrace_target_info *arg2, enum btrace_read_type arg3)
{
enum btrace_error result;
fprintf_unfiltered (gdb_stdlog, "-> %s->to_read_btrace (...)\n", debug_target.to_shortname);
@@ -3212,7 +3212,7 @@ debug_read_btrace (struct target_ops *self, VEC (btrace_block_s) **arg1, struct
fprintf_unfiltered (gdb_stdlog, "<- %s->to_read_btrace (", debug_target.to_shortname);
target_debug_print_struct_target_ops_p (&debug_target);
fputs_unfiltered (", ", gdb_stdlog);
- target_debug_print_VEC__btrace_block_s__pp (arg1);
+ target_debug_print_struct_btrace_data_p (arg1);
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_struct_btrace_target_info_p (arg2);
fputs_unfiltered (", ", gdb_stdlog);