diff options
author | Pedro Alves <palves@redhat.com> | 2015-01-23 11:12:39 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-01-23 11:12:39 +0000 |
commit | 198297aafb4f7a9717be8370581b048ae9107c14 (patch) | |
tree | 8570ebf1a6777d3baac44cef0087494bf8288e57 /binutils/nlmconv.c | |
parent | bbbbffbbfc3fca35649896d6626ab02581df8037 (diff) | |
download | gdb-198297aafb4f7a9717be8370581b048ae9107c14.zip gdb-198297aafb4f7a9717be8370581b048ae9107c14.tar.gz gdb-198297aafb4f7a9717be8370581b048ae9107c14.tar.bz2 |
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.
Diffstat (limited to 'binutils/nlmconv.c')
0 files changed, 0 insertions, 0 deletions