diff options
author | Pedro Alves <palves@redhat.com> | 2014-05-29 19:58:57 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2014-05-29 14:38:02 +0100 |
commit | 329ea57934a9d4b250a0b417af1ec47bc2d0ceb6 (patch) | |
tree | 8f395e9024ad1dc97fc953b88baa87ed1dbbafa3 /gdb/testsuite | |
parent | 92bcb5f949b1d1f14df079bbe9fd3941c1e09919 (diff) | |
download | binutils-gdb-329ea57934a9d4b250a0b417af1ec47bc2d0ceb6.tar.gz |
enable target async by default; separate MI and target notions of async
This finally makes background execution commands possible by default.
However, in order to do that, there's one last thing we need to do --
we need to separate the MI and target notions of "async". Unlike the
CLI, where the user explicitly requests foreground vs background
execution in the execution command itself (c vs c&), MI chose to treat
"set target-async" specially -- setting it changes the default
behavior of execution commands.
So, we can't simply "set target-async" default to on, as that would
affect MI frontends. Instead we have to make the setting MI-specific,
and teach MI about sync commands on top of an async target.
Because the "target" word in "set target-async" ends up as a potential
source of confusion, the patch adds a "set mi-async" option, and makes
"set target-async" a deprecated alias.
Rather than make the targets always async, this patch introduces a new
"maint set target-async" option so that the GDB developer can control
whether the target is async. This makes it simpler to debug issues
arising only in the synchronous mode; important because sync mode
seems unlikely to go away.
Unlike in previous revisions, "set target-async" does not affect this
new maint parameter. The rationale for this is that then one can
easily run the test suite in the "maint set target-async off" mode and
have tests that enable mi-async fail just like they fail on
non-async-capable targets. This emulation is exactly the point of the
maint option.
I had asked Tom in a previous iteration to split the actual change of
the target async default to a separate patch, but it turns out that
that is quite awkward in this version of the patch, because with MI
async and target async decoupled (unlike in previous versions), if we
don't flip the default at the same time, then just "set target-async
on" alone never actually manages to do anything. It's best to not
have that transitory state in the tree.
Given "set target-async on" now only has effect for MI, the patch goes
through the testsuite removing it from non-MI tests. MI tests are
adjusted to use the new and less confusing "mi-async" spelling.
2014-05-29 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
* NEWS: Mention "maint set target-async", "set mi-async", and that
background execution commands are now always available.
* target.h (target_async_permitted): Update comment.
* target.c (target_async_permitted, target_async_permitted_1):
Default to 1.
(set_target_async_command): Rename to ...
(maint_set_target_async_command): ... this.
(show_target_async_command): Rename to ...
(maint_show_target_async_command): ... this.
(_initialize_target): Adjust.
* infcmd.c (prepare_execution_command): Make extern.
* inferior.h (prepare_execution_command): Declare.
* infrun.c (set_observer_mode): Leave target async alone.
* mi/mi-interp.c (mi_interpreter_init): Install
mi_on_sync_execution_done as sync_execution_done observer.
(mi_on_sync_execution_done): New function.
(mi_execute_command_input_handler): Don't print the prompt if we
just started a synchronous command with an async target.
(mi_on_resume): Check sync_execution before printing prompt.
* mi/mi-main.h (mi_async_p): Declare.
* mi/mi-main.c: Include gdbcmd.h.
(mi_async_p): New function.
(mi_async, mi_async_1): New globals.
(set_mi_async_command, show_mi_async_command, mi_async): New
functions.
(exec_continue): Call prepare_execution_command.
(run_one_inferior, mi_cmd_exec_run, mi_cmd_list_target_features)
(mi_execute_async_cli_command): Use mi_async_p.
(_initialize_mi_main): Install "set mi-async". Make
"target-async" a deprecated alias.
2014-05-29 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Non-Stop Mode): Remove "set target-async 1"
from example.
(Asynchronous and non-stop modes): Document '-gdb-set mi-async'.
Mention that target-async is now deprecated.
(Maintenance Commands): Document maint set/show target-async.
2014-05-29 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
* gdb.base/async-shell.exp: Don't enable target-async.
* gdb.base/async.exp
* gdb.base/corefile.exp (corefile_test_attach): Remove 'async'
parameter. Adjust.
(top level): Don't test with "target-async".
* gdb.base/dprintf-non-stop.exp: Don't enable target-async.
* gdb.base/gdb-sigterm.exp: Don't test with "target-async".
* gdb.base/inferior-died.exp: Don't enable target-async.
* gdb.base/interrupt-noterm.exp: Likewise.
* gdb.mi/mi-async.exp: Use "mi-async" instead of "target-async".
* gdb.mi/mi-nonstop-exit.exp: Likewise.
* gdb.mi/mi-nonstop.exp: Likewise.
* gdb.mi/mi-ns-stale-regcache.exp: Likewise.
* gdb.mi/mi-nsintrall.exp: Likewise.
* gdb.mi/mi-nsmoribund.exp: Likewise.
* gdb.mi/mi-nsthrexec.exp: Likewise.
* gdb.mi/mi-watch-nonstop.exp: Likewise.
* gdb.multi/watchpoint-multi.exp: Adjust comment.
* gdb.python/py-evsignal.exp: Don't enable target-async.
* gdb.python/py-evthreads.exp: Likewise.
* gdb.python/py-prompt.exp: Likewise.
* gdb.reverse/break-precsave.exp: Don't test with "target-async".
* gdb.server/solib-list.exp: Don't enable target-async.
* gdb.threads/thread-specific-bp.exp: Likewise.
* lib/mi-support.exp: Adjust to use mi-async.
Diffstat (limited to 'gdb/testsuite')
24 files changed, 44 insertions, 58 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3dc8f5f3ce0..0297ec6bb67 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,4 +1,33 @@ 2014-05-29 Pedro Alves <palves@redhat.com> + Tom Tromey <tromey@redhat.com> + + * gdb.base/async-shell.exp: Don't enable target-async. + * gdb.base/async.exp + * gdb.base/corefile.exp (corefile_test_attach): Remove 'async' + parameter. Adjust. + (top level): Don't test with "target-async". + * gdb.base/dprintf-non-stop.exp: Don't enable target-async. + * gdb.base/gdb-sigterm.exp: Don't test with "target-async". + * gdb.base/inferior-died.exp: Don't enable target-async. + * gdb.base/interrupt-noterm.exp: Likewise. + * gdb.mi/mi-async.exp: Use "mi-async" instead of "target-async". + * gdb.mi/mi-nonstop-exit.exp: Likewise. + * gdb.mi/mi-nonstop.exp: Likewise. + * gdb.mi/mi-ns-stale-regcache.exp: Likewise. + * gdb.mi/mi-nsintrall.exp: Likewise. + * gdb.mi/mi-nsmoribund.exp: Likewise. + * gdb.mi/mi-nsthrexec.exp: Likewise. + * gdb.mi/mi-watch-nonstop.exp: Likewise. + * gdb.multi/watchpoint-multi.exp: Adjust comment. + * gdb.python/py-evsignal.exp: Don't enable target-async. + * gdb.python/py-evthreads.exp: Likewise. + * gdb.python/py-prompt.exp: Likewise. + * gdb.reverse/break-precsave.exp: Don't test with "target-async". + * gdb.server/solib-list.exp: Don't enable target-async. + * gdb.threads/thread-specific-bp.exp: Likewise. + * lib/mi-support.exp: Adjust to use mi-async. + +2014-05-29 Pedro Alves <palves@redhat.com> PR gdb/13860 * gdb.mi/mi-cli.exp: Always expect "end-stepping-range" stop diff --git a/gdb/testsuite/gdb.base/async-shell.exp b/gdb/testsuite/gdb.base/async-shell.exp index 4890a59ed10..f0550bc5acd 100644 --- a/gdb/testsuite/gdb.base/async-shell.exp +++ b/gdb/testsuite/gdb.base/async-shell.exp @@ -31,7 +31,6 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile] } { set gdbindex_warning_re "warning: Skipping \[^\r\n\]+ \\.gdb_index section \[^\r\n\]*\r\nDo \"set use-deprecated-index-sections on\" before the file is read\r\nto use the section anyway\\." -gdb_test_no_output "set target-async on " gdb_test_no_output "set non-stop on" gdb_test "run &" "Starting program: \[^\r\n\]*(\r\n$gdbindex_warning_re)?" diff --git a/gdb/testsuite/gdb.base/async.exp b/gdb/testsuite/gdb.base/async.exp index f0a18e89193..0f99b011931 100644 --- a/gdb/testsuite/gdb.base/async.exp +++ b/gdb/testsuite/gdb.base/async.exp @@ -25,8 +25,6 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} { return -1 } -gdb_test_no_output "set target-async on" - # # set it up at a breakpoint so we can play with it # diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp index 6eb1f02857c..bde2de85fe8 100644 --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp @@ -241,7 +241,7 @@ gdb_exit # Test an attach command will clear any loaded core file. -proc corefile_test_attach {{async 0}} { +proc corefile_test_attach {} { global binfile corefile gdb_prompt if ![is_remote target] { @@ -257,11 +257,6 @@ proc corefile_test_attach {{async 0}} { gdb_start - if {$async} { - gdb_test_no_output "set target-async on" \ - "enable target-async for attach tests" - } - gdb_test "core-file $corefile" "Core was generated by .*" "attach: load core again" gdb_test "info files" "\r\nLocal core dump file:\r\n.*" "attach: sanity check we see the core file" @@ -298,13 +293,3 @@ gdb_test_multiple "core-file $corefile" $test { pass $test } } - - -# Try a couple tests again with target-async. -with_test_prefix "target-async" { - clean_restart ${testfile} - - gdb_test_no_output "set target-async on" - corefile_test_run - corefile_test_attach 1 -} diff --git a/gdb/testsuite/gdb.base/dprintf-non-stop.exp b/gdb/testsuite/gdb.base/dprintf-non-stop.exp index fdaa5c1758a..df1e27081cd 100644 --- a/gdb/testsuite/gdb.base/dprintf-non-stop.exp +++ b/gdb/testsuite/gdb.base/dprintf-non-stop.exp @@ -26,7 +26,6 @@ if [prepare_for_testing "failed to prepare for dprintf with non-stop" \ return -1 } -gdb_test_no_output "set target-async on" gdb_test_no_output "set non-stop on" if ![runto main] { diff --git a/gdb/testsuite/gdb.base/gdb-sigterm.exp b/gdb/testsuite/gdb.base/gdb-sigterm.exp index f52517cdfa9..df0de42267a 100644 --- a/gdb/testsuite/gdb.base/gdb-sigterm.exp +++ b/gdb/testsuite/gdb.base/gdb-sigterm.exp @@ -79,17 +79,7 @@ proc do_test { pass } { # 50 runs should be approx. a safe number to be sure it is fixed now. for {set pass 0} {$pass < 50} {incr pass} { - clean_restart ${testfile} - gdb_test_no_output "set target-async off" "" - with_test_prefix "sync" { - do_test $pass - } - - clean_restart ${testfile} - gdb_test_no_output "set target-async on" "" - with_test_prefix "async" { - do_test $pass - } + do_test $pass } pass "$pass SIGTERM passes" diff --git a/gdb/testsuite/gdb.base/inferior-died.exp b/gdb/testsuite/gdb.base/inferior-died.exp index 33f92e9c25e..152bdd875cd 100644 --- a/gdb/testsuite/gdb.base/inferior-died.exp +++ b/gdb/testsuite/gdb.base/inferior-died.exp @@ -38,7 +38,6 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${testfile}.c] } { } gdb_test_no_output "set detach-on-fork off" -gdb_test_no_output "set target-async on" gdb_test_no_output "set non-stop on" if ![runto_main] { diff --git a/gdb/testsuite/gdb.base/interrupt-noterm.exp b/gdb/testsuite/gdb.base/interrupt-noterm.exp index a22acd22957..5c92b9722dd 100644 --- a/gdb/testsuite/gdb.base/interrupt-noterm.exp +++ b/gdb/testsuite/gdb.base/interrupt-noterm.exp @@ -22,7 +22,6 @@ if [prepare_for_testing "failed to prepare for testing" \ # Pretend there's no terminal. gdb_test_no_output "set interactive-mode off" -gdb_test_no_output "set target-async on" if ![runto main] { fail "Can't run to main" diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp index e41701d8a13..0df4c98010c 100644 --- a/gdb/testsuite/gdb.mi/mi-async.exp +++ b/gdb/testsuite/gdb.mi/mi-async.exp @@ -27,7 +27,7 @@ if { !([isnative] && [istarget *-linux*]) } then { # The plan is for async mode to become the default but toggle for now. set saved_gdbflags $GDBFLAGS -set GDBFLAGS [concat $GDBFLAGS " -ex \"set target-async on\""] +set GDBFLAGS [concat $GDBFLAGS " -ex \"set mi-async on\""] load_lib mi-support.exp diff --git a/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp b/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp index 3727d81b746..5187b405e20 100644 --- a/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp +++ b/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp @@ -40,7 +40,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load $binfile mi_gdb_test "-gdb-set non-stop 1" ".*" -mi_gdb_test "-gdb-set target-async 1" ".*" +mi_gdb_test "-gdb-set mi-async 1" ".*" mi_detect_async if { [mi_run_to_main] < 0 } { diff --git a/gdb/testsuite/gdb.mi/mi-nonstop.exp b/gdb/testsuite/gdb.mi/mi-nonstop.exp index 5ef74ed1ea2..ba7dfd4002a 100644 --- a/gdb/testsuite/gdb.mi/mi-nonstop.exp +++ b/gdb/testsuite/gdb.mi/mi-nonstop.exp @@ -50,7 +50,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load $binfile mi_gdb_test "-gdb-set non-stop 1" ".*" -mi_gdb_test "-gdb-set target-async 1" ".*" +mi_gdb_test "-gdb-set mi-async 1" ".*" mi_detect_async if { [mi_run_to_main] < 0 } { diff --git a/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp b/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp index 754689ca7f2..ae9e5f2e4f1 100644 --- a/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp +++ b/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp @@ -53,7 +53,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load $binfile mi_gdb_test "-gdb-set non-stop 1" ".*" -mi_gdb_test "-gdb-set target-async 1" ".*" +mi_gdb_test "-gdb-set mi-async 1" ".*" mi_detect_async if { [mi_run_to_main] < 0 } { diff --git a/gdb/testsuite/gdb.mi/mi-nsintrall.exp b/gdb/testsuite/gdb.mi/mi-nsintrall.exp index f613e7f3eb7..ac1209ef879 100644 --- a/gdb/testsuite/gdb.mi/mi-nsintrall.exp +++ b/gdb/testsuite/gdb.mi/mi-nsintrall.exp @@ -40,7 +40,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load $binfile mi_gdb_test "-gdb-set non-stop 1" ".*" -mi_gdb_test "-gdb-set target-async 1" ".*" +mi_gdb_test "-gdb-set mi-async 1" ".*" mi_detect_async if { [mi_run_to_main] < 0 } { diff --git a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp index 350c06080aa..0ff04ca68e2 100644 --- a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp +++ b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp @@ -40,7 +40,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load $binfile mi_gdb_test "-gdb-set non-stop 1" ".*" -mi_gdb_test "-gdb-set target-async 1" ".*" +mi_gdb_test "-gdb-set mi-async 1" ".*" mi_detect_async if { [mi_run_to_main] < 0 } { diff --git a/gdb/testsuite/gdb.mi/mi-nsthrexec.exp b/gdb/testsuite/gdb.mi/mi-nsthrexec.exp index 85617d0e1ff..008a83132f4 100644 --- a/gdb/testsuite/gdb.mi/mi-nsthrexec.exp +++ b/gdb/testsuite/gdb.mi/mi-nsthrexec.exp @@ -50,7 +50,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load $binfile mi_gdb_test "-gdb-set non-stop 1" ".*" -mi_gdb_test "-gdb-set target-async 1" ".*" +mi_gdb_test "-gdb-set mi-async 1" ".*" mi_detect_async if { [mi_run_to_main] < 0 } { diff --git a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp index 3dbf4c7a237..44371c811d9 100644 --- a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp +++ b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp @@ -52,7 +52,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load $binfile mi_gdb_test "-gdb-set non-stop 1" ".*" -mi_gdb_test "-gdb-set target-async 1" ".*" +mi_gdb_test "-gdb-set mi-async 1" ".*" mi_detect_async if { [mi_run_to_main] < 0 } { diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp index b7fb0a9db23..e6a89579a36 100644 --- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp +++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp @@ -37,7 +37,7 @@ if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executa clean_restart $executable -# Simulate non-stop+target-async which also uses breakpoint always-inserted. +# Simulate non-stop which also uses breakpoint always-inserted. gdb_test_no_output "set breakpoint always-inserted on" # displaced-stepping is also needed as other GDB sometimes still removes the # breakpoints, even with always-inserted on. diff --git a/gdb/testsuite/gdb.python/py-evsignal.exp b/gdb/testsuite/gdb.python/py-evsignal.exp index af3d53c65c9..530fd07a6ef 100644 --- a/gdb/testsuite/gdb.python/py-evsignal.exp +++ b/gdb/testsuite/gdb.python/py-evsignal.exp @@ -35,7 +35,6 @@ gdb_test_no_output "python exec (open ('${pyfile}').read ())" "" gdb_test "test-events" "Event testers registered." gdb_test_no_output "set non-stop on" -gdb_test_no_output "set target-async on" gdb_run_cmd gdb_test_multiple "" "Signal Thread 3" { diff --git a/gdb/testsuite/gdb.python/py-evthreads.exp b/gdb/testsuite/gdb.python/py-evthreads.exp index ffa322f2931..d62624e8f1d 100644 --- a/gdb/testsuite/gdb.python/py-evthreads.exp +++ b/gdb/testsuite/gdb.python/py-evthreads.exp @@ -40,7 +40,6 @@ gdb_test_no_output "python exec (open ('${pyfile}').read ())" "" gdb_test "test-events" "Event testers registered." gdb_test_no_output "set non-stop on" -gdb_test_no_output "set target-async on" gdb_breakpoint "main" gdb_breakpoint "thread2" diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp index e376c05bd00..ebe4cb69d81 100644 --- a/gdb/testsuite/gdb.python/py-prompt.exp +++ b/gdb/testsuite/gdb.python/py-prompt.exp @@ -90,8 +90,7 @@ if { [istarget "*-*-cygwin*"] } { set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ] } -set GDBFLAGS [concat $tmp_gdbflags " -ex \"set target-async on\""] -set GDBFLAGS [concat $GDBFLAGS " -ex \"set pagination off\""] +set GDBFLAGS [concat $tmp_gdbflags " -ex \"set pagination off\""] set GDBFLAGS [concat $GDBFLAGS " -ex \"set editing on\""] set GDBFLAGS [concat $GDBFLAGS " -ex \"attach $testpid\""] set GDBFLAGS [concat $GDBFLAGS " -ex \"continue&\""] @@ -107,8 +106,7 @@ gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \ "prompt_hook argument is default prompt. 3" gdb_exit -set GDBFLAGS [concat $tmp_gdbflags " -ex \"set target-async on\""] -set GDBFLAGS [concat $GDBFLAGS " -ex \"set pagination off\""] +set GDBFLAGS [concat $tmp_gdbflags " -ex \"set pagination off\""] set GDBFLAGS [concat $GDBFLAGS " -ex \"set editing on\""] set GDBFLAGS [concat $GDBFLAGS " -ex \"attach $testpid\""] set GDBFLAGS [concat $GDBFLAGS " -ex \"interrupt\""] diff --git a/gdb/testsuite/gdb.reverse/break-precsave.exp b/gdb/testsuite/gdb.reverse/break-precsave.exp index f1e6c695383..3206e3c144b 100644 --- a/gdb/testsuite/gdb.reverse/break-precsave.exp +++ b/gdb/testsuite/gdb.reverse/break-precsave.exp @@ -110,9 +110,3 @@ proc precsave_tests {} { } precsave_tests - -with_test_prefix "target-async" { - clean_restart $testfile - gdb_test_no_output "set target-async on" - precsave_tests -} diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp index 8cc3edc5382..4504a23cfa6 100644 --- a/gdb/testsuite/gdb.server/solib-list.exp +++ b/gdb/testsuite/gdb.server/solib-list.exp @@ -66,7 +66,6 @@ foreach nonstop { 0 1 } { with_test_prefix "non-stop $nonstop" { gdb_test "disconnect" ".*" gdb_test "set non-stop $nonstop" - gdb_test "set target-async $nonstop" # It is required for the non-stop mode, GDB would try to step over # _dl_debug_state breakpoint will still only ld.so loaded in gdbserver. diff --git a/gdb/testsuite/gdb.threads/thread-specific-bp.exp b/gdb/testsuite/gdb.threads/thread-specific-bp.exp index b8416d75113..4273e1d7386 100644 --- a/gdb/testsuite/gdb.threads/thread-specific-bp.exp +++ b/gdb/testsuite/gdb.threads/thread-specific-bp.exp @@ -122,6 +122,5 @@ check_thread_specific_breakpoint "all-stop" clean_restart ${binfile} # Test non-stop mode. -gdb_test_no_output "set target-async on" "set async mode" gdb_test_no_output "set non-stop on" "set non-stop mode" check_thread_specific_breakpoint "non-stop" diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 9f07cdab793..f1b57497312 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -1014,10 +1014,10 @@ proc mi_detect_async {} { global async global mi_gdb_prompt - send_gdb "show target-async\n" + send_gdb "show mi-async\n" gdb_expect { - -re ".*Controlling the inferior in asynchronous mode is on...*$mi_gdb_prompt$" { + -re "asynchronous mode is on...*$mi_gdb_prompt$" { set async 1 } -re ".*$mi_gdb_prompt$" { |