From 46917d26c8a2aa8054bbed410c432eadf355d172 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 13 Dec 2013 13:26:04 -0700 Subject: convert to_supports_btrace This adds a "self" argument to to_supports_btrace. Due to how one implementation of this method is shared with gdbserver this required a small change to gdbserver as well. 2014-02-19 Tom Tromey * common/linux-btrace.c (linux_supports_btrace): Add "ops" argument. * common/linux-btrace.h (linux_supports_btrace): Update. * remote.c (remote_supports_btrace): Add "self" argument. * target-delegates.c: Rebuild. * target.c (target_supports_btrace): Remove. * target.h (struct target_ops) : Add target_ops argument. (target_supports_btrace): New define. 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add target_ops argument. (target_supports_btrace): Update. --- gdb/target.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/target.h') diff --git a/gdb/target.h b/gdb/target.h index 25b54d9..7709c16 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -872,7 +872,8 @@ struct target_ops int (*to_can_use_agent) (void); /* Check whether the target supports branch tracing. */ - int (*to_supports_btrace) (void); + int (*to_supports_btrace) (struct target_ops *) + TARGET_DEFAULT_RETURN (0); /* Enable branch tracing for PTID and allocate a branch trace target information struct for reading and for disabling branch trace. */ @@ -2032,7 +2033,8 @@ extern void update_target_permissions (void); void target_ignore (void); /* See to_supports_btrace in struct target_ops. */ -extern int target_supports_btrace (void); +#define target_supports_btrace() \ + (current_target.to_supports_btrace (¤t_target)) /* See to_enable_btrace in struct target_ops. */ extern struct btrace_target_info *target_enable_btrace (ptid_t ptid); -- cgit v1.1