+2003-01-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.arch/altivec-abi.exp: Set variable 'srcfile' differently, to
+ allow for different test tree configurations. Update some
+ tescases accordingly.
+ * gdb.arch/altivec-regs.exp: Ditto.
+ * gdb.asm/asm-source.exp: Ditto.
+ * gdb.base/advance.exp: Ditto.
+ * gdb.base/display.exp: Ditto.
+ * gdb.base/long_long.exp: Ditto.
+ * gdb.base/mips_pro.exp: Ditto.
+ * gdb.base/overlays.exp: Ditto.
+ * gdb.base/relocate.exp: Ditto.
+ * gdb.base/setshow.exp: Ditto.
+ * gdb.base/step-line.exp: Ditto.
+ * gdb.base/step-test.exp: Ditto.
+ * gdb.base/until.exp: Ditto.
+ * gdb.c++/virtfunc.exp: Get rid of variable 'src'.
+
2003-01-17 David Carlton <carlton@math.stanford.edu>
* gdb.c++/demangle.exp (test_lucid_style_demangling): KFAIL test
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 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
set testfile "altivec-abi"
set binfile ${objdir}/${subdir}/${testfile}
+set srcfile ${testfile}.c
-set src1 ${srcdir}/${subdir}/${testfile}.c
-
-if { [gdb_compile ${src1} ${binfile} executable {debug additional_flags=-w}] != "" } {
+if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 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
set testfile "altivec-regs"
set binfile ${objdir}/${subdir}/${testfile}
-set src1 ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
-if { [gdb_compile ${src1} ${binfile} executable {debug additional_flags=-w}] != "" } {
+if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Copyright 1998, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 2000, 2001, 2002, 2003 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
set testfile "asm-source"
set binfile ${objdir}/${subdir}/${testfile}
-set src1 ${srcdir}/${subdir}/asmsrc1.s
-set src2 ${srcdir}/${subdir}/asmsrc2.s
+set srcfile1 asmsrc1.s
+set srcfile2 asmsrc2.s
remote_exec build "rm -f ${subdir}/arch.inc"
remote_download host ${srcdir}/${subdir}/${asm-arch}.inc ${subdir}/arch.inc
set asm-flags "-gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}"
}
-if {[target_assemble ${src1} asmsrc1.o "${asm-flags}"] != ""} then {
+if {[target_assemble ${srcdir}/${subdir}/${srcfile1} asmsrc1.o "${asm-flags}"] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[target_assemble ${src2} asmsrc2.o "${asm-flags}"] != ""} then {
+if {[target_assemble ${srcdir}/${subdir}/${srcfile2} asmsrc2.o "${asm-flags}"] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
}
set testfile advance
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
remote_exec build "rm -f ${binfile}"
-if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Copyright 1997, 1998, 1999, 2000
+# Copyright 1997, 1998, 1999, 2000, 2001, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
}
set testfile display
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [target_info exists gdb_stub] {
-# Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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
}
set testfile long_long
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# What compiler are we using?
set flag ""
}
-if { [gdb_compile "${srcfile}" "${binfile}" executable [concat debug "additional_flags=$flag -w"]] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug "additional_flags=$flag -w"]] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Copyright 1997, 1999 Free Software Foundation, Inc.
+# Copyright 1997, 1999, 2000, 2001, 2003 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
set bug_id 0
set testfile mips_pro
-set srcfile ${srcdir}/$subdir/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# Create and source the file that provides information about the compiler
# This test must be compiled with -O2 if using gcc.
if {$gcc_compiled} then {
- if { [gdb_compile "${srcfile}" "${binfile}" executable {debug additional_flags=-O2}] != "" } {
+ if { [gdb_compile "${srcdir}/$subdir/${srcfile}" "${binfile}" executable {debug additional_flags=-O2}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
} else {
- if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
+ if { [gdb_compile "${srcdir}/$subdir/${srcfile}" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
}
-# Copyright 1997, 1998, 2002 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 2001, 2002, 2003 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
set testfile "overlays"
set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${srcdir}/${subdir}/${testfile}.c
-set foo ${srcdir}/${subdir}/foo.c
-set bar ${srcdir}/${subdir}/bar.c
-set baz ${srcdir}/${subdir}/baz.c
-set grbx ${srcdir}/${subdir}/grbx.c
+set srcfile ${testfile}.c
-if {[gdb_compile "${srcfile}" "${testfile}.o" object {debug}] != ""} then {
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {debug}] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if {[gdb_compile "${srcdir}/${subdir}/ovlymgr.c" ovlymgr.o object {debug}] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[gdb_compile "${foo}" foo.o object {debug} ] != ""} then {
+if {[gdb_compile "${srcdir}/${subdir}/foo.c" foo.o object {debug} ] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[gdb_compile "${bar}" bar.o object {debug}] != ""} then {
+if {[gdb_compile "${srcdir}/${subdir}/bar.c" bar.o object {debug}] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[gdb_compile "${baz}" baz.o object {debug}] != ""} then {
+if {[gdb_compile "${srcdir}/${subdir}/baz.c" baz.o object {debug}] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if {[gdb_compile "${grbx}" grbx.o object {debug}] != ""} then {
+if {[gdb_compile "${srcdir}/${subdir}/grbx.c" grbx.o object {debug}] != ""} then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if {[gdb_compile "${testfile}.o ovlymgr.o foo.o bar.o baz.o grbx.o" ${binfile} executable "ldscript=-Wl,-T$linker_script"] != "" } {
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003 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
}
set testfile relocate
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}.o
remote_exec build "rm -f ${binfile}"
-if { [gdb_compile "${srcfile}" "${binfile}" object {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Copyright 1992, 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1996, 1997, 1998, 2001, 2003
+# 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
set bug_id 0
set testfile "setshow"
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile ${srcfile} ${binfile} executable {debug}] != "" } {
+if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright 2001, 2003 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
}
set testfile step-line
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
remote_exec build "rm -f ${binfile}"
-if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Copyright 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000, 2002, 2001, 2003
+# 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
}
set testfile step-test
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
remote_exec build "rm -f ${binfile}"
-if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
}
set testfile break
-set srcfile ${srcdir}/${subdir}/${testfile}.c
+set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
remote_exec build "rm -f ${binfile}"
-if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
# frame.
#
gdb_test "until 99" \
- "factorial.*value=720.*at ${srcfile}:99.*return \\(value\\)." \
+ "factorial.*value=720.*at.*${srcfile}:99.*return \\(value\\)." \
"until factorial, recursive function"
# Run to a function called by main
# stop at main, the caller, where we put the 'guard' breakpoint.
#
gdb_test "until marker3" \
- "$hex in main.*argc.*argv.*envp.*at ${srcfile}:82.*marker2 \\(43\\)." \
+ "$hex in main.*argc.*argv.*envp.*at.*${srcfile}:82.*marker2 \\(43\\)." \
"until func, not called by current frame"
source ${binfile}.ci
-set src "${srcdir}/${subdir}/${srcfile}"
-if { [gdb_compile "${src}" "${binfile}" executable {c++ debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++ debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}