* gdb.dwarf2/pr10770.exp: Use standard_testfile.

* gdb.dwarf2/dw2-var-zero-addr.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-param-error.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-op-call.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-inline-param.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.dwarf2/dw2-inline-break.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-ifort-parameter.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Use
	standard_testfile.
	* gdb.dwarf2/dw2-case-insensitive.exp: Use standard_testfile.
	* gdb.dwarf2/dw4-sig-types.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-objfile-overlap.exp: Use standard_testfile.
	* gdb.dwarf2/callframecfa.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.dwarf2/dup-psym.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-ada-ffffffff.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-anonymous-func.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-bad-parameter-type.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-basic.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-compressed.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-const.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-cu-size.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-double-set-die-type.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-empty-namespace.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-empty-pc-range.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-filename.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-icc-opaque.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-inheritance.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-intercu.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-intermix.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-linkage-name-trust.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-modula2-self-type.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-namespaceless-anonymous.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-op-stack-value.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-producer.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-ranges.exp: Use standard_testfile,
	standard_output_file.
	* gdb.dwarf2/dw2-ref-missing-frame.exp: Use standard_testfile,
	standard_output_file.
	* gdb.dwarf2/dw2-restore.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-simple-locdesc.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-skip-prologue.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-stack-boundary.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-strp.exp: Use standard_testfile.
	* gdb.dwarf2/dw4-sig-type-unused.exp: Use standard_testfile.
	* gdb.dwarf2/implptr-64bit.exp: Use standard_testfile.
	* gdb.dwarf2/implptr-optimized-out.exp: Use standard_testfile.
	* gdb.dwarf2/implptr.exp: Use standard_testfile.
	* gdb.dwarf2/mac-fileno.exp: Use standard_testfile.
	* gdb.dwarf2/member-ptr-forwardref.exp: Use standard_testfile.
	* gdb.dwarf2/pieces.exp: Use standard_testfile.
	* gdb.dwarf2/pr11465.exp: Use standard_testfile.
	* gdb.dwarf2/pr13961.exp: Use standard_testfile.
	* gdb.dwarf2/valop.exp: Use standard_testfile,
	prepare_for_testing.
This commit is contained in:
Tom Tromey
2012-06-27 17:00:09 +00:00
parent 0bc3a05c52
commit c83ee9021b
51 changed files with 178 additions and 198 deletions

View File

