Exploit 'prepare_for_testing' etc. for 'Dwarf::assemble'-generated files
Now that prepare_for_testing etc. can cope with absolute path names, this can be exploited for test cases with generated source files. This is just to simplify the code and shouldn't cause any functional change.
This commit is contained in:
parent
0e5c45554b
commit
e0c0f156b4
|
@ -1,3 +1,15 @@
|
|||
2014-03-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
||||
|
||||
* gdb.dwarf2/arr-stride.exp: Exploit 'prepare_for_testing'.
|
||||
* gdb.dwarf2/arr-subrange.exp: Likewise.
|
||||
* gdb.dwarf2/dwz.exp: Likewise.
|
||||
* gdb.dwarf2/method-ptr.exp: Likewise.
|
||||
* gdb.dwarf2/missing-sig-type.exp: Likewise.
|
||||
* gdb.dwarf2/subrange.exp: Likewise.
|
||||
* gdb.dwarf2/implptrconst.exp: Exploit 'build_executable'.
|
||||
* gdb.dwarf2/implptrpiece.exp: Likewise.
|
||||
* gdb.dwarf2/nostaticblock.exp: Likewise.
|
||||
|
||||
2014-03-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
||||
|
||||
* lib/gdb.exp (build_executable_from_specs): Don't prepend source
|
||||
|
|
|
@ -83,22 +83,11 @@ Dwarf::assemble $asm_file {
|
|||
}
|
||||
}
|
||||
|
||||
if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
|
||||
object {nodebug}] != ""} {
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} \
|
||||
[list $srcfile $asm_file] {nodebug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile [list ${binfile}1.o ${binfile}2.o] \
|
||||
"${binfile}" executable {}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
gdb_test_no_output "set language ada"
|
||||
|
||||
gdb_test "ptype pck.table" \
|
||||
|
|
|
@ -77,22 +77,11 @@ Dwarf::assemble $asm_file {
|
|||
}
|
||||
}
|
||||
|
||||
if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
|
||||
object {nodebug}] != ""} {
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} \
|
||||
[list $srcfile $asm_file] {nodebug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile [list ${binfile}1.o ${binfile}2.o] \
|
||||
"${binfile}" executable {}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
gdb_test_no_output "set language ada"
|
||||
|
||||
gdb_test "ptype pck.table" \
|
||||
|
|
|
@ -82,22 +82,11 @@ Dwarf::assemble $asm_file {
|
|||
}
|
||||
}
|
||||
|
||||
if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
|
||||
object {nodebug}] != "" } {
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} \
|
||||
[list $srcfile $asm_file] {nodebug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if { [gdb_compile $asm_file ${binfile}2.o object {nodebug}] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if { [gdb_compile [list ${binfile}1.o ${binfile}2.o] \
|
||||
"${binfile}" executable {}] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
if ![runto_main] {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -85,17 +85,8 @@ Dwarf::assemble $asm_file {
|
|||
}
|
||||
}
|
||||
|
||||
if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
|
||||
object {nodebug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile [list ${binfile}1.o ${binfile}2.o] \
|
||||
"${binfile}" executable {}] != ""} {
|
||||
if { [build_executable ${testfile}.exp ${testfile} \
|
||||
[list $srcfile $asm_file] {nodebug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -103,17 +103,8 @@ Dwarf::assemble $asm_file {
|
|||
}
|
||||
}
|
||||
|
||||
if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
|
||||
object {nodebug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile [list ${binfile}1.o ${binfile}2.o] \
|
||||
"${binfile}" executable {}] != ""} {
|
||||
if { [build_executable ${testfile}.exp ${testfile} \
|
||||
[list $srcfile $asm_file] {nodebug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -77,21 +77,10 @@ Dwarf::assemble $asm_file {
|
|||
}
|
||||
}
|
||||
|
||||
if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
|
||||
object {nodebug}] != ""} {
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} \
|
||||
[list $srcfile $asm_file] {nodebug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile [list ${binfile}1.o ${binfile}2.o] \
|
||||
"${binfile}" executable {c++}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
gdb_test "ptype the_typedef" \
|
||||
"type = int \\(S::\\*\\)\\(S \\* const, float\\)"
|
||||
|
|
|
@ -49,20 +49,9 @@ Dwarf::assemble $asm_file {
|
|||
}
|
||||
}
|
||||
|
||||
if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
|
||||
object {nodebug}] != ""} {
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} \
|
||||
[list $srcfile $asm_file] {nodebug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile [list ${binfile}1.o ${binfile}2.o] \
|
||||
"${binfile}" executable {c++}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
gdb_test "ptype foo" "type = <unknown type .*>"
|
||||
|
|
|
@ -35,22 +35,11 @@ Dwarf::assemble $asm_file {
|
|||
}
|
||||
}
|
||||
|
||||
if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
|
||||
object {nodebug}] != ""} {
|
||||
if { [build_executable ${testfile}.exp ${testfile} \
|
||||
[list $srcfile $asm_file] {nodebug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile [list ${binfile}1.o ${binfile}2.o] \
|
||||
"${binfile}" executable {c++}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
set saved_gdbflags $GDBFLAGS
|
||||
set GDBFLAGS "$GDBFLAGS --readnow"
|
||||
clean_restart $testfile
|
||||
|
|
|
@ -60,22 +60,11 @@ Dwarf::assemble $asm_file {
|
|||
}
|
||||
}
|
||||
|
||||
if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
|
||||
object {nodebug}] != ""} {
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} \
|
||||
[list $srcfile $asm_file] {nodebug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile [list ${binfile}1.o ${binfile}2.o] \
|
||||
"${binfile}" executable {c++}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
gdb_test_no_output "set language pascal"
|
||||
|
||||
gdb_test "ptype TByteArray" \
|
||||
|
|
Loading…
Reference in New Issue