Add target_ops argument to to_use_agent
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:45:10 +0000 (21:45 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:46:40 +0000 (07:46 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target.h (struct target_ops) <to_use_agent>: 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
gdb/inf-child.c
gdb/remote.c
gdb/target.c
gdb/target.h

index 07b9bf44976a0ba93bd855bcbe646396a44c0337..2ae2e4145813bc463714dc61f2ca1a57d484cf92 100644 (file)
@@ -1,3 +1,11 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops) <to_use_agent>: 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  <tromey@redhat.com>
 
        * tracepoint.c (tfile_traceframe_info): Add 'self' argument.
index 054e2794717bf3e6cfd793012b18fead6a70b62b..8c5d9e6aae84258f9fb8d7d1d0bbfc3f42b48040 100644 (file)
@@ -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 ())
     {
index f92a658792cccb04e9415ef93db878cb868b873d..a9b5950461ad2ed35db78b94e185d8e388e482d1 100644 (file)
@@ -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)
     {
index 05b2e4b487bd5c9052a90d9559073d04f500335e..deb542516f05b12eece3b9bd0dfdef12fbfb968a 100644 (file)
@@ -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))
index 2c248a6240e59054a966bcc54510f2638b0092c1..c63d932b7cbfa5785cb59ccecfd3e1ba5aa5117a 100644 (file)
@@ -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) (&current_target)
 
 #define target_use_agent(use) \
-  (*current_target.to_use_agent) (use)
+  (*current_target.to_use_agent) (&current_target, use)
 
 #define target_can_use_agent() \
   (*current_target.to_can_use_agent) ()
This page took 0.035142 seconds and 4 git commands to generate.