fix gdb.arch to be parallel-safe

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.
This commit is contained in:
Tom Tromey 2013-08-22 13:54:15 +00:00
parent 8448e842cd
commit de5f37e1db
18 changed files with 53 additions and 85 deletions

View file

@ -1,3 +1,26 @@
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> 2013-08-22 Tom Tromey <tromey@redhat.com>
* gdb.python/py-error.exp: Use gdb_remote_download. * gdb.python/py-error.exp: Use gdb_remote_download.

View file

@ -24,9 +24,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
return return
} }
set testfile "amd64-byte" standard_testfile amd64-pseudo.c
set srcfile amd64-pseudo.c
set binfile ${objdir}/${subdir}/${testfile}
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
@ -37,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
return return
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then { if ![runto_main] then {
gdb_suppress_tests gdb_suppress_tests

View file

@ -25,9 +25,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
set newline "\[\r\n\]*" set newline "\[\r\n\]*"
set testfile "amd64-disp-step" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}
set additional_flags "-Wa,-g" set additional_flags "-Wa,-g"

View file

@ -24,9 +24,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
return return
} }
set testfile "amd64-dword" standard_testfile amd64-pseudo.c
set srcfile amd64-pseudo.c
set binfile ${objdir}/${subdir}/${testfile}
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
@ -37,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
return return
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then { if ![runto_main] then {
gdb_suppress_tests gdb_suppress_tests

View file

@ -13,14 +13,12 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set testfile amd64-entry-value-param standard_testfile .S .c
set srcfile ${testfile}.S
set csrcfile ${testfile}.c
set opts {} set opts {}
if [info exists COMPILE] { if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param.exp COMPILE=1" # make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param.exp COMPILE=1"
set srcfile ${csrcfile} set srcfile ${srcfile2}
lappend opts debug optimize=-O2 lappend opts debug optimize=-O2
} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } { } elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
verbose "Skipping amd64-entry-value-param." verbose "Skipping amd64-entry-value-param."
@ -35,7 +33,7 @@ if ![runto_main] {
return -1 return -1
} }
set srcfile $csrcfile set srcfile $srcfile2
gdb_breakpoint [gdb_get_line_number "break-here"] gdb_breakpoint [gdb_get_line_number "break-here"]
gdb_continue_to_breakpoint "break-here" ".* break-here .*" gdb_continue_to_breakpoint "break-here" ".* break-here .*"

View file

@ -13,8 +13,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set testfile amd64-entry-value standard_testfile .s
set srcfile ${testfile}.s
set opts {} set opts {}
if [info exists COMPILE] { if [info exists COMPILE] {

View file

@ -15,10 +15,9 @@
# Test GCC PR debug/48827 workaround in GDB. # Test GCC PR debug/48827 workaround in GDB.
set testfile "amd64-prologue-xmm" standard_testfile .s
set srcfile ${testfile}.s set csrcfile [file rootname $srcfile].c
set csrcfile ${testfile}.c set csrcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}.x
set opts {} set opts {}
if [info exists COMPILE] { if [info exists COMPILE] {
@ -30,7 +29,7 @@ if [info exists COMPILE] {
return 0 return 0
} }
if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts]} { if {[prepare_for_testing ${testfile}.exp ${binfile} $srcfile $opts]} {
return -1 return -1
} }

View file

@ -24,9 +24,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
return return
} }
set testfile "amd64-word" standard_testfile amd64-pseudo.c
set srcfile amd64-pseudo.c
set binfile ${objdir}/${subdir}/${testfile}
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
@ -37,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
return return
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then { if ![runto_main] then {
gdb_suppress_tests gdb_suppress_tests

View file

@ -24,9 +24,7 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
return return
} }
set testfile "i386-avx" standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
@ -42,10 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
return return
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then { if ![runto_main] then {
gdb_suppress_tests gdb_suppress_tests

View file

@ -24,9 +24,7 @@ if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"])} then {
return return
} }
set testfile "i386-byte" standard_testfile i386-pseudo.c
set srcfile i386-pseudo.c
set binfile ${objdir}/${subdir}/${testfile}
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
@ -37,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
return return
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then { if ![runto_main] then {
gdb_suppress_tests gdb_suppress_tests

View file

@ -23,9 +23,7 @@ if { ![is_x86_like_target] } then {
return return
} }
set testfile "i386-disp-step" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}
set additional_flags "-Wa,-g" set additional_flags "-Wa,-g"

View file

@ -23,10 +23,9 @@ if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then {
return 0 return 0
} }
set testfile "i386-dr3-watch" standard_testfile
set srcfile ${testfile}.c
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}" untested "failed to compile ${testfile}"
return -1 return -1
} }

View file

@ -23,9 +23,7 @@ if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then {
return return
} }
set testfile "i386-permbkpt" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols. # some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags] set additional_flags [gdb_target_symbol_prefix_flags]
@ -35,10 +33,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
return -1 return -1
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_test "break main" "" "First permanent break" gdb_test "break main" "" "First permanent break"
gdb_test "break main" "" "Second permanent break" gdb_test "break main" "" "Second permanent break"

View file

@ -20,9 +20,7 @@ if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then {
return return
} }
set testfile "i386-signal" standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } { executable { debug }] != "" } {

View file

@ -22,9 +22,7 @@ if { ![is_x86_like_target] } then {
return return
} }
set testfile "i386-size-overlap" standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols. # some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags] set additional_flags [gdb_target_symbol_prefix_flags]

View file

@ -24,9 +24,7 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
return return
} }
set testfile "i386-sse" standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
@ -42,10 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
return return
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then { if ![runto_main] then {
gdb_suppress_tests gdb_suppress_tests

View file

@ -26,9 +26,7 @@ if { ![is_x86_like_target] } then {
return return
} }
set testfile "i386-unwind" standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# some targets have leading underscores on assembly symbols. # some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags] set additional_flags [gdb_target_symbol_prefix_flags]

View file

@ -24,9 +24,7 @@ if {(![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"])} then {
return return
} }
set testfile "i386-word" standard_testfile i386-pseudo.c
set srcfile i386-pseudo.c
set binfile ${objdir}/${subdir}/${testfile}
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
@ -37,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
return return
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then { if ![runto_main] then {
gdb_suppress_tests gdb_suppress_tests