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

Side by Side Diff: gdb/testsuite/gdb.cp/ctti.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 unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.cp/cplusfuncs.exp ('k') | gdb/testsuite/gdb.cp/demangle.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 1998-1999, 2001, 2003-2004, 2007-2012 Free Software 1 # Copyright 1998-1999, 2001, 2003-2004, 2007-2012 Free Software
2 # Foundation, Inc. 2 # Foundation, Inc.
3 3
4 # This program is free software; you can redistribute it and/or modify 4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by 5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or 6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version. 7 # (at your option) any later version.
8 # 8 #
9 # This program is distributed in the hope that it will be useful, 9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details. 12 # GNU General Public License for more details.
13 # 13 #
14 # You should have received a copy of the GNU General Public License 14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
17 # This file is part of the gdb testsuite 17 # This file is part of the gdb testsuite
18 # file written by Elena Zannoni (ezannoni@cygnus.com) 18 # file written by Elena Zannoni (ezannoni@cygnus.com)
19 # rewritten by Michael Chastain (mec.gnu@mindspring.com) 19 # rewritten by Michael Chastain (mec.gnu@mindspring.com)
20 # 20 #
21 # source files cttiadd.cc, cttiadd1.cc, cttiadd2.cc, cttiadd3.cc 21 # source files cttiadd.cc, cttiadd1.cc, cttiadd2.cc, cttiadd3.cc
22 22
23 # Call to template instantiations. 23 # Call to template instantiations.
24 24
25 if $tracelevel then {
26 strace $tracelevel
27 }
28
29 if { [skip_cplus_tests] } { continue } 25 if { [skip_cplus_tests] } { continue }
30 26
31 set testfile "cttiadd" 27 standard_testfile cttiadd.cc cttiadd1.cc cttiadd2.cc cttiadd3.cc
32 set srcfile "${testfile}.cc"
33 set srcfile1 "${testfile}1.cc"
34 set srcfile2 "${testfile}2.cc"
35 set srcfile3 "${testfile}3.cc"
36 set objfile "${testfile}.o"
37 set objfile1 "${testfile}1.o"
38 set objfile2 "${testfile}2.o"
39 set objfile3 "${testfile}3.o"
40 set binfile "${objdir}/${subdir}/${testfile}"
41 28
42 if { [gdb_compile "$srcdir/$subdir/$srcfile" "$objdir/$subdir/$objfile" object { debug c++}] != "" } { 29 if [get_compiler_info "c++"] {
43 untested ctti.exp
44 return -1
45 }
46
47 if { [gdb_compile "$srcdir/$subdir/$srcfile1" "$objdir/$subdir/$objfile1" object {debug c++}] != "" } {
48 untested ctti.exp
49 return -1
50 }
51
52 if { [gdb_compile "$srcdir/$subdir/$srcfile2" "$objdir/$subdir/$objfile2" object {debug c++}] != "" } {
53 untested ctti.exp
54 return -1
55 }
56
57 if { [gdb_compile "$srcdir/$subdir/$srcfile3" "$objdir/$subdir/$objfile3" object {debug c++}] != "" } {
58 untested ctti.exp
59 return -1
60 }
61
62 if { [gdb_compile "$objdir/$subdir/$objfile $objdir/$subdir/$objfile1 $objdir/$s ubdir/$objfile2 $objdir/$subdir/$objfile3" "${binfile}" executable {debug c++}] != "" } {
63 untested ctti.exp
64 return -1
65 }
66
67 if [get_compiler_info ${binfile} "c++"] {
68 return -1; 30 return -1;
69 } 31 }
70 32
71 gdb_exit 33 if {[prepare_for_testing $testfile.exp $testfile \
72 gdb_start 34 » [list $srcfile $srcfile2 $srcfile3 $srcfile4] {debug c++}]} {
73 gdb_reinitialize_dir $srcdir/$subdir 35 return -1
74 gdb_load ${binfile} 36 }
75 37
76 if ![runto_main] then { 38 if ![runto_main] then {
77 perror "couldn't run to breakpoint" 39 perror "couldn't run to breakpoint"
78 continue 40 continue
79 } 41 }
80 42
81 gdb_breakpoint [gdb_get_line_number "marker add1"] 43 gdb_breakpoint [gdb_get_line_number "marker add1"]
82 gdb_continue_to_breakpoint "marker add1" 44 gdb_continue_to_breakpoint "marker add1"
83 45
84 gdb_test "print c" "\\$\[0-9\]+ = 194 .*" 46 gdb_test "print c" "\\$\[0-9\]+ = 194 .*"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 165
204 gdb_test_multiple "print add4<unsigned char>('A','A')" "print add4<unsigned char >('A','A')" { 166 gdb_test_multiple "print add4<unsigned char>('A','A')" "print add4<unsigned char >('A','A')" {
205 -re "\\$\[0-9]+ = 130 .*$gdb_prompt $" { 167 -re "\\$\[0-9]+ = 130 .*$gdb_prompt $" {
206 pass "print add4<unsigned char>('A','A')" 168 pass "print add4<unsigned char>('A','A')"
207 } 169 }
208 -re "No symbol \"add4<unsigned char>\" in current context.\r\n$gdb_prompt $" { 170 -re "No symbol \"add4<unsigned char>\" in current context.\r\n$gdb_prompt $" {
209 # TODO: kfail or xfail this 171 # TODO: kfail or xfail this
210 fail "print add4<unsigned char>('A','A')" 172 fail "print add4<unsigned char>('A','A')"
211 } 173 }
212 } 174 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.cp/cplusfuncs.exp ('k') | gdb/testsuite/gdb.cp/demangle.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698