diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-19 07:21:56 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:48:31 -0700 |
commit | cbffc065273e91d3596dc73bad695a815f67d5fa (patch) | |
tree | 2a5fc28268bb7d0ebeb091aa2d656ae5777417e2 /gdb/target.c | |
parent | f09e210795cb9e182feb2d02d97a6c9b22a46f53 (diff) | |
download | gdb-cbffc065273e91d3596dc73bad695a815f67d5fa.zip gdb-cbffc065273e91d3596dc73bad695a815f67d5fa.tar.gz gdb-cbffc065273e91d3596dc73bad695a815f67d5fa.tar.bz2 |
convert to_thread_alive
2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild.
* target.c (target_thread_alive): Unconditionally delegate.
* target.h (struct target_ops) <to_thread_alive>: Use
TARGET_DEFAULT_RETURN.
Diffstat (limited to 'gdb/target.c')
-rw-r--r-- | gdb/target.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/gdb/target.c b/gdb/target.c index 17077aa..d59cea8 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3552,24 +3552,14 @@ target_attach (char *args, int from_tty) int target_thread_alive (ptid_t ptid) { - struct target_ops *t; - - for (t = current_target.beneath; t != NULL; t = t->beneath) - { - if (t->to_thread_alive != NULL) - { - int retval; - - retval = t->to_thread_alive (t, ptid); - if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n", - ptid_get_pid (ptid), retval); + int retval; - return retval; - } - } + retval = current_target.to_thread_alive (¤t_target, ptid); + if (targetdebug) + fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n", + ptid_get_pid (ptid), retval); - return 0; + return retval; } void |