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

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

index 2ae2e4145813bc463714dc61f2ca1a57d484cf92..811a100f00e8f3244582a2f8a2f056778ad3ab52 100644 (file)
@@ -1,3 +1,11 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops) <to_can_use_agent>: 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  <tromey@redhat.com>
 
        * target.h (struct target_ops) <to_use_agent>: Add argument.
index 8c5d9e6aae84258f9fb8d7d1d0bbfc3f42b48040..fd03a9fbaf493a770c59ae3f9bc465edd486e963 100644 (file)
@@ -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 ();
 }
index a9b5950461ad2ed35db78b94e185d8e388e482d1..03fd1c0982cacab7bc87a59ccdca9e8d75ddf578 100644 (file)
@@ -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);
 }
index deb542516f05b12eece3b9bd0dfdef12fbfb968a..0a52b9e093362a3a80f8d63a6a9d5c1f15cd2195 100644 (file)
@@ -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))
index c63d932b7cbfa5785cb59ccecfd3e1ba5aa5117a..512a93027f3a0b7c86cde26e9e86e1ea664e59f5 100644 (file)
@@ -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) (&current_target, use)
 
 #define target_can_use_agent() \
-  (*current_target.to_can_use_agent) ()
+  (*current_target.to_can_use_agent) (&current_target)
 
 #define target_augmented_libraries_svr4_read() \
   (*current_target.to_augmented_libraries_svr4_read) ()
This page took 0.034461 seconds and 4 git commands to generate.