# along with this program. If not, see <http://www.gnu.org/licenses/>.
set opts {}
-standard_testfile .S
+standard_testfile .S .c
if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-inline.exp COMPILE=1"
- standard_testfile
+ standard_testfile .c .c
lappend opts debug optimize=-O2
} else {
require is_x86_64_m64_target
}
+# Make .c available on the host.
+if [is_remote host] {
+ gdb_remote_download host $srcdir/$subdir/$srcfile2
+}
+
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
return -1
}
return -1
}
-set srcfile $testfile.c
-gdb_breakpoint [gdb_get_line_number "break-here"]
+gdb_breakpoint [gdb_get_line_number "break-here" $srcfile2]
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
gdb_test "p y" " = 25"
if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param-dwarf5.exp COMPILE=1"
- set srcfile ${srcfile2}
+ standard_testfile .c .c
lappend opts optimize=-O2 additional_flags=-gdwarf-5
} else {
require is_x86_64_m64_target
}
+# Make .c available on the host.
+if [is_remote host] {
+ gdb_remote_download host $srcdir/$subdir/$srcfile2
+}
+
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
return -1
}
return -1
}
-set srcfile $srcfile2
-gdb_breakpoint [gdb_get_line_number "break-here"]
+gdb_breakpoint [gdb_get_line_number "break-here" $srcfile2]
with_test_prefix "call 1" {
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param.exp COMPILE=1"
- set srcfile ${srcfile2}
+ standard_testfile .c .c
lappend opts debug optimize=-O2
} else {
require is_x86_64_m64_target
}
+# Make .c available on the host.
+if [is_remote host] {
+ remote_download host $srcdir/$subdir/$srcfile2
+}
+
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
return -1
}
return -1
}
-set srcfile $srcfile2
-gdb_breakpoint [gdb_get_line_number "break-here"]
+gdb_breakpoint [gdb_get_line_number "break-here" $srcfile2]
with_test_prefix "call 1" {
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
require is_x86_64_m64_target
+# Make .cc available on the host.
+if [is_remote host] {
+ gdb_remote_download host $srcdir/$subdir/$srcfile2
+}
+
if { [prepare_for_testing_full "failed to prepare" \
[list $testfile "c++" $srcfile {}]] } {
return -1
return -1
}
-set srcfile $srcfile2
-gdb_breakpoint [gdb_get_line_number "break-here"]
+gdb_breakpoint [gdb_get_line_number "break-here" $srcfile2]
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
gdb_test "frame" {bar \(ref=@0x[0-9a-f]+: 10, ref@entry=@0x[0-9a-f]+: <optimized out>\) at .*}
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set opts {}
-standard_testfile .S
+standard_testfile .S .c
if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.arch/amd64-tailcall-ret.exp COMPILE=1"
- standard_testfile
+ standard_testfile .c .c
lappend opts debug optimize=-O2
} else {
require is_x86_64_m64_target
}
+# Make .c available on the host.
+if [is_remote host] {
+ gdb_remote_download host $srcdir/$subdir/$srcfile2
+}
+
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
return -1
}