Add target_ops argument to to_teardown_btrace

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

	* target.h (struct target_ops) <to_teardown_btrace>: Add argument.
	* target.c (target_teardown_btrace): Add argument.
	* remote.c (remote_teardown_btrace): Add 'self' argument.
	* i386-linux-nat.c (i386_linux_teardown_btrace): Add 'self'
	argument.
	* amd64-linux-nat.c (amd64_linux_teardown_btrace): Add 'self'
	argument.
This commit is contained in:
Tom Tromey 2013-12-17 21:46:00 -07:00
parent 25e95349d8
commit 1777056d68
6 changed files with 19 additions and 5 deletions

View file

@ -1,3 +1,13 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_teardown_btrace>: Add argument.
* target.c (target_teardown_btrace): Add argument.
* remote.c (remote_teardown_btrace): Add 'self' argument.
* i386-linux-nat.c (i386_linux_teardown_btrace): Add 'self'
argument.
* amd64-linux-nat.c (amd64_linux_teardown_btrace): Add 'self'
argument.
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_disable_btrace>: Add argument.

View file

@ -1184,7 +1184,8 @@ amd64_linux_disable_btrace (struct target_ops *self,
/* Teardown branch tracing. */
static void
amd64_linux_teardown_btrace (struct btrace_target_info *tinfo)
amd64_linux_teardown_btrace (struct target_ops *self,
struct btrace_target_info *tinfo)
{
/* Ignore errors. */
linux_disable_btrace (tinfo);

View file

@ -1095,7 +1095,8 @@ i386_linux_disable_btrace (struct target_ops *self,
/* Teardown branch tracing. */
static void
i386_linux_teardown_btrace (struct btrace_target_info *tinfo)
i386_linux_teardown_btrace (struct target_ops *self,
struct btrace_target_info *tinfo)
{
/* Ignore errors. */
linux_disable_btrace (tinfo);

View file

@ -11312,7 +11312,8 @@ remote_disable_btrace (struct target_ops *self,
/* Teardown branch tracing. */
static void
remote_teardown_btrace (struct btrace_target_info *tinfo)
remote_teardown_btrace (struct target_ops *self,
struct btrace_target_info *tinfo)
{
/* We must not talk to the target during teardown. */
xfree (tinfo);

View file

@ -4232,7 +4232,7 @@ target_teardown_btrace (struct btrace_target_info *btinfo)
for (t = current_target.beneath; t != NULL; t = t->beneath)
if (t->to_teardown_btrace != NULL)
{
t->to_teardown_btrace (btinfo);
t->to_teardown_btrace (t, btinfo);
return;
}

View file

@ -914,7 +914,8 @@ struct target_ops
to to_disable_btrace, except that it is called during teardown and is
only allowed to perform actions that are safe. A counter-example would
be attempting to talk to a remote target. */
void (*to_teardown_btrace) (struct btrace_target_info *tinfo);
void (*to_teardown_btrace) (struct target_ops *,
struct btrace_target_info *tinfo);
/* Read branch trace data for the thread indicated by BTINFO into DATA.
DATA is cleared before new trace is added.