diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-18 14:44:20 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:48:14 -0700 |
commit | 09b0dc2b57ce52fc478710797dabdf46bfd5abd1 (patch) | |
tree | 83757b4a6da72e41a1f5c0fdf6ce672b76491a65 /gdb | |
parent | 7d4f8efaf6b0c9dea516097442917deb89414090 (diff) | |
download | gdb-09b0dc2b57ce52fc478710797dabdf46bfd5abd1.zip gdb-09b0dc2b57ce52fc478710797dabdf46bfd5abd1.tar.gz gdb-09b0dc2b57ce52fc478710797dabdf46bfd5abd1.tar.bz2 |
convert to_find_new_threads
2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild.
* target.c (target_find_new_threads): Unconditionally delegate.
* target.h (struct target_ops) <to_find_new_threads>: Use
TARGET_DEFAULT_RETURN.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/target-delegates.c | 15 | ||||
-rw-r--r-- | gdb/target.c | 16 | ||||
-rw-r--r-- | gdb/target.h | 3 |
4 files changed, 27 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e3ce6d1..bcc47b9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,13 @@ 2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. + * target.c (target_find_new_threads): Unconditionally delegate. + * target.h (struct target_ops) <to_find_new_threads>: Use + TARGET_DEFAULT_RETURN. + +2014-02-19 Tom Tromey <tromey@redhat.com> + + * target-delegates.c: Rebuild. * target.c (target_program_signals): Unconditionally delegate. * target.h (struct target_ops) <to_program_signals>: Use TARGET_DEFAULT_IGNORE. diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index d3b8da7..781167a 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -541,6 +541,18 @@ tdefault_program_signals (struct target_ops *self, int arg1, unsigned char *arg2 { } +static void +delegate_find_new_threads (struct target_ops *self) +{ + self = self->beneath; + self->to_find_new_threads (self); +} + +static void +tdefault_find_new_threads (struct target_ops *self) +{ +} + static char * delegate_extra_thread_info (struct target_ops *self, struct thread_info *arg1) { @@ -1284,6 +1296,8 @@ install_delegators (struct target_ops *ops) ops->to_pass_signals = delegate_pass_signals; if (ops->to_program_signals == NULL) ops->to_program_signals = delegate_program_signals; + if (ops->to_find_new_threads == NULL) + ops->to_find_new_threads = delegate_find_new_threads; if (ops->to_extra_thread_info == NULL) ops->to_extra_thread_info = delegate_extra_thread_info; if (ops->to_thread_name == NULL) @@ -1443,6 +1457,7 @@ install_dummy_methods (struct target_ops *ops) ops->to_mourn_inferior = default_mourn_inferior; ops->to_pass_signals = tdefault_pass_signals; ops->to_program_signals = tdefault_program_signals; + ops->to_find_new_threads = tdefault_find_new_threads; ops->to_extra_thread_info = tdefault_extra_thread_info; ops->to_thread_name = tdefault_thread_name; ops->to_stop = tdefault_stop; diff --git a/gdb/target.c b/gdb/target.c index 0519900..59c593f 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3606,19 +3606,9 @@ target_thread_alive (ptid_t ptid) void target_find_new_threads (void) { - struct target_ops *t; - - for (t = current_target.beneath; t != NULL; t = t->beneath) - { - if (t->to_find_new_threads != NULL) - { - t->to_find_new_threads (t); - if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "target_find_new_threads ()\n"); - - return; - } - } + current_target.to_find_new_threads (¤t_target); + if (targetdebug) + fprintf_unfiltered (gdb_stdlog, "target_find_new_threads ()\n"); } void diff --git a/gdb/target.h b/gdb/target.h index 421dd75..7b36e48 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -559,7 +559,8 @@ struct target_ops TARGET_DEFAULT_IGNORE (); int (*to_thread_alive) (struct target_ops *, ptid_t ptid); - void (*to_find_new_threads) (struct target_ops *); + void (*to_find_new_threads) (struct target_ops *) + TARGET_DEFAULT_IGNORE (); char *(*to_pid_to_str) (struct target_ops *, ptid_t); char *(*to_extra_thread_info) (struct target_ops *, struct thread_info *) TARGET_DEFAULT_RETURN (0); |