aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2009-11-28 17:00:55 +0000
committerVladimir Prus <vladimir@codesourcery.com>2009-11-28 17:00:55 +0000
commitba7f6c64f30d433b41319a1135e97f82c8febc9e (patch)
tree2c0075f9a643db242fe26c78753f4868eb36a300 /gdb/target.c
parent3c65b80078c46195622486707f5a1573eeab42f4 (diff)
downloadgdb-ba7f6c64f30d433b41319a1135e97f82c8febc9e.zip
gdb-ba7f6c64f30d433b41319a1135e97f82c8febc9e.tar.gz
gdb-ba7f6c64f30d433b41319a1135e97f82c8febc9e.tar.bz2
* target.c (target_terminal_inferior): Use target_can_async_p, not
target_is_async_p.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/target.c b/gdb/target.c
index a6f08c8..cd1614b 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -481,8 +481,10 @@ void
target_terminal_inferior (void)
{
/* A background resume (``run&'') should leave GDB in control of the
- terminal. */
- if (target_is_async_p () && !sync_execution)
+ terminal. Use target_can_async_p, not target_is_async_p, since at
+ this point the target is not async yet. However, if sync_execution
+ is not set, we know it will become async prior to resume. */
+ if (target_can_async_p () && !sync_execution)
return;
/* If GDB is resuming the inferior in the foreground, install