+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.
{
}
+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)
{
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)
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;
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
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);