aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2014-01-17 13:29:19 +0100
committerMarkus Metzger <markus.t.metzger@intel.com>2015-02-09 09:31:14 +0100
commit043c35779713a14e0916a1b3e31e006cd1270ee4 (patch)
tree78cc293d4bfbd43ae860a32373ab7721542fe5ea /gdb/target.h
parent734b0e4bda4c56d0003182cdc3f5137d4bea00d4 (diff)
downloadgdb-043c35779713a14e0916a1b3e31e006cd1270ee4.zip
gdb-043c35779713a14e0916a1b3e31e006cd1270ee4.tar.gz
gdb-043c35779713a14e0916a1b3e31e006cd1270ee4.tar.bz2
btrace: add format argument to supports_btrace
Add a format argument to the various supports_btrace functions to check for support of a specific btrace format. This is to prepare for a new format. Removed two redundant calls. The check will be made in the subsequent btrace_enable call. 2015-02-09 Markus Metzger <markus.t.metzger@intel.com> * btrace.c (btrace_enable): Pass BTRACE_FORMAT_BTS. * record-btrace.c (record_btrace_open): Remove call to target_supports_btrace. * remote.c (remote_supports_btrace): Update parameters. * target.c (target_supports_btrace): Update parameters. * target.h (to_supports_btrace, target_supports_btrace): Update parameters. * target-delegates.c: Regenerate. * target-debug.h (target_debug_print_enum_btrace_format): New. * nat/linux-btrace.c (kernel_supports_btrace): Rename into ... (kernel_supports_bts): ... this. Update users. Update warning text. (intel_supports_btrace): Rename into ... (intel_supports_bts): ... this. Update users. (cpu_supports_btrace): Rename into ... (cpu_supports_bts): ... this. Update users. (linux_supports_btrace): Update parameters. Split into this and ... (linux_supports_bts): ... this. * nat/linux-btrace.h (linux_supports_btrace): Update parameters. gdbserver/ * server.c (handle_btrace_general_set): Remove call to target_supports_btrace. (supported_btrace_packets): New. (handle_query): Call supported_btrace_packets. * target.h: include btrace-common.h. (btrace_target_info): Removed. (supports_btrace, target_supports_btrace): Update parameters.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 36fa3c6..803ef28 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -999,7 +999,7 @@ struct target_ops
TARGET_DEFAULT_RETURN (0);
/* Check whether the target supports branch tracing. */
- int (*to_supports_btrace) (struct target_ops *)
+ int (*to_supports_btrace) (struct target_ops *, enum btrace_format)
TARGET_DEFAULT_RETURN (0);
/* Enable branch tracing for PTID and allocate a branch trace target
@@ -2215,8 +2215,7 @@ extern void update_target_permissions (void);
/* Imported from machine dependent code. */
/* See to_supports_btrace in struct target_ops. */
-#define target_supports_btrace() \
- (current_target.to_supports_btrace (&current_target))
+extern int target_supports_btrace (enum btrace_format);
/* See to_enable_btrace in struct target_ops. */
extern struct btrace_target_info *target_enable_btrace (ptid_t ptid);