old-cross-binutils/gdb/testsuite/gdb.threads
Pedro Alves 198297aafb Linux: make target_is_async_p return false when async is off
linux_nat_is_async_p currently always returns true, even when the
target is _not_ async.  That confuses
gdb_readline_wrapper/gdb_readline_wrapper_cleanup, which
force-disables target-async while the secondary prompt is active.  As
a result, when gdb_readline_wrapper returns, the target is left async,
even through it was sync to begin with.

That can result in weird bugs, like the one the test added by this
commit exposes.

Ref: https://sourceware.org/ml/gdb-patches/2015-01/msg00592.html

gdb/ChangeLog:
2015-01-23  Pedro Alves  <palves@redhat.com>

	* linux-nat.c (linux_is_async_p): New macro.
	(linux_nat_is_async_p):
	(linux_nat_terminal_inferior): Check whether the target can async
	instead of whether it is already async.
	(linux_nat_terminal_ours): Don't check whether the target is
	async.
	(linux_async_pipe): Use linux_is_async_p.

gdb/testsuite/ChangeLog:
2015-01-23  Pedro Alves  <palves@redhat.com>

	* gdb.threads/continue-pending-after-query.c: New file.
	* gdb.threads/continue-pending-after-query.exp: New file.
2015-01-23 11:12:39 +00:00
..
attach-into-signal.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
attach-into-signal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
attach-many-short-lived-threads.c Test attaching to a program that constantly spawns short-lived threads 2015-01-09 11:44:04 +00:00
attach-many-short-lived-threads.exp Test attaching to a program that constantly spawns short-lived threads 2015-01-09 11:44:04 +00:00
attach-stopped.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
attach-stopped.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
bp_in_thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
bp_in_thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
break-while-running.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
break-while-running.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
clone-new-thread-event.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
clone-new-thread-event.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
continue-pending-after-query.c Linux: make target_is_async_p return false when async is off 2015-01-23 11:12:39 +00:00
continue-pending-after-query.exp Linux: make target_is_async_p return false when async is off 2015-01-23 11:12:39 +00:00
corethreads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
corethreads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
create-fail.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
create-fail.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
current-lwp-dead.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
current-lwp-dead.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
dlopen-libpthread-lib.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
dlopen-libpthread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
dlopen-libpthread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
execl.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
execl.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
execl1.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
fork-child-threads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
fork-child-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
fork-thread-pending.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
fork-thread-pending.exp Linux: Skip thread_db thread event reporting if PTRACE_EVENT_CLONE is supported 2015-01-09 11:42:57 +00:00
gcore-stale-thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gcore-stale-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gcore-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
hand-call-in-threads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
hand-call-in-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
ia64-sigill.c gdb.threads/{siginfo-thread.c,watchthreads-reorder.c,ia64-sigill.c} races with GDB 2015-01-09 13:58:29 +00:00
ia64-sigill.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
info-threads-cur-sal-2.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
info-threads-cur-sal.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
info-threads-cur-sal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
interrupted-hand-call.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
interrupted-hand-call.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
kill.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
kill.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
killed.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
killed.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
leader-exit.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
leader-exit.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
linux-dp.c
linux-dp.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
local-watch-wrong-thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
local-watch-wrong-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
Makefile.in
manythreads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
manythreads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
multi-create.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
multi-create.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
multiple-step-overs.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
multiple-step-overs.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
next-bp-other-thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
next-bp-other-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
no-unwaited-for-left.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
no-unwaited-for-left.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-1.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-1.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-2.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-2.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-3.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-3.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-4.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-4.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-stop-fair-events.c add non-stop test that stresses thread starvation issues 2015-01-09 14:44:42 +00:00
non-stop-fair-events.exp add non-stop test that stresses thread starvation issues 2015-01-09 14:44:42 +00:00
pending-step.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pending-step.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
print-threads.c
print-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pthread_cond_wait.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pthread_cond_wait.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pthreads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pthreads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
queue-signal.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
queue-signal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
reconnect-signal.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
reconnect-signal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
schedlock.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
schedlock.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
siginfo-threads.c gdb.threads/{siginfo-thread.c,watchthreads-reorder.c,ia64-sigill.c} races with GDB 2015-01-09 13:58:29 +00:00
siginfo-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-command-handle-nopass.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-command-handle-nopass.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-command-multiple-signals-pending.c Linux: Skip thread_db thread event reporting if PTRACE_EVENT_CLONE is supported 2015-01-09 11:42:57 +00:00
signal-command-multiple-signals-pending.exp Linux: Skip thread_db thread event reporting if PTRACE_EVENT_CLONE is supported 2015-01-09 11:42:57 +00:00
signal-delivered-right-thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-delivered-right-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-while-stepping-over-bp-other-thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-while-stepping-over-bp-other-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
sigstep-threads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
sigstep-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
sigthread.c
sigthread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
staticthreads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
staticthreads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
step-over-lands-on-breakpoint.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
step-over-lands-on-breakpoint.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
step-over-trips-on-watchpoint.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
step-over-trips-on-watchpoint.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
stepi-random-signal.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
stepi-random-signal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
switch-threads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
switch-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-execl.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-execl.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-find.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-specific-bp.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-specific-bp.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-specific.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-specific.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-unwindonsignal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread_check.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread_check.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread_events.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread_events.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
threadapply.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
threadapply.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
threxit-hop-specific.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
threxit-hop-specific.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls-main.c
tls-nodebug.c
tls-nodebug.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls-shared.c
tls-shared.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls-var-main.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls-var.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls-var.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls.c
tls.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls2.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork-child.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork-mt.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork-parent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork-st.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchthreads-reorder.c gdb.threads/{siginfo-thread.c,watchthreads-reorder.c,ia64-sigill.c} races with GDB 2015-01-09 13:58:29 +00:00
watchthreads-reorder.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchthreads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchthreads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchthreads2.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchthreads2.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
wp-replication.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
wp-replication.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00