This fixes parts of gdb.arch to be parallel-safe.
I only changed the bits I could test on this machine.
I don't have access to many of the machines needed to fully switch
gdb.arch; but I am happy to provide advice to others attempting this.
Or, I can send an untested patch to convert it all.
Tested on x86-64 Fedora 18.
* gdb.arch/amd64-byte.exp: Use standard_testfile,
clean_restart.
* gdb.arch/amd64-disp-step.exp: Use standard_testfile.
* gdb.arch/amd64-dword.exp: Use standard_testfile,
clean_restart.
* gdb.arch/amd64-entry-value-param.exp: Use standard_testfile.
* gdb.arch/amd64-entry-value.exp: Use standard_testfile.
* gdb.arch/amd64-prologue-xmm.exp: Use standard_testfile.
* gdb.arch/amd64-word.exp: Use standard_testfile,
clean_restart.
* gdb.arch/i386-avx.exp: Use standard_testfile, clean_restart.
* gdb.arch/i386-byte.exp: Use standard_testfile, clean_restart.
* gdb.arch/i386-disp-step.exp: Use standard_testfile.
* gdb.arch/i386-dr3-watch.exp: Use standard_testfile.
* gdb.arch/i386-permbkpt.exp: Use standard_testfile, clean_restart.
* gdb.arch/i386-signal.exp: Use standard_testfile.
* gdb.arch/i386-size-overlap.exp: Use standard_testfile, clean_restart.
* gdb.arch/i386-sse.exp: Use standard_testfile, clean_restart.
* gdb.arch/i386-unwind.exp: Use standard_testfile.
* gdb.arch/i386-word.exp: Use standard_testfile, clean_restart.
+2013-08-22 Tom Tromey <tromey@redhat.com>
+
+ * gdb.arch/amd64-byte.exp: Use standard_testfile,
+ clean_restart.
+ * gdb.arch/amd64-disp-step.exp: Use standard_testfile.
+ * gdb.arch/amd64-dword.exp: Use standard_testfile,
+ clean_restart.
+ * gdb.arch/amd64-entry-value-param.exp: Use standard_testfile.
+ * gdb.arch/amd64-entry-value.exp: Use standard_testfile.
+ * gdb.arch/amd64-prologue-xmm.exp: Use standard_testfile.
+ * gdb.arch/amd64-word.exp: Use standard_testfile,
+ clean_restart.
+ * gdb.arch/i386-avx.exp: Use standard_testfile, clean_restart.
+ * gdb.arch/i386-byte.exp: Use standard_testfile, clean_restart.
+ * gdb.arch/i386-disp-step.exp: Use standard_testfile.
+ * gdb.arch/i386-dr3-watch.exp: Use standard_testfile.
+ * gdb.arch/i386-permbkpt.exp: Use standard_testfile, clean_restart.
+ * gdb.arch/i386-signal.exp: Use standard_testfile.
+ * gdb.arch/i386-size-overlap.exp: Use standard_testfile, clean_restart.
+ * gdb.arch/i386-sse.exp: Use standard_testfile, clean_restart.
+ * gdb.arch/i386-unwind.exp: Use standard_testfile.
+ * gdb.arch/i386-word.exp: Use standard_testfile, clean_restart.
+
2013-08-22 Tom Tromey <tromey@redhat.com>
* gdb.python/py-error.exp: Use gdb_remote_download.
return
}
-set testfile "amd64-byte"
-set srcfile amd64-pseudo.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile amd64-pseudo.c
if [get_compiler_info] {
return -1
return
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
if ![runto_main] then {
gdb_suppress_tests
set newline "\[\r\n\]*"
-set testfile "amd64-disp-step"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .S
set additional_flags "-Wa,-g"
return
}
-set testfile "amd64-dword"
-set srcfile amd64-pseudo.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile amd64-pseudo.c
if [get_compiler_info] {
return -1
return
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
if ![runto_main] then {
gdb_suppress_tests
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set testfile amd64-entry-value-param
-set srcfile ${testfile}.S
-set csrcfile ${testfile}.c
+standard_testfile .S .c
set opts {}
if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param.exp COMPILE=1"
- set srcfile ${csrcfile}
+ set srcfile ${srcfile2}
lappend opts debug optimize=-O2
} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
verbose "Skipping amd64-entry-value-param."
return -1
}
-set srcfile $csrcfile
+set srcfile $srcfile2
gdb_breakpoint [gdb_get_line_number "break-here"]
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set testfile amd64-entry-value
-set srcfile ${testfile}.s
+standard_testfile .s
set opts {}
if [info exists COMPILE] {
# Test GCC PR debug/48827 workaround in GDB.
-set testfile "amd64-prologue-xmm"
-set srcfile ${testfile}.s
+standard_testfile .s
+set csrcfile [file rootname $srcfile].c
set csrcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}.x
set opts {}
if [info exists COMPILE] {
return 0
}
-if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts]} {
+if {[prepare_for_testing ${testfile}.exp ${binfile} $srcfile $opts]} {
return -1
}
return
}
-set testfile "amd64-word"
-set srcfile amd64-pseudo.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile amd64-pseudo.c
if [get_compiler_info] {
return -1
return
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
if ![runto_main] then {
gdb_suppress_tests
return
}
-set testfile "i386-avx"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
if [get_compiler_info] {
return -1
return
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
if ![runto_main] then {
gdb_suppress_tests
return
}
-set testfile "i386-byte"
-set srcfile i386-pseudo.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile i386-pseudo.c
if [get_compiler_info] {
return -1
return
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
if ![runto_main] then {
gdb_suppress_tests
return
}
-set testfile "i386-disp-step"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .S
set additional_flags "-Wa,-g"
return 0
}
-set testfile "i386-dr3-watch"
-set srcfile ${testfile}.c
+standard_testfile
-if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug $additional_flags}] {
+if [prepare_for_testing ${testfile}.exp ${binfile} ${srcfile} {debug $additional_flags}] {
untested "failed to compile ${testfile}"
return -1
}
return
}
-set testfile "i386-permbkpt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .S
# some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags]
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
gdb_test "break main" "" "First permanent break"
gdb_test "break main" "" "Second permanent break"
return
}
-set testfile "i386-signal"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
return
}
-set testfile "i386-size-overlap"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
# some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags]
return
}
-set testfile "i386-sse"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
if [get_compiler_info] {
return -1
return
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
if ![runto_main] then {
gdb_suppress_tests
return
}
-set testfile "i386-unwind"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
# some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags]
return
}
-set testfile "i386-word"
-set srcfile i386-pseudo.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile i386-pseudo.c
if [get_compiler_info] {
return -1
return
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
if ![runto_main] then {
gdb_suppress_tests