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

Side by Side Diff: gdb/testsuite/gdb.cp/nextoverthrow.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
OLDNEW
1 # Copyright 2008-2012 Free Software Foundation, Inc. 1 # Copyright 2008-2012 Free Software Foundation, Inc.
2 2
3 # This program is free software; you can redistribute it and/or modify 3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by 4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or 5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version. 6 # (at your option) any later version.
7 # 7 #
8 # This program is distributed in the hope that it will be useful, 8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details. 11 # GNU General Public License for more details.
12 # 12 #
13 # You should have received a copy of the GNU General Public License 13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. 14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
16 16
17 if $tracelevel then {
18 strace $tracelevel
19 }
20
21 if { [skip_cplus_tests] } { continue } 17 if { [skip_cplus_tests] } { continue }
22 18
23 set testfile "nextoverthrow" 19 standard_testfile .cc
24 set srcfile ${testfile}.cc
25 set binfile $objdir/$subdir/$testfile
26 20
27 # Create and source the file that provides information about the compiler 21 # Create and source the file that provides information about the compiler
28 # used to compile the test case. 22 # used to compile the test case.
29 if [get_compiler_info ${binfile} "c++"] { 23 if [get_compiler_info "c++"] {
30 untested nextoverthrow.exp 24 untested nextoverthrow.exp
31 return -1 25 return -1
32 } 26 }
33 27
34 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { 28 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
35 return -1 29 return -1
36 } 30 }
37 31
38 if ![runto_main] then { 32 if ![runto_main] then {
39 perror "couldn't run to main" 33 perror "couldn't run to main"
(...skipping 11 matching lines...) Expand all
51 -re "= .*_Unwind_DebugHook.*\r\n$gdb_prompt $" { 45 -re "= .*_Unwind_DebugHook.*\r\n$gdb_prompt $" {
52 pass "check for unwinder hook" 46 pass "check for unwinder hook"
53 } 47 }
54 -re "No symbol .* in current context.\r\n$gdb_prompt $" { 48 -re "No symbol .* in current context.\r\n$gdb_prompt $" {
55 # Pass the test so we don't get bogus fails in the results. 49 # Pass the test so we don't get bogus fails in the results.
56 pass "check for unwinder hook" 50 pass "check for unwinder hook"
57 set ok 0 51 set ok 0
58 } 52 }
59 } 53 }
60 if {!$ok} { 54 if {!$ok} {
55 gdb_test_multiple "info probe" "check for stap probe in unwinder" {
56 -re ".*libgcc.*unwind.*\r\n$gdb_prompt $" {
57 pass "check for stap probe in unwinder"
58 set ok 1
59 }
60 -re "\r\n$gdb_prompt $" {
61 }
62 }
63 }
64
65 if {!$ok} {
61 unsupported "nextoverthrow.exp could not find _Unwind_DebugHook" 66 unsupported "nextoverthrow.exp could not find _Unwind_DebugHook"
62 return -1 67 return -1
63 } 68 }
64 69
65 # Set a temporary breakpoint and then continue to it. 70 # Set a temporary breakpoint and then continue to it.
66 # The breakpoint is set according to a marker in the file. 71 # The breakpoint is set according to a marker in the file.
67 proc tbreak_and_cont {text} { 72 proc tbreak_and_cont {text} {
68 global testfile 73 global testfile
69 74
70 set line [gdb_get_line_number $text $testfile.cc] 75 set line [gdb_get_line_number $text $testfile.cc]
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 gdb_test "tbreak _Unwind_RaiseException" 163 gdb_test "tbreak _Unwind_RaiseException"
159 gdb_test "continue" "Temporary breakpoint.*" "continuing to _Unwind_RaiseExcepti on" 164 gdb_test "continue" "Temporary breakpoint.*" "continuing to _Unwind_RaiseExcepti on"
160 gdb_test "finish" "Run till exit .*" 165 gdb_test "finish" "Run till exit .*"
161 gdb_test {set $retpc=$pc} 166 gdb_test {set $retpc=$pc}
162 gdb_test {break *$retpc if dummy ()} 167 gdb_test {break *$retpc if dummy ()}
163 tbreak_and_cont "Second: resumebpt" 168 tbreak_and_cont "Second: resumebpt"
164 gdb_test "next" 169 gdb_test "next"
165 170
166 tbreak_and_cont "done" 171 tbreak_and_cont "done"
167 verify_testval "post-check - advance" 10 172 verify_testval "post-check - advance" 10
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.cp/namespace-nested-import.exp ('k') | gdb/testsuite/gdb.cp/no-dmgl-verbose.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698