]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* gdb.dwarf2/dup-psym.exp: Use prepare_for_testing_full.
authorTom Tromey <tromey@redhat.com>
Thu, 12 Jul 2012 15:15:07 +0000 (15:15 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 12 Jul 2012 15:15:07 +0000 (15:15 +0000)
* gdb.dwarf2/dw2-anonymous-func.exp: Use
prepare_for_testing_full.
* gdb.dwarf2/dw2-basic.exp: Use prepare_for_testing_full.
* gdb.dwarf2/dw2-compressed.exp: Use prepare_for_testing_full.
* gdb.dwarf2/dw2-const.exp: Use prepare_for_testing_full.
* gdb.dwarf2/dw2-cu-size.exp: Use prepare_for_testing_full.
* gdb.dwarf2/dw2-intercu.exp: Use prepare_for_testing_full.
* gdb.dwarf2/dw2-intermix.exp: Use prepare_for_testing_full.
* gdb.dwarf2/dw2-linkage-name-trust.exp: Use
prepare_for_testing_full.
* gdb.dwarf2/dw2-producer.exp: Use prepare_for_testing_full.
* gdb.dwarf2/dw2-ref-missing-frame.exp: Use
prepare_for_testing_full.
* gdb.dwarf2/dw2-restore.exp: Use prepare_for_testing_full.
* gdb.dwarf2/dw2-strp.exp: Use prepare_for_testing_full.
* gdb.dwarf2/mac-fileno.exp: Use prepare_for_testing_full.

15 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/dup-psym.exp
gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
gdb/testsuite/gdb.dwarf2/dw2-basic.exp
gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
gdb/testsuite/gdb.dwarf2/dw2-const.exp
gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
gdb/testsuite/gdb.dwarf2/dw2-producer.exp
gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
gdb/testsuite/gdb.dwarf2/dw2-restore.exp
gdb/testsuite/gdb.dwarf2/dw2-strp.exp
gdb/testsuite/gdb.dwarf2/mac-fileno.exp

index c763b86cffa4c81874083038db08e1e0f0564125..ed944313fac987b9653b08e71c615ac4056bb929 100644 (file)
@@ -1,3 +1,23 @@
+2012-07-12  Tom Tromey  <tromey@redhat.com>
+
+       * gdb.dwarf2/dup-psym.exp: Use prepare_for_testing_full.
+       * gdb.dwarf2/dw2-anonymous-func.exp: Use
+       prepare_for_testing_full.
+       * gdb.dwarf2/dw2-basic.exp: Use prepare_for_testing_full.
+       * gdb.dwarf2/dw2-compressed.exp: Use prepare_for_testing_full.
+       * gdb.dwarf2/dw2-const.exp: Use prepare_for_testing_full.
+       * gdb.dwarf2/dw2-cu-size.exp: Use prepare_for_testing_full.
+       * gdb.dwarf2/dw2-intercu.exp: Use prepare_for_testing_full.
+       * gdb.dwarf2/dw2-intermix.exp: Use prepare_for_testing_full.
+       * gdb.dwarf2/dw2-linkage-name-trust.exp: Use
+       prepare_for_testing_full.
+       * gdb.dwarf2/dw2-producer.exp: Use prepare_for_testing_full.
+       * gdb.dwarf2/dw2-ref-missing-frame.exp: Use
+       prepare_for_testing_full.
+       * gdb.dwarf2/dw2-restore.exp: Use prepare_for_testing_full.
+       * gdb.dwarf2/dw2-strp.exp: Use prepare_for_testing_full.
+       * gdb.dwarf2/mac-fileno.exp: Use prepare_for_testing_full.
+
 2012-07-12  Tom Tromey  <tromey@redhat.com>
 
        * lib/gdb.exp (build_executable_from_specs): New proc, from
index d4fa160dfb939b332edf75f3462c25058de70865..9ecd5e903ced8c7193c4732437d7bfeb76ae03bd 100644 (file)
@@ -23,23 +23,11 @@ if {![dwarf2_support]} {
 
 standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile {debug} main.c debug $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-gdb_exit
-gdb_start
-# Note that we do not change the sources search path,
-gdb_load ${binfile}
-
 set test "info sources should contain only one reference to file1.txt"
 gdb_test_multiple "info sources" "$test" {
   -re "file1\\.txt.*file1\\.txt.*$gdb_prompt $" {
index ada66b061fbee549a645a1e2fd435ae4b9c3e53f..82fbb2a1462f248f3e3b24c98a8f9681d354590f 100644 (file)
@@ -24,23 +24,11 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 # Force the debugger to create the file1.txt symtab, to make sure that
 # the debugger does not crash doing so.
 gdb_test "list file1.txt:1" "File 1 Line 1.*File 1 Line 8" "list file1.txt"
index 90b112b7a92112ba80c5232eabf6d0afb1de2713..fa11ebee787c41f73659c3d7eefa355c25c3388a 100644 (file)
@@ -24,23 +24,11 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}]
 
 gdb_test_no_output "set listsize 1"
index 7cc276c0e7cf31ed2445dc55b7e9e8818475d6da..cfb4f3356979c0fa60849fce932cc4471893bccc 100644 (file)
@@ -24,23 +24,13 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main-ndebug.o" object -g0] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile \
+             {debug additional_flags=-static additional_flags=-nostdlib} \
+             main.c -g0 $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main-ndebug.o -static -nostdlib" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}]
 
 gdb_test_no_output "set listsize 1"
