X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fobsd-nat.c;h=72ed10cb0ae00a72d8d7f5f81f087b9435238d54;hb=b08b78e7d4bb56f395d3212eed6184ede236c760;hp=f53e6164cf151db2ee69e6276b06cfcc6370c248;hpb=dc92ace0532a42c035eacc506901cf3b0da50c1d;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/obsd-nat.c b/gdb/obsd-nat.c index f53e6164cf..72ed10cb0a 100644 --- a/gdb/obsd-nat.c +++ b/gdb/obsd-nat.c @@ -1,6 +1,6 @@ /* Native-dependent code for OpenBSD. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 Free Software Foundation, Inc. This file is part of GDB. @@ -22,7 +22,6 @@ #include "inferior.h" #include "target.h" -#include "gdb_assert.h" #include #include #include "gdb_wait.h" @@ -51,11 +50,13 @@ obsd_pid_to_str (struct target_ops *ops, ptid_t ptid) } static void -obsd_find_new_threads (struct target_ops *ops) +obsd_update_thread_list (struct target_ops *ops) { pid_t pid = ptid_get_pid (inferior_ptid); struct ptrace_thread_state pts; + prune_threads (); + if (ptrace (PT_GET_THREAD_FIRST, pid, (caddr_t)&pts, sizeof pts) == -1) perror_with_name (("ptrace")); @@ -169,7 +170,7 @@ obsd_add_target (struct target_ops *t) { /* Override some methods to support threads. */ t->to_pid_to_str = obsd_pid_to_str; - t->to_find_new_threads = obsd_find_new_threads; + t->to_update_thread_list = obsd_update_thread_list; t->to_wait = obsd_wait; add_target (t); }