@ -1,3 +1,62 @@
2012-06-27 Tom Tromey <tromey@redhat.com>
* gdb.dwarf2/pr10770.exp: Use standard_testfile.
* gdb.dwarf2/dw2-var-zero-addr.exp: Use standard_testfile.
* gdb.dwarf2/dw2-param-error.exp: Use standard_testfile.
* gdb.dwarf2/dw2-op-call.exp: Use standard_testfile.
* gdb.dwarf2/dw2-inline-param.exp: Use standard_testfile,
prepare_for_testing.
* gdb.dwarf2/dw2-inline-break.exp: Use standard_testfile.
* gdb.dwarf2/dw2-ifort-parameter.exp: Use standard_testfile.
* gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Use
standard_testfile.
* gdb.dwarf2/dw2-case-insensitive.exp: Use standard_testfile.
* gdb.dwarf2/dw4-sig-types.exp: Use standard_testfile.
* gdb.dwarf2/dw2-objfile-overlap.exp: Use standard_testfile.
* gdb.dwarf2/callframecfa.exp: Use standard_testfile,
prepare_for_testing.
* gdb.dwarf2/dup-psym.exp: Use standard_testfile.
* gdb.dwarf2/dw2-ada-ffffffff.exp: Use standard_testfile.
* gdb.dwarf2/dw2-anonymous-func.exp: Use standard_testfile.
* gdb.dwarf2/dw2-bad-parameter-type.exp: Use standard_testfile.
* gdb.dwarf2/dw2-basic.exp: Use standard_testfile.
* gdb.dwarf2/dw2-compressed.exp: Use standard_testfile.
* gdb.dwarf2/dw2-const.exp: Use standard_testfile.
* gdb.dwarf2/dw2-cu-size.exp: Use standard_testfile.
* gdb.dwarf2/dw2-double-set-die-type.exp: Use standard_testfile.
* gdb.dwarf2/dw2-empty-namespace.exp: Use standard_testfile.
* gdb.dwarf2/dw2-empty-pc-range.exp: Use standard_testfile.
* gdb.dwarf2/dw2-filename.exp: Use standard_testfile.
* gdb.dwarf2/dw2-icc-opaque.exp: Use standard_testfile.
* gdb.dwarf2/dw2-inheritance.exp: Use standard_testfile.
* gdb.dwarf2/dw2-intercu.exp: Use standard_testfile.
* gdb.dwarf2/dw2-intermix.exp: Use standard_testfile.
* gdb.dwarf2/dw2-linkage-name-trust.exp: Use standard_testfile.
* gdb.dwarf2/dw2-modula2-self-type.exp: Use standard_testfile.
* gdb.dwarf2/dw2-namespaceless-anonymous.exp: Use standard_testfile.
* gdb.dwarf2/dw2-op-stack-value.exp: Use standard_testfile.
* gdb.dwarf2/dw2-producer.exp: Use standard_testfile.
* gdb.dwarf2/dw2-ranges.exp: Use standard_testfile,
standard_output_file.
* gdb.dwarf2/dw2-ref-missing-frame.exp: Use standard_testfile,
standard_output_file.
* gdb.dwarf2/dw2-restore.exp: Use standard_testfile.
* gdb.dwarf2/dw2-simple-locdesc.exp: Use standard_testfile.
* gdb.dwarf2/dw2-skip-prologue.exp: Use standard_testfile.
* gdb.dwarf2/dw2-stack-boundary.exp: Use standard_testfile.
* gdb.dwarf2/dw2-strp.exp: Use standard_testfile.
* gdb.dwarf2/dw4-sig-type-unused.exp: Use standard_testfile.
* gdb.dwarf2/implptr-64bit.exp: Use standard_testfile.
* gdb.dwarf2/implptr-optimized-out.exp: Use standard_testfile.
* gdb.dwarf2/implptr.exp: Use standard_testfile.
* gdb.dwarf2/mac-fileno.exp: Use standard_testfile.
* gdb.dwarf2/member-ptr-forwardref.exp: Use standard_testfile.
* gdb.dwarf2/pieces.exp: Use standard_testfile.
* gdb.dwarf2/pr11465.exp: Use standard_testfile.
* gdb.dwarf2/pr13961.exp: Use standard_testfile.
* gdb.dwarf2/valop.exp: Use standard_testfile,
prepare_for_testing.
2012-06-27 Tom Tromey <tromey@redhat.com> 2012-06-27 Tom Tromey <tromey@redhat.com>
* gdb.python/python.exp: Fix regexps in pagination tests. * gdb.python/python.exp: Fix regexps in pagination tests.

View File

@ -25,20 +25,13 @@ if {![is_x86_like_target]} {
return 0 return 0
} }
set testfile "callframecfa" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \ if {[prepare_for_testing $testname.exp $testname $srcfile \
[list {additional_flags=-nostdlib}]] != "" } { [list {additional_flags=-nostdlib}]]} {
return -1 return -1
} }
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] { if ![runto_main] {
return -1 return -1
} }

View File

@ -21,9 +21,7 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dup-psym" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
return -1 return -1

View File

@ -19,10 +19,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-ada-ffffffff" standard_testfile .S
set srcfile ${testfile}.S set executable ${testfile}
set executable ${testfile}.x
set binfile ${objdir}/${subdir}/${executable}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
return -1 return -1

View File

@ -21,10 +21,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-anonymous-func" standard_testfile .S
set dwarf_srcfile "file1.txt" set dwarf_srcfile "file1.txt"
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
return -1 return -1

View File

