From: Tom Tromey Date: Wed, 18 Dec 2013 04:45:35 +0000 (-0700) Subject: Add target_ops argument to to_enable_btrace X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e3c49f88a28ae59ca4d339fac721719038da746d;p=binutils-gdb.git Add target_ops argument to to_enable_btrace 2014-02-19 Tom Tromey * target.h (struct target_ops) : 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 811a100f00e..d36e75a0d66 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_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 * target.h (struct target_ops) : Add argument. diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c index af841420d20..51f04769e49 100644 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -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; diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index f7be40cee11..8d6d92941a7 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -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; diff --git a/gdb/remote.c b/gdb/remote.c index 03fd1c0982c..b2a7992cc52 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -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]; diff --git a/gdb/target.c b/gdb/target.c index 0a52b9e0933..be42e0cbbb1 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -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; diff --git a/gdb/target.h b/gdb/target.h index 512a93027f3..83563949da5 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -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);