summaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-07-20 17:27:24 +0000
committerPedro Alves <palves@redhat.com>2012-07-20 17:27:24 +0000
commit3cc3c12d24bab698e7cec1859998fae5729c2de9 (patch)
tree5a787aea53fb47af6113d2afad76aec118ba6b67 /gdb/infrun.c
parent2a2696dcb32f202052aee2f874b23b5a1dab2f19 (diff)
downloadgdb-3cc3c12d24bab698e7cec1859998fae5729c2de9.tar.gz
2012-07-20 Pedro Alves <palves@redhat.com>
PR threads/11692 PR gdb/12203 gdb/ * infrun.c (handle_inferior_event) <new thread>: Don't special case minus_one_ptid. <TARGET_WAITKIND_SPURIOUS>: Ditto. * linux-thread-db.c (thread_get_info_callback): Don't return early if the thread is zombie. (thread_from_lwp): Change return type to void. Rewrite stale comment. (attach_thread): Don't return early if the thread is zombie, instead set its "dying" flag. (thread_db_wait): Don't return TARGET_WAITKIND_SPURIOUS anymore. (find_new_threads_callback): Don't return early if the thread is zombie. gdb/testsuite/ * gdb.threads/create-fail.c: New file. * gdb.threads/create-fail.exp: New file.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 49a442c871f..efc41627e94 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3194,8 +3194,7 @@ handle_inferior_event (struct execution_control_state *ecs)
}
if (ecs->ws.kind != TARGET_WAITKIND_EXITED
- && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED
- && !ptid_equal (ecs->ptid, minus_one_ptid))
+ && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED)
{
ecs->event_thread = find_thread_ptid (ecs->ptid);
/* If it's a new thread, add it to the thread database. */
@@ -3363,8 +3362,7 @@ handle_inferior_event (struct execution_control_state *ecs)
case TARGET_WAITKIND_SPURIOUS:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SPURIOUS\n");
- if (!ptid_equal (ecs->ptid, inferior_ptid)
- && !ptid_equal (ecs->ptid, minus_one_ptid))
+ if (!ptid_equal (ecs->ptid, inferior_ptid))
context_switch (ecs->ptid);
resume (0, GDB_SIGNAL_0);
prepare_to_wait (ecs);