@ -19,10 +19,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-bad-parameter-type" standard_testfile .S
set srcfile ${testfile}.S set executable ${testfile}
set executable ${testfile}.x
set binfile ${objdir}/${subdir}/${executable}
# First try referencing DW_AT_frame_base which is not defined. # First try referencing DW_AT_frame_base which is not defined.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {

View File

@ -21,10 +21,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-basic" standard_testfile .S
set dwarf_srcfile "file1.txt" set dwarf_srcfile "file1.txt"
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
return -1 return -1

View File

@ -19,9 +19,10 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-case-insensitive" standard_testfile .c dw2-case-insensitive-debug.S
if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.c ${testfile}-debug.S] {nodebug}] } { if { [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $srcfile2] {nodebug}] } {
return -1 return -1
} }

View File

@ -21,10 +21,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-compressed" standard_testfile .S
set dwarf_srcfile "file1.txt" set dwarf_srcfile "file1.txt"
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main-ndebug.o" object -g0] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main-ndebug.o" object -g0] != "" } {
return -1 return -1

View File

@ -19,9 +19,7 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-const" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
return -1 return -1
@ -35,7 +33,7 @@ if { [gdb_compile "${testfile}.o main.o" "${binfile}" executable {debug}] != ""
return -1 return -1
} }
clean_restart ${testfile}.x clean_restart ${testfile}
gdb_test "print twelve" "= 12" gdb_test "print twelve" "= 12"

View File

@ -25,8 +25,10 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-cp-infcall-ref-static" standard_testfile .S dw2-cp-infcall-ref-static-main.c
if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}-main.c ${testfile}.S] {}] } {
if { [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile2 $srcfile] {}] } {
return -1 return -1
} }

View File

@ -24,9 +24,7 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-cu-size" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
return -1 return -1

View File

@ -22,15 +22,12 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-double-set-die-type" standard_testfile .S
set srcfile "$testfile.S"
set executable "$testfile.x"
if { [gdb_compile [file join $srcdir $subdir $srcfile] \ if { [gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
[file join $objdir $subdir $executable] \
object {nodebug}] != "" } { object {nodebug}] != "" } {
return -1 return -1
} }
clean_restart $executable clean_restart $testfile
gdb_test "ptype a" "type = class .*" gdb_test "ptype a" "type = class .*"

View File

@ -21,15 +21,14 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-empty-namespace" standard_testfile .S
set srcfile ${testfile}.S
set executable ${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
object {nodebug}] != "" } {
return -1 return -1
} }
clean_restart $executable clean_restart $testfile
# `p var' below can work without identified DWARF DIE just based on its ELF symbol. # `p var' below can work without identified DWARF DIE just based on its ELF symbol.
# Catch it here as `type = <data variable, no debug info>'. # Catch it here as `type = <data variable, no debug info>'.

View File

@ -19,10 +19,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-empty-pc-range" standard_testfile .S
set srcfile ${testfile}.S set executable ${testfile}
set executable ${testfile}.x
set binfile ${objdir}/${subdir}/${executable}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
return -1 return -1

View File

@ -21,15 +21,13 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-filename" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug}] != "" } {
return -1 return -1
} }
clean_restart ${testfile}.x clean_restart ${testfile}
# Verify that -file-list-exec-source-files returns a list where # Verify that -file-list-exec-source-files returns a list where
# the "file" is "file1.txt" (file base name), and "fullname" is # the "file" is "file1.txt" (file base name), and "fullname" is

View File

@ -23,10 +23,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-icc-opaque" standard_testfile .S
set srcfile ${testfile}.S set executable ${testfile}
set executable ${testfile}.x
set binfile ${objdir}/${subdir}/${executable}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
return -1 return -1

View File

@ -22,9 +22,10 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-ifort-parameter" standard_testfile .c dw2-ifort-parameter-debug.S
if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.c ${testfile}-debug.S] {nodebug}] } { if { [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $srcfile2] {nodebug}] } {
return -1 return -1
} }

