| Index: gdb/testsuite/gdb.cp/rtti.exp
|
| diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp
|
| index 35e37b0d37693b952e50888702be8ab0483fe258..e5a8d3b3253fb0873b500e83ed092d52024fee16 100644
|
| --- a/gdb/testsuite/gdb.cp/rtti.exp
|
| +++ b/gdb/testsuite/gdb.cp/rtti.exp
|
| @@ -26,48 +26,23 @@
|
| # (involving templates, in particular) where this problem triggers
|
| # because GDB and GCC have different ideas what a class is called.
|
|
|
| -if $tracelevel then {
|
| - strace $tracelevel
|
| - }
|
| -
|
| if { [skip_cplus_tests] } { continue }
|
|
|
| #
|
| # test running programs
|
| #
|
|
|
| -set testfile "rtti"
|
| -set srcfile1 "${testfile}1.cc"
|
| -set objfile1 "${testfile}1.o"
|
| -set srcfile2 "${testfile}2.cc"
|
| -set objfile2 "${testfile}2.o"
|
| -set binfile "${objdir}/${subdir}/${testfile}"
|
| -
|
| -if { [gdb_compile "$srcdir/$subdir/$srcfile1" "$objdir/$subdir/$objfile1" object {debug c++}] != "" } {
|
| - untested rtti.exp
|
| - return -1
|
| -}
|
| -
|
| -if { [gdb_compile "$srcdir/$subdir/$srcfile2" "$objdir/$subdir/$objfile2" object {debug c++}] != "" } {
|
| - untested rtti.exp
|
| - return -1
|
| -}
|
| +standard_testfile rtti1.cc rtti2.cc
|
|
|
| -if { [gdb_compile "$objdir/$subdir/$objfile1 $objdir/$subdir/$objfile2" "${binfile}" executable {debug c++}] != "" } {
|
| - untested rtti.exp
|
| - return -1
|
| +if [get_compiler_info "c++"] {
|
| + return -1
|
| }
|
|
|
| -if [get_compiler_info ${binfile} "c++"] {
|
| +if {[prepare_for_testing $testfile.exp $testfile \
|
| + [list $srcfile $srcfile2] {debug c++}]} {
|
| return -1
|
| }
|
|
|
| -gdb_exit
|
| -gdb_start
|
| -gdb_reinitialize_dir $srcdir/$subdir
|
| -gdb_load ${binfile}
|
| -
|
| -
|
| if ![runto_main] then {
|
| perror "couldn't run to breakpoint"
|
| continue
|
| @@ -75,7 +50,7 @@ if ![runto_main] then {
|
|
|
| # First, run to after we've constructed the object:
|
|
|
| -gdb_breakpoint [gdb_get_line_number "main-constructs-done" "$srcfile1"]
|
| +gdb_breakpoint [gdb_get_line_number "main-constructs-done" "$srcfile"]
|
| gdb_continue_to_breakpoint "end of constructors in main"
|
|
|
| gdb_test_multiple "print *e1" "print *e1" {
|
| @@ -131,12 +106,12 @@ gdb_test_multiple "print *e2" "print *e2" {
|
| # Now we test the hack that's been implemented to get around some
|
| # instances of PR gdb/1511.
|
|
|
| -gdb_breakpoint [gdb_get_line_number "func-constructs-done" "$srcfile1"]
|
| +gdb_breakpoint [gdb_get_line_number "func-constructs-done" "$srcfile"]
|
| gdb_continue_to_breakpoint "end of constructors in func"
|
|
|
| gdb_test "print *obj" "\\$\[0-9\]* = {<n2::Base2> = .*}"
|
|
|
| -gdb_breakpoint [gdb_get_line_number "func3-constructs-done" "$srcfile1"]
|
| +gdb_breakpoint [gdb_get_line_number "func3-constructs-done" "$srcfile"]
|
| gdb_continue_to_breakpoint "end of constructors in func3"
|
|
|
| gdb_test "print *obj3" "\\$\[0-9\]* = {<n2::C2> = .*}"
|
|
|