From 25e95349d8bc9dc7b2374cc0f684c5c6fbc6219a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 17 Dec 2013 21:45:48 -0700 Subject: [PATCH] Add target_ops argument to to_disable_btrace 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. * target.c (target_disable_btrace): Add argument. * remote.c (remote_disable_btrace): Add 'self' argument. * i386-linux-nat.c (i386_linux_disable_btrace): Add 'self' argument. * amd64-linux-nat.c (amd64_linux_disable_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 d36e75a0d66..f645612ac71 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_disable_btrace): Add argument. + * remote.c (remote_disable_btrace): Add 'self' argument. + * i386-linux-nat.c (i386_linux_disable_btrace): Add 'self' + argument. + * amd64-linux-nat.c (amd64_linux_disable_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 51f04769e49..b72bb8467bc 100644 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -1172,7 +1172,8 @@ amd64_linux_enable_btrace (struct target_ops *self, ptid_t ptid) /* Disable branch tracing. */ static void -amd64_linux_disable_btrace (struct btrace_target_info *tinfo) +amd64_linux_disable_btrace (struct target_ops *self, + struct btrace_target_info *tinfo) { enum btrace_error errcode = linux_disable_btrace (tinfo); diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index 8d6d92941a7..9c990361135 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -1083,7 +1083,8 @@ i386_linux_enable_btrace (struct target_ops *self, ptid_t ptid) /* Disable branch tracing. */ static void -i386_linux_disable_btrace (struct btrace_target_info *tinfo) +i386_linux_disable_btrace (struct target_ops *self, + struct btrace_target_info *tinfo) { enum btrace_error errcode = linux_disable_btrace (tinfo); diff --git a/gdb/remote.c b/gdb/remote.c index b2a7992cc52..939d2667f10 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -11279,7 +11279,8 @@ remote_enable_btrace (struct target_ops *self, ptid_t ptid) /* Disable branch tracing. */ static void -remote_disable_btrace (struct btrace_target_info *tinfo) +remote_disable_btrace (struct target_ops *self, + struct btrace_target_info *tinfo) { struct packet_config *packet = &remote_protocol_packets[PACKET_Qbtrace_off]; struct remote_state *rs = get_remote_state (); diff --git a/gdb/target.c b/gdb/target.c index be42e0cbbb1..06ada9c2143 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -4215,7 +4215,7 @@ target_disable_btrace (struct btrace_target_info *btinfo) for (t = current_target.beneath; t != NULL; t = t->beneath) if (t->to_disable_btrace != NULL) { - t->to_disable_btrace (btinfo); + t->to_disable_btrace (t, btinfo); return; } diff --git a/gdb/target.h b/gdb/target.h index 83563949da5..123282ae753 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -907,7 +907,8 @@ struct target_ops ptid_t ptid); /* Disable branch tracing and deallocate TINFO. */ - void (*to_disable_btrace) (struct btrace_target_info *tinfo); + void (*to_disable_btrace) (struct target_ops *, + struct btrace_target_info *tinfo); /* Disable branch tracing and deallocate TINFO. This function is similar to to_disable_btrace, except that it is called during teardown and is -- 2.30.2