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  <tromey@redhat.com>

	* 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) <to_supports_btrace>: Add
	target_ops argument.
	(target_supports_btrace): New define.

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <supports_btrace>: Add target_ops
	argument.
	(target_supports_btrace): Update.
This commit is contained in:
Tom Tromey
2013-12-13 13:26:04 -07:00
parent 6b84065d0e
commit 46917d26c8
9 changed files with 46 additions and 23 deletions

View File

@@ -350,7 +350,7 @@ struct target_ops
int (*supports_agent) (void);
/* Check whether the target supports branch tracing. */
int (*supports_btrace) (void);
int (*supports_btrace) (struct target_ops *);
/* Enable branch tracing for @ptid and allocate a branch trace target
information struct for reading and for disabling branch trace. */
@@ -491,8 +491,9 @@ int kill_inferior (int);
(the_target->supports_agent ? \
(*the_target->supports_agent) () : 0)
#define target_supports_btrace() \
(the_target->supports_btrace ? (*the_target->supports_btrace) () : 0)
#define target_supports_btrace() \
(the_target->supports_btrace \
? (*the_target->supports_btrace) (the_target) : 0)
#define target_enable_btrace(ptid) \
(*the_target->enable_btrace) (ptid)