View File

@ -22,14 +22,13 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-inheritance" standard_testfile .S
set srcfile ${testfile}.S
set executable ${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
object {nodebug}] != "" } {
return -1 return -1
} }
clean_restart $executable clean_restart $testfile
gdb_test "ptype inherited" "type = class inherited .*" gdb_test "ptype inherited" "type = class inherited .*"

View File

@ -29,9 +29,10 @@ if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
} }
set basename "inline-break" set basename "inline-break"
set testfile "dw2-$basename"
if { [prepare_for_testing $testfile.exp $testfile $testfile.S {nodebug}] } { standard_testfile .S
if { [prepare_for_testing $testfile.exp $testfile $srcfile {nodebug}] } {
return -1 return -1
} }

View File

@ -19,14 +19,13 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile dw2-inline-param standard_testfile .S dw2-inline-param-main.c
set binfile ${objdir}/${subdir}/${testfile}
if { [build_executable ${testfile}.exp "${testfile}" [list ${testfile}-main.c ${testfile}.S] {nodebug}] } { if { [prepare_for_testing ${testfile}.exp "${testfile}" \
[list $srcfile2 $srcfile] {nodebug}] } {
return -1 return -1
} }
clean_restart ${testfile}
set break_at "" set break_at ""
set test "info addr break_at" set test "info addr break_at"
gdb_test_multiple $test $test { gdb_test_multiple $test $test {

View File

@ -21,10 +21,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-intercu" standard_testfile .S
set dwarf_srcfile "file1.txt" set dwarf_srcfile "file1.txt"
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
return -1 return -1

View File

@ -21,10 +21,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-intermix" standard_testfile .S
set dwarf_srcfile "file1.txt" set dwarf_srcfile "file1.txt"
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
return -1 return -1

View File

@ -25,9 +25,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-linkage-name-trust" standard_testfile
set executable ${testfile} set executable ${testfile}
set binfile ${objdir}/${subdir}/${executable}
if { [gdb_compile ${srcdir}/${subdir}/${testfile}-main.cc "${objdir}/${subdir}/${testfile}-main.o" object {c++ debug}] != "" 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 "${srcdir}/${subdir}/${testfile}.S" "${objdir}/${subdir}/${testfile}.o" object {}] != ""
|| [gdb_compile "${objdir}/${subdir}/${testfile}-main.o ${objdir}/${subdir}/${testfile}.o" "${binfile}" executable {c++}] != "" } { || [gdb_compile "${objdir}/${subdir}/${testfile}-main.o ${objdir}/${subdir}/${testfile}.o" "${binfile}" executable {c++}] != "" } {

View File

@ -19,17 +19,14 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-modula2-self-type" standard_testfile .S
set srcfile ${testfile}.S
set executable ${testfile}.x
set binfile ${objdir}/${subdir}/${executable}
# First try referencing DW_AT_frame_base which is not defined. # First try referencing DW_AT_frame_base which is not defined.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
return -1 return -1
} }
clean_restart $executable clean_restart $testfile
# C language would just naively print: # C language would just naively print:
# type = void (*)(void (*)(void (*)(void (*)(void (*)(... # type = void (*)(void (*)(void (*)(void (*)(void (*)(...

View File

@ -19,15 +19,14 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-namespaceless-anonymous" standard_testfile .S
set srcfile ${testfile}.S
set executable ${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
object {nodebug}] != "" } {
return -1 return -1
} }
clean_restart $executable clean_restart $testfile
gdb_test "ptype '(anonymous namespace)::v'" "type = myint" gdb_test "ptype '(anonymous namespace)::v'" "type = myint"
gdb_test "p '(anonymous namespace)::v'" " = 1" gdb_test "p '(anonymous namespace)::v'" " = 1"

View File

