-# Copyright 2009, 2010 Free Software Foundation, Inc.
+# Copyright 2009-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] || ![isnative] } then {
+if ![target_can_use_run_cmd] {
+ continue
+}
+
+# Until "catch exec" is implemented on other targets...
+#
+if {![istarget "*-linux*"]} then {
continue
}
set exec1 "bkpt-multi-exec"
set srcfile1 ${exec1}.c
-set binfile1 ${objdir}/${subdir}/${exec1}
+set binfile1 [standard_output_file ${exec1}]
set exec2 "crashme"
set srcfile2 ${exec2}.c
-set binfile2 ${objdir}/${subdir}/${exec2}
+set binfile2 [standard_output_file ${exec2}]
-if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" {debug nowarnings}] } {
+set compile_options {debug}
+
+if { [build_executable ${testfile}.exp ${exec1} "${srcfile1}" $compile_options] == -1 } {
return -1
}
-if { [prepare_for_testing ${testfile}.exp ${exec2} "${srcfile2}" {debug nowarnings}] } {
+if { [build_executable ${testfile}.exp ${exec2} "${srcfile2}" $compile_options] == -1 } {
return -1
}
-# Until "catch exec" is implemented on other targets...
-#
-if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
- continue
-}
# Start with a fresh gdb