index 087fca97de0ea1d05ee2d4b8557d711ca30a9ec7..94820576e5ac6314673a151e52acb20e0a5f6c8b 100644 (file)
@@ -21,20 +21,11 @@ if {![dwarf2_support]} {
 
 standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-clean_restart ${testfile}
-
 gdb_test "print twelve" "= 12"
 
 gdb_test "print/x val8" " = 0xffffffff00000000"
index 7ac0df7b38410d771496b38502d660259158c25c..10dd3ecca30abd0bce9bdac4186805a97c254576 100644 (file)
@@ -26,21 +26,9 @@ if {![dwarf2_support]} {
 
 standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 gdb_test "ptype noloc" "type = const int"
index 2eaac65d9ebd3a128bd09382dd21e30cf199dc8f..dd836c5829b0912885cda64ed42e06ecf3ad9205 100644 (file)
@@ -24,23 +24,11 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}]
 
 # This needs to be done first so that the CU for int2 gets expanded first.
index 0f765452e3224799b68f996e51ef657c84d0a98f..2ea96bcf2aa3392e562a11cd57f3552facbd6d91 100644 (file)
@@ -24,23 +24,11 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}]
 
 gdb_test_no_output "set listsize 1"
index 9eae088fea8298faa4a7bcfe995c2e719c029b39..785744919db10dfd7e4411f95bb7386769a15e11 100644 (file)
@@ -25,16 +25,15 @@ if {![dwarf2_support]} {
     return 0  
 }
 
-standard_testfile
+standard_testfile .S
 set executable ${testfile}
-if { [gdb_compile ${srcdir}/${subdir}/${testfile}-main.cc "${objdir}/${subdir}/${testfile}-main.o" object {c++ debug}] != ""
-     || [gdb_compile "${srcdir}/${subdir}/${testfile}.S" "${objdir}/${subdir}/${testfile}.o" object {}] != ""
-     || [gdb_compile "${objdir}/${subdir}/${testfile}-main.o ${objdir}/${subdir}/${testfile}.o" "${binfile}" executable {c++}] != "" } {
+
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile c++ $testfile-main.cc {c++ debug} \
+             $srcfile {}]]} {
     return -1
 }
 
-clean_restart $executable
-
 if ![runto_main] then {
     return -1
 }
index 0961081d964723e75426b5ca7dca78df32dde5b0..29a62c88027df3a3f84a1d779fa34838892ee89b 100644 (file)
@@ -22,23 +22,11 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}]
 
 gdb_test_no_output "set listsize 1"
index 75c1eb4ed886917f1deff5d460a343e850269463..74fb6989544ee596ac71dc14be1f351846cfcca2 100644 (file)
@@ -20,22 +20,16 @@ if {![dwarf2_support]} {
 }
 
 standard_testfile .S
-set objsfile [standard_output_file ${testfile}.o]
 set srcfuncfile ${testfile}-func.c
-set objfuncfile [standard_output_file ${testfile}-func.o]
 set srcmainfile ${testfile}-main.c
-set objmainfile [standard_output_file ${testfile}-main.o]
 set executable ${testfile}
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $objsfile object {}] != ""
-     || [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" $objfuncfile object {}] != ""
-     || [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" $objmainfile object {debug}] != ""
-     || [gdb_compile "$objsfile $objfuncfile $objmainfile" $binfile executable {}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile {} $srcfile {} $srcfuncfile {} \
+             $srcmainfile debug]]} {
     return -1
 }
 
-clean_restart $executable
-
 # First try referencing DW_AT_frame_base which is not defined.
 if [runto func_nofb] {
     gdb_test "p func_nofb_var" {Could not find the frame base for "func_nofb".} "func_nofb print"
index 99d8191b6dac77644de8afe00479d36375e272f2..081655a4527ef355302b3921b6b7e9aa3d9d99b5 100644 (file)
@@ -21,16 +21,11 @@ if {![istarget x86_64-*] || ![is_lp64_target]} {
 }
 standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
-       [list {additional_flags=-nostdlib}]] != "" } {
+if {[prepare_for_testing $testfile.exp $testfile [list $srcfile] \
+        [list {additional_flags=-nostdlib}]]} {
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 if ![runto foo] {
     return 0
 }
index b98833e61a694057dbd063271e24e2a3ece7fc03..d2820ae9fe9206437f9d5ef86a85e7182b99930a 100644 (file)
@@ -24,23 +24,11 @@ if {![dwarf2_support]} {
 
 standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 gdb_test "p a_string" " = \"hello world!\\\\n\""
 gdb_test "ptype a_string" "type = const char \\\[14\\\]"
 
index b329081784bf2997f9e952caad5f91387fd4c10d..6e8bd9ec3613492478b2ec3e9c486bcd617b58b0 100644 (file)
@@ -25,23 +25,11 @@ if {![dwarf2_support]} {
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile debug main.c debug $srcfile nodebug]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${testfile}.o" object {nodebug}] != "" } {
-    return -1
-}
-
-if  { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != "" } {
-    return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}]
 
 gdb_test_no_output "set listsize 1"