@ -19,12 +19,13 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-objfile-overlap" standard_testfile
set srcfile_outer ${testfile}-outer.S set srcfile_outer ${testfile}-outer.S
set srcfile_inner ${testfile}-inner.S set srcfile_inner ${testfile}-inner.S
set executable_outer ${testfile}-outer.x set executable_outer ${testfile}-outer.x
set binfile_outer ${objdir}/${subdir}/${executable_outer} set binfile_outer ${binfile}-outer.x
set binfile_inner ${objdir}/${subdir}/${testfile}-inner.x set binfile_inner ${binfile}-inner.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile_outer}" "${binfile_outer}" \ if { [gdb_compile "${srcdir}/${subdir}/${srcfile_outer}" "${binfile_outer}" \
object {}] != "" object {}] != ""

View File

@ -21,8 +21,10 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-op-call" standard_testfile .S main.c
if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.S main.c] {nodebug}] } {
if { [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $srcfile2] {nodebug}] } {
return -1 return -1
} }

View File

@ -19,15 +19,14 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-op-stack-value" standard_testfile .S
set srcfile ${testfile}.S
set executable ${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
object {nodebug}] != "" } {
return -1 return -1
} }
clean_restart $executable clean_restart $testfile
gdb_test "p/x stack2" " = 0x1" gdb_test "p/x stack2" " = 0x1"
gdb_test "p/x stack8" " = 0x1" gdb_test "p/x stack8" " = 0x1"

View File

@ -19,8 +19,10 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile dw2-param-error standard_testfile .S dw2-param-error-main.c
if { [prepare_for_testing ${testfile}.exp "${testfile}" "${testfile}-main.c ${testfile}.S" {nodebug}] } {
if { [prepare_for_testing ${testfile}.exp "${testfile}" \
[list $srcfile2 $srcfile] {nodebug}] } {
return -1 return -1
} }

View File

@ -19,10 +19,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-producer" standard_testfile .S
set dwarf_srcfile "file1.txt" set dwarf_srcfile "file1.txt"
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
return -1 return -1

View File

@ -32,17 +32,13 @@ if !$gcc_compiled {
return 0 return 0
} }
set testfile "dw2-ranges" standard_testfile dw2-ranges.c dw2-ranges2.c dw2-ranges3.c
set srcfile ${testfile}.c set asmfile [standard_output_file ${testfile}.s]
set srcfile2 ${testfile}2.c set asmfile2 [standard_output_file ${testfile}2.s]
set srcfile3 ${testfile}3.c set asmfile3 [standard_output_file ${testfile}3.s]
set asmfile ${objdir}/${subdir}/${testfile}.s set objfile [standard_output_file ${testfile}.o]
set asmfile2 ${objdir}/${subdir}/${testfile}2.s set objfile2 [standard_output_file ${testfile}2.o]
set asmfile3 ${objdir}/${subdir}/${testfile}3.s set objfile3 [standard_output_file ${testfile}3.o]
set objfile ${objdir}/${subdir}/${testfile}.o
set objfile2 ${objdir}/${subdir}/${testfile}2.o
set objfile3 ${objdir}/${subdir}/${testfile}3.o
set binfile ${objdir}/${subdir}/${testfile}
# Generate .s without debug info but provide debug info by the assembler. # Generate .s without debug info but provide debug info by the assembler.
# This way we get DW_TAG_compile_unit DIE and only that DIE. # This way we get DW_TAG_compile_unit DIE and only that DIE.

View File

