aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-19 07:21:56 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:31 -0700
commitcbffc065273e91d3596dc73bad695a815f67d5fa (patch)
tree2a5fc28268bb7d0ebeb091aa2d656ae5777417e2 /gdb/target-delegates.c
parentf09e210795cb9e182feb2d02d97a6c9b22a46f53 (diff)
downloadgdb-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-delegates.c')
-rw-r--r--gdb/target-delegates.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 62f68cc..0da855a 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -541,6 +541,19 @@ tdefault_program_signals (struct target_ops *self, int arg1, unsigned char *arg2
{
}
+static int
+delegate_thread_alive (struct target_ops *self, ptid_t arg1)
+{
+ self = self->beneath;
+ return self->to_thread_alive (self, arg1);
+}
+
+static int
+tdefault_thread_alive (struct target_ops *self, ptid_t arg1)
+{
+ return 0;
+}
+
static void
delegate_find_new_threads (struct target_ops *self)
{
@@ -1524,6 +1537,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_thread_alive == NULL)
+ ops->to_thread_alive = delegate_thread_alive;
if (ops->to_find_new_threads == NULL)
ops->to_find_new_threads = delegate_find_new_threads;
if (ops->to_pid_to_str == NULL)
@@ -1721,6 +1736,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_thread_alive = tdefault_thread_alive;
ops->to_find_new_threads = tdefault_find_new_threads;
ops->to_pid_to_str = default_pid_to_str;
ops->to_extra_thread_info = tdefault_extra_thread_info;