diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-17 21:33:31 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:45:50 -0700 |
commit | da82bd6b65af8f3cec02621435331983b27d93a0 (patch) | |
tree | fa40610d2bee1e86524890eeddcb480a4951266c | |
parent | d796e1d62f3cf00c48bf8e88d3f4e83848080525 (diff) | |
download | gdb-da82bd6b65af8f3cec02621435331983b27d93a0.zip gdb-da82bd6b65af8f3cec02621435331983b27d93a0.tar.gz gdb-da82bd6b65af8f3cec02621435331983b27d93a0.tar.bz2 |
Add target_ops argument to to_can_run
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.
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/go32-nat.c | 2 | ||||
-rw-r--r-- | gdb/inf-child.c | 2 | ||||
-rw-r--r-- | gdb/nto-procfs.c | 4 | ||||
-rw-r--r-- | gdb/target.c | 7 | ||||
-rw-r--r-- | gdb/target.h | 4 | ||||
-rw-r--r-- | gdb/windows-nat.c | 2 |
7 files changed, 22 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 30db237..1cbdfe6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 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. (target_has_exited): Add argument. * target.c (debug_to_has_exited): Add argument. diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index 75f6a3e..2e91b12 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -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; } diff --git a/gdb/inf-child.c b/gdb/inf-child.c index 7726470..37fac4b 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -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; } diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c index 0a7ed55..e86511c 100644 --- a/gdb/nto-procfs.c +++ b/gdb/nto-procfs.c @@ -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; } diff --git a/gdb/target.c b/gdb/target.c index ff61461..cfe9ee7 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -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); diff --git a/gdb/target.h b/gdb/target.h index 8d73472..71546a1 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -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. diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 8dcc410..9c1fdb0 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -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; } |