@ -19,17 +19,15 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-ref-missing-frame" standard_testfile .S
set srcsfile ${testfile}.S set objsfile [standard_output_file ${testfile}.o]
set objsfile ${objdir}/${subdir}/${testfile}.o
set srcfuncfile ${testfile}-func.c set srcfuncfile ${testfile}-func.c
set objfuncfile ${objdir}/${subdir}/${testfile}-func.o set objfuncfile [standard_output_file ${testfile}-func.o]
set srcmainfile ${testfile}-main.c set srcmainfile ${testfile}-main.c
set objmainfile ${objdir}/${subdir}/${testfile}-main.o set objmainfile [standard_output_file ${testfile}-main.o]
set executable ${testfile} set executable ${testfile}
set binfile ${objdir}/${subdir}/${executable}
if { [gdb_compile "${srcdir}/${subdir}/${srcsfile}" $objsfile object {}] != "" if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $objsfile object {}] != ""
|| [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" $objfuncfile object {}] != "" || [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" $objfuncfile object {}] != ""
|| [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" $objmainfile object {debug}] != "" || [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" $objmainfile object {debug}] != ""
|| [gdb_compile "$objsfile $objfuncfile $objmainfile" $binfile executable {}] != "" } { || [gdb_compile "$objsfile $objfuncfile $objmainfile" $binfile executable {}] != "" } {

View File

@ -19,9 +19,7 @@
if {![istarget x86_64-*] || ![is_lp64_target]} { if {![istarget x86_64-*] || ![is_lp64_target]} {
return 0 return 0
} }
set testfile "dw2-restore" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
[list {additional_flags=-nostdlib}]] != "" } { [list {additional_flags=-nostdlib}]] != "" } {

View File

@ -19,16 +19,13 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-simple-locdesc" standard_testfile .S
set srcfile ${testfile}.S
set executable ${testfile}.x
set binfile ${objdir}/${subdir}/${executable}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
return -1 return -1
} }
clean_restart $executable clean_restart $testfile
# Re: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF # Re: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF
# http://sourceware.org/ml/gdb-patches/2011-07/msg00766.html # http://sourceware.org/ml/gdb-patches/2011-07/msg00766.html

View File

@ -36,9 +36,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-skip-prologue" standard_testfile
set executable ${testfile} set executable ${testfile}
set binfile ${objdir}/${subdir}/${executable}
if {[build_executable ${testfile}.exp ${executable} "${testfile}.c ${testfile}.S" {additional_flags=-DINLINED}] == -1} { if {[build_executable ${testfile}.exp ${executable} "${testfile}.c ${testfile}.S" {additional_flags=-DINLINED}] == -1} {
return -1 return -1

View File

@ -19,10 +19,7 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-stack-boundary" standard_testfile .S
set srcfile ${testfile}.S
set executable ${testfile}.x
set binfile ${objdir}/${subdir}/${executable}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
return -1 return -1

View File

@ -22,9 +22,7 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw2-strp" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
return -1 return -1

View File

@ -19,8 +19,10 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile dw2-var-zero-addr standard_testfile .S main.c
if [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.S main.c] {nodebug}] {
if [prepare_for_testing ${testfile}.exp ${testfile} \
[list $srcfile $srcfile2] {nodebug}] {
return -1 return -1
} }

View File

@ -19,10 +19,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "dw4-sig-type-unused" standard_testfile .S
set srcfile ${testfile}.S set executable ${testfile}
set executable ${testfile}.x
set binfile ${objdir}/${subdir}/${executable}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
return -1 return -1

View File

@ -15,16 +15,15 @@
# Test dwarf4 signatured types. # Test dwarf4 signatured types.
set test "dw4-sig-types" standard_testfile .cc dw4-sig-types-b.cc
set executable ${test}.x
# This test is intended for targets which support DWARF-4. # This test is intended for targets which support DWARF-4.
# Since we pass an explicit -gdwarf-4 to the compiler, we let # Since we pass an explicit -gdwarf-4 to the compiler, we let
# that be the test of whether the target supports it. # that be the test of whether the target supports it.
if { [prepare_for_testing "${test}.exp" "${executable}" \ if { [prepare_for_testing "${test}.exp" "${testfile}" \
{dw4-sig-types.cc dw4-sig-types-b.cc} \ [list $srcfile $srcfile2] \
{debug c++ additional_flags=-gdwarf-4}] } { {debug c++ additional_flags=-gdwarf-4}] } {
return -1 return -1
} }

View File

@ -19,8 +19,7 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "implptr-64bit" standard_testfile .S
set srcfile ${testfile}.S
set mainfile main.c set mainfile main.c
proc test { dwarf_version offset_size addr_size ref_addr_size } { proc test { dwarf_version offset_size addr_size ref_addr_size } {

View File

@ -19,11 +19,9 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "implptr-optimized-out" standard_testfile .S
set srcfile ${testfile}.S
set mainfile main.c set mainfile main.c
set executable ${testfile} set executable ${testfile}
set binfile ${objdir}/${subdir}/${executable}
if [prepare_for_testing ${testfile}.exp $executable "${srcfile} ${mainfile}" {}] { if [prepare_for_testing ${testfile}.exp $executable "${srcfile} ${mainfile}" {}] {
return -1 return -1

View File

@ -21,10 +21,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "implptr" standard_testfile .S
set srcfile ${testfile}.S
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] {
@ -36,7 +34,7 @@ if [info exists COMPILE] {
return 0 return 0
} }
if {[prepare_for_testing ${testfile}.exp ${testfile}.x $srcfile $opts]} { if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts]} {
return -1 return -1
} }

View File

@ -22,10 +22,8 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "mac-fileno" standard_testfile .S
set dwarf_srcfile "file1.txt" set dwarf_srcfile "file1.txt"
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
return -1 return -1

View File

@ -21,11 +21,9 @@ if {![dwarf2_support]} {
if { [skip_cplus_tests] } { continue } if { [skip_cplus_tests] } { continue }
set testfile member-ptr-forwardref standard_testfile .S
set executable ${testfile}
set binfile ${objdir}/${subdir}/${executable}.x
if { [gdb_compile "${srcdir}/${subdir}/${testfile}.S" ${binfile} object {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} object {debug}] != "" } {
untested ${testfile}.exp untested ${testfile}.exp
return -1 return -1
} }

View File

@ -24,12 +24,10 @@ if {![is_x86_like_target]} {
return 0 return 0
} }
set testfile "pieces" standard_testfile .S
set srcfile ${testfile}.S
set csrcfile ${testfile}.c set csrcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}.x
if {[prepare_for_testing ${testfile}.exp ${testfile}.x $srcfile]} { if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile]} {
return -1 return -1
} }

