-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if [is_remote target] then {
- # Testing with remote/non-stop is racy at the moment.
- unsupported "Testing dprintf with remote/non-stop is not supported."
- return 0
-}
-
standard_testfile
+set executable ${testfile}
-if [prepare_for_testing "failed to prepare for dprintf with non-stop" \
+if [build_executable "failed to prepare for dprintf with non-stop" \
${testfile} ${srcfile} {debug}] {
return -1
}
-gdb_test_no_output "set non-stop on"
+save_vars { GDBFLAGS } {
+ append GDBFLAGS " -ex \"set non-stop on\""
+ clean_restart ${executable}
+}
if ![runto main] {
- fail "Can't run to main"
+ fail "can't run to main"
return -1
}
set test "inferior stopped"
gdb_test_multiple "" $test {
- -re "\r\n\\\[.* \[0-9\]+\\\] #1 stopped\\\.\r\n" {
+ -re "Program stopped\\\.\r\n" {
pass $test
}
}