From 1777056d68eff4d68e0e00314d6050abaf9dff5f Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 17 Dec 2013 21:46:00 -0700 Subject: [PATCH] Add target_ops argument to to_teardown_btrace 2014-02-19 Tom Tromey * target.h (struct target_ops) : 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. --- gdb/ChangeLog | 10 ++++++++++ gdb/amd64-linux-nat.c | 3 ++- gdb/i386-linux-nat.c | 3 ++- gdb/remote.c | 3 ++- gdb/target.c | 2 +- gdb/target.h | 3 ++- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f645612ac7..5c9b175e5e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2014-02-19 Tom Tromey + + * target.h (struct target_ops) : 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 * target.h (struct target_ops) : Add argument. diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c index b72bb8467b..d7256c3ef5 100644 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -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); diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index 9c99036113..0f8bc82219 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -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); diff --git a/gdb/remote.c b/gdb/remote.c index 939d2667f1..b77ea81549 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -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); diff --git a/gdb/target.c b/gdb/target.c index 06ada9c214..e1ffaf0df6 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -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; } diff --git a/gdb/target.h b/gdb/target.h index 123282ae75..982bc185b6 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -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. -- 2.34.1