From 2c152180b36b20e14c4562a127d5d7fb8789d175 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 17 Dec 2013 21:45:10 -0700 Subject: [PATCH] Add target_ops argument to to_use_agent 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. (target_use_agent): Add argument. * target.c (update_current_target): Update. * remote.c (remote_use_agent): Add 'self' argument. * inf-child.c (inf_child_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 07b9bf4497..2ae2e41458 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2014-02-19 Tom Tromey + + * target.h (struct target_ops) : Add argument. + (target_use_agent): Add argument. + * target.c (update_current_target): Update. + * remote.c (remote_use_agent): Add 'self' argument. + * inf-child.c (inf_child_use_agent): Add 'self' argument. + 2014-02-19 Tom Tromey * tracepoint.c (tfile_traceframe_info): Add 'self' argument. diff --git a/gdb/inf-child.c b/gdb/inf-child.c index 054e279471..8c5d9e6aae 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -372,7 +372,7 @@ inf_child_fileio_readlink (struct target_ops *self, } static int -inf_child_use_agent (int use) +inf_child_use_agent (struct target_ops *self, int use) { if (agent_loaded_p ()) { diff --git a/gdb/remote.c b/gdb/remote.c index f92a658792..a9b5950461 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -11192,7 +11192,7 @@ remote_set_trace_notes (struct target_ops *self, } static int -remote_use_agent (int use) +remote_use_agent (struct target_ops *self, int use) { if (remote_protocol_packets[PACKET_QAgent].support != PACKET_DISABLE) { diff --git a/gdb/target.c b/gdb/target.c index 05b2e4b487..deb542516f 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -941,7 +941,7 @@ update_current_target (void) (int (*) (struct target_ops *)) return_zero); de_fault (to_use_agent, - (int (*) (int)) + (int (*) (struct target_ops *, int)) tcomplain); de_fault (to_can_use_agent, (int (*) (void)) diff --git a/gdb/target.h b/gdb/target.h index 2c248a6240..c63d932b7c 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -892,7 +892,7 @@ struct target_ops /* Ask the target to use or not to use agent according to USE. Return 1 successful, 0 otherwise. */ - int (*to_use_agent) (int use); + 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); @@ -1879,7 +1879,7 @@ extern char *target_fileio_read_stralloc (const char *filename); (*current_target.to_traceframe_info) (¤t_target) #define target_use_agent(use) \ - (*current_target.to_use_agent) (use) + (*current_target.to_use_agent) (¤t_target, use) #define target_can_use_agent() \ (*current_target.to_can_use_agent) () -- 2.34.1