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

Side by Side Diff: gdb/testsuite/gdb.cp/ambiguous.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/abstract-origin.exp ('k') | gdb/testsuite/gdb.cp/annota2.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, 2003-2004, 2007-2012 Free Software Foundation, 1 # Copyright 1998-1999, 2003-2004, 2007-2012 Free Software Foundation,
2 # Inc. 2 # 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 18
19 # tests relating to ambiguous class members 19 # tests relating to ambiguous class members
20 # Written by Satish Pai <pai@apollo.hp.com> 1997-07-28 20 # Written by Satish Pai <pai@apollo.hp.com> 1997-07-28
21 21
22 # This file is part of the gdb testsuite 22 # This file is part of the gdb testsuite
23 23
24 if $tracelevel then {
25 strace $tracelevel
26 }
27
28 # 24 #
29 # test running programs 25 # test running programs
30 # 26 #
31 27
32 28
33 if { [skip_cplus_tests] } { continue } 29 if { [skip_cplus_tests] } { continue }
34 30
35 set testfile "ambiguous" 31 standard_testfile .cc
36 set srcfile ${testfile}.cc
37 set binfile ${objdir}/${subdir}/${testfile}
38 32
39 if [get_compiler_info ${binfile} "c++"] { 33 if [get_compiler_info "c++"] {
40 return -1; 34 return -1;
41 } 35 }
42 36
43 if { [test_compiler_info gcc-*] } then { continue } 37 if { [test_compiler_info gcc-*] } then { continue }
44 38
45 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb ug c++}] != "" } { 39 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
46 untested ambiguous.exp 40 return -1
47 return -1
48 } 41 }
49 42
50
51 gdb_exit
52 gdb_start
53 gdb_reinitialize_dir $srcdir/$subdir
54 gdb_load ${binfile}
55
56
57 # 43 #
58 # set it up at a breakpoint so we can play with the variable values 44 # set it up at a breakpoint so we can play with the variable values
59 # 45 #
60 if ![runto_main] then { 46 if ![runto_main] then {
61 perror "couldn't run to breakpoint" 47 perror "couldn't run to breakpoint"
62 continue 48 continue
63 } 49 }
64 50
65 send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $" 51 send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
66 send_gdb "cont\n" 52 send_gdb "cont\n"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 gdb_expect { 210 gdb_expect {
225 -re "warning: A1 ambiguous.*Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" { 211 -re "warning: A1 ambiguous.*Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
226 fail "print (A1)jva1v (ambiguity reported)" 212 fail "print (A1)jva1v (ambiguity reported)"
227 } 213 }
228 -re "\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" { pass "print (A1)jva1v" 214 -re "\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" { pass "print (A1)jva1v"
229 } 215 }
230 -re ".*$gdb_prompt $" { fail "print (A1)jva1v (??)" } 216 -re ".*$gdb_prompt $" { fail "print (A1)jva1v (??)" }
231 timeout { fail "(timeout) print (A1)jva1v" } 217 timeout { fail "(timeout) print (A1)jva1v" }
232 } 218 }
233 219
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.cp/abstract-origin.exp ('k') | gdb/testsuite/gdb.cp/annota2.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698