]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add target_ops argument to to_can_run
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:33:31 +0000 (21:33 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:45:50 +0000 (07:45 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* windows-nat.c (windows_can_run): Add 'self' argument.
* target.h (struct target_ops) <to_can_run>: Add argument.
(target_can_run): Add argument.
* target.c (debug_to_can_run): Add argument.
(update_current_target): Update.
* nto-procfs.c (procfs_can_run): Add 'self' argument.
* inf-child.c (inf_child_can_run): Add 'self' argument.
* go32-nat.c (go32_can_run): Add 'self' argument.

gdb/ChangeLog
gdb/go32-nat.c
gdb/inf-child.c
gdb/nto-procfs.c
gdb/target.c
gdb/target.h
gdb/windows-nat.c

index 30db237d0842d370de43657bdd5d803cd6ad6e6b..1cbdfe6f1bae68cc1d3653d8c5e35795c5b6e324 100644 (file)
@@ -1,3 +1,14 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * windows-nat.c (windows_can_run): Add 'self' argument.
+       * target.h (struct target_ops) <to_can_run>: Add argument.
+       (target_can_run): Add argument.
+       * target.c (debug_to_can_run): Add argument.
+       (update_current_target): Update.
+       * nto-procfs.c (procfs_can_run): Add 'self' argument.
+       * inf-child.c (inf_child_can_run): Add 'self' argument.
+       * go32-nat.c (go32_can_run): Add 'self' argument.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target.h (struct target_ops) <to_has_exited>: Add argument.
index 75f6a3ed12588056cbcddd18b7faa3cc9af192f7..2e91b129c265d62ad00735fb1f2292818fd8b9b6 100644 (file)
@@ -737,7 +737,7 @@ go32_mourn_inferior (struct target_ops *ops)
 }
 
 static int
-go32_can_run (void)
+go32_can_run (struct target_ops *self)
 {
   return 1;
 }
index 7726470912b7e4088ae9003e9b52af1424615b9e..37fac4b412b8152a5b1c373353d4124adbb3c332 100644 (file)
@@ -128,7 +128,7 @@ inf_child_follow_fork (struct target_ops *ops, int follow_child,
 }
 
 static int
-inf_child_can_run (void)
+inf_child_can_run (struct target_ops *self)
 {
   return 1;
 }
index 0a7ed55f75261cc2d113b719de23d69130018117..e86511c46300916ab9cac882644d53110af60f33 100644 (file)
@@ -57,7 +57,7 @@ static procfs_run run;
 
 static void procfs_open (char *, int);
 
-static int procfs_can_run (void);
+static int procfs_can_run (struct target_ops *self);
 
 static int procfs_xfer_memory (CORE_ADDR, gdb_byte *, int, int,
                               struct mem_attrib *attrib,
@@ -609,7 +609,7 @@ procfs_files_info (struct target_ops *ignore)
 /* Mark our target-struct as eligible for stray "run" and "attach"
    commands.  */
 static int
-procfs_can_run (void)
+procfs_can_run (struct target_ops *self)
 {
   return 1;
 }
index ff614618181c241bd738d611f1d5de541bd16ca3..cfe9ee74a60c7ff6cb567b26f51862f65aaf2450 100644 (file)
@@ -144,7 +144,7 @@ static void debug_to_terminal_ours (struct target_ops *self);
 
 static void debug_to_load (struct target_ops *self, char *, int);
 
-static int debug_to_can_run (void);
+static int debug_to_can_run (struct target_ops *self);
 
 static void debug_to_stop (ptid_t);
 
@@ -816,6 +816,7 @@ update_current_target (void)
            (int (*) (struct target_ops *, int, int, int *))
            return_zero);
   de_fault (to_can_run,
+           (int (*) (struct target_ops *))
            return_zero);
   de_fault (to_extra_thread_info,
            (char *(*) (struct thread_info *))
@@ -4959,11 +4960,11 @@ debug_to_has_exited (struct target_ops *self,
 }
 
 static int
-debug_to_can_run (void)
+debug_to_can_run (struct target_ops *self)
 {
   int retval;
 
-  retval = debug_target.to_can_run ();
+  retval = debug_target.to_can_run (&debug_target);
 
   fprintf_unfiltered (gdb_stdlog, "target_can_run () = %d\n", retval);
 
index 8d73472fa113f25c87a35c86fdd178e23bbcc665..71546a12906661cfc827b972b3a3fddac8bcf254 100644 (file)
@@ -509,7 +509,7 @@ struct target_ops
                                      int, int, int, int, int *);
     int (*to_has_exited) (struct target_ops *, int, int, int *);
     void (*to_mourn_inferior) (struct target_ops *);
-    int (*to_can_run) (void);
+    int (*to_can_run) (struct target_ops *);
 
     /* Documentation of this routine is provided with the corresponding
        target_* macro.  */
@@ -1383,7 +1383,7 @@ void target_mourn_inferior (void);
 /* Does target have enough data to do a run or attach command? */
 
 #define target_can_run(t) \
-     ((t)->to_can_run) ()
+     ((t)->to_can_run) (t)
 
 /* Set list of signals to be handled in the target.
 
index 8dcc410c52ce9cdee9d84669709db5e5dac5757f..9c1fdb0f31c427b03bd4556165e3e6f7a1158939 100644 (file)
@@ -2475,7 +2475,7 @@ windows_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 }
 
 static int
-windows_can_run (void)
+windows_can_run (struct target_ops *self)
 {
   return 1;
 }