Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: gdb/testsuite/gdb.cp/rtti.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.cp/ref-types.exp ('k') | gdb/testsuite/gdb.cp/shadow.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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> = .*}"
« no previous file with comments | « gdb/testsuite/gdb.cp/ref-types.exp ('k') | gdb/testsuite/gdb.cp/shadow.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698