Add target_ops argument to to_enable_btrace

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

	* target.h (struct target_ops) <to_enable_btrace>: Add argument.
	* target.c (target_enable_btrace): Add argument.
	* remote.c (remote_enable_btrace): Add 'self' argument.
	* i386-linux-nat.c (i386_linux_enable_btrace): Add 'self'
	argument.
	* amd64-linux-nat.c (amd64_linux_enable_btrace): Add 'self'
	argument.
This commit is contained in:
Tom Tromey 2013-12-17 21:45:35 -07:00
parent fe38f8971f
commit e3c49f88a2
6 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,13 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_enable_btrace>: Add argument.
* target.c (target_enable_btrace): Add argument.
* remote.c (remote_enable_btrace): Add 'self' argument.
* i386-linux-nat.c (i386_linux_enable_btrace): Add 'self'
argument.
* amd64-linux-nat.c (amd64_linux_enable_btrace): Add 'self'
argument.
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_can_use_agent>: Add argument.

View File

@ -1150,7 +1150,7 @@ amd64_linux_read_description (struct target_ops *ops)
/* Enable branch tracing. */
static struct btrace_target_info *
amd64_linux_enable_btrace (ptid_t ptid)
amd64_linux_enable_btrace (struct target_ops *self, ptid_t ptid)
{
struct btrace_target_info *tinfo;
struct gdbarch *gdbarch;

View File

@ -1061,7 +1061,7 @@ i386_linux_read_description (struct target_ops *ops)
/* Enable branch tracing. */
static struct btrace_target_info *
i386_linux_enable_btrace (ptid_t ptid)
i386_linux_enable_btrace (struct target_ops *self, ptid_t ptid)
{
struct btrace_target_info *tinfo;
struct gdbarch *gdbarch;

View File

@ -11243,7 +11243,7 @@ remote_supports_btrace (struct target_ops *self)
/* Enable branch tracing. */
static struct btrace_target_info *
remote_enable_btrace (ptid_t ptid)
remote_enable_btrace (struct target_ops *self, ptid_t ptid)
{
struct btrace_target_info *tinfo = NULL;
struct packet_config *packet = &remote_protocol_packets[PACKET_Qbtrace_bts];

View File

@ -4199,7 +4199,7 @@ target_enable_btrace (ptid_t ptid)
for (t = current_target.beneath; t != NULL; t = t->beneath)
if (t->to_enable_btrace != NULL)
return t->to_enable_btrace (ptid);
return t->to_enable_btrace (t, ptid);
tcomplain ();
return NULL;

View File

@ -903,7 +903,8 @@ struct target_ops
/* Enable branch tracing for PTID and allocate a branch trace target
information struct for reading and for disabling branch trace. */
struct btrace_target_info *(*to_enable_btrace) (ptid_t ptid);
struct btrace_target_info *(*to_enable_btrace) (struct target_ops *,
ptid_t ptid);
/* Disable branch tracing and deallocate TINFO. */
void (*to_disable_btrace) (struct btrace_target_info *tinfo);