View File

@ -15,8 +15,7 @@
# Test DW_OP_call_frame_cfa. # Test DW_OP_call_frame_cfa.
set testfile "pr10770" standard_testfile
set srcfile ${testfile}.c
if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}]} { if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}]} {
return 0 return 0

View File

@ -19,10 +19,7 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "pr11465" standard_testfile .S
set srcfile "$testfile.S"
set executable "$testfile.x"
set binfile [file join $objdir $subdir $executable]
if [is_ilp32_target] { if [is_ilp32_target] {
set ptrbits 32 set ptrbits 32
@ -35,7 +32,7 @@ if { [gdb_compile [file join $srcdir $subdir $srcfile] \
return -1 return -1
} }
clean_restart $executable clean_restart $testfile
# Test delayed physname computations # Test delayed physname computations
gdb_test "p N::c.C" { = {void \(N::C \* const, void \(\*\)\(N::C\)\)}.*} gdb_test "p N::c.C" { = {void \(N::C \* const, void \(\*\)\(N::C\)\)}.*}

View File

@ -22,11 +22,9 @@ if {![dwarf2_support]} {
return 0 return 0
} }
set testfile "pr13961" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${testfile}.x
if { [prepare_for_testing ${testfile}.exp ${binfile} ${srcfile}] == -1 } { if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
return -1 return -1
} }

View File

@ -25,20 +25,13 @@ if {![is_x86_like_target]} {
return 0 return 0
} }
set testfile "valop" standard_testfile .S
set srcfile ${testfile}.S
set binfile ${objdir}/${subdir}/${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \ if {[prepare_for_testing $testfile.exp $testfile \
[list {additional_flags=-nostdlib}]] != "" } { [list $srcfile] [list {additional_flags=-nostdlib}]]} {
return -1 return -1
} }
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] { if ![runto_main] {
return -1 return -1
} }