From fe38f8971f81ab42937d4c22f85bba5d8e48ada9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 17 Dec 2013 21:45:22 -0700 Subject: [PATCH] Add target_ops argument to to_can_use_agent 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. (target_can_use_agent): Add argument. * target.c (update_current_target): Update. * remote.c (remote_can_use_agent): Add 'self' argument. * inf-child.c (inf_child_can_use_agent): Add 'self' argument. --- gdb/ChangeLog | 8 ++++++++ gdb/inf-child.c | 2 +- gdb/remote.c | 2 +- gdb/target.c | 2 +- gdb/target.h | 4 ++-- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2ae2e41458..811a100f00 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2014-02-19 Tom Tromey + + * target.h (struct target_ops) : Add argument. + (target_can_use_agent): Add argument. + * target.c (update_current_target): Update. + * remote.c (remote_can_use_agent): Add 'self' argument. + * inf-child.c (inf_child_can_use_agent): Add 'self' argument. + 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. diff --git a/gdb/inf-child.c b/gdb/inf-child.c index 8c5d9e6aae..fd03a9fbaf 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -384,7 +384,7 @@ inf_child_use_agent (struct target_ops *self, int use) } static int -inf_child_can_use_agent (void) +inf_child_can_use_agent (struct target_ops *self) { return agent_loaded_p (); } diff --git a/gdb/remote.c b/gdb/remote.c index a9b5950461..03fd1c0982 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -11214,7 +11214,7 @@ remote_use_agent (struct target_ops *self, int use) } static int -remote_can_use_agent (void) +remote_can_use_agent (struct target_ops *self) { return (remote_protocol_packets[PACKET_QAgent].support != PACKET_DISABLE); } diff --git a/gdb/target.c b/gdb/target.c index deb542516f..0a52b9e093 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -944,7 +944,7 @@ update_current_target (void) (int (*) (struct target_ops *, int)) tcomplain); de_fault (to_can_use_agent, - (int (*) (void)) + (int (*) (struct target_ops *)) return_zero); de_fault (to_augmented_libraries_svr4_read, (int (*) (void)) diff --git a/gdb/target.h b/gdb/target.h index c63d932b7c..512a93027f 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -895,7 +895,7 @@ struct target_ops int (*to_use_agent) (struct target_ops *, int use); /* Is the target able to use agent in current state? */ - int (*to_can_use_agent) (void); + int (*to_can_use_agent) (struct target_ops *); /* Check whether the target supports branch tracing. */ int (*to_supports_btrace) (struct target_ops *) @@ -1882,7 +1882,7 @@ extern char *target_fileio_read_stralloc (const char *filename); (*current_target.to_use_agent) (¤t_target, use) #define target_can_use_agent() \ - (*current_target.to_can_use_agent) () + (*current_target.to_can_use_agent) (¤t_target) #define target_augmented_libraries_svr4_read() \ (*current_target.to_augmented_libraries_svr4_read) () -- 2.34.1