OLD | NEW |
1 # Copyright 2008-2012 Free Software Foundation, Inc. | 1 # Copyright 2008-2013 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. |
(...skipping 15 matching lines...) Expand all Loading... |
27 | 27 |
28 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { | 28 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { |
29 return -1 | 29 return -1 |
30 } | 30 } |
31 | 31 |
32 if ![runto_main] then { | 32 if ![runto_main] then { |
33 perror "couldn't run to main" | 33 perror "couldn't run to main" |
34 continue | 34 continue |
35 } | 35 } |
36 | 36 |
37 # See whether we have the needed unwinder hooks. | 37 if {![skip_unwinder_tests]} { |
38 set ok 1 | |
39 gdb_test_multiple "print _Unwind_DebugHook" "check for unwinder hook" { | |
40 -re "= .*no debug info.*_Unwind_DebugHook.*\r\n$gdb_prompt $" { | |
41 » # Pass the test so we don't get bogus fails in the results. | |
42 » pass "check for unwinder hook" | |
43 » set ok 0 | |
44 } | |
45 -re "= .*_Unwind_DebugHook.*\r\n$gdb_prompt $" { | |
46 » pass "check for unwinder hook" | |
47 } | |
48 -re "No symbol .* in current context.\r\n$gdb_prompt $" { | |
49 » # Pass the test so we don't get bogus fails in the results. | |
50 » pass "check for unwinder hook" | |
51 » set ok 0 | |
52 } | |
53 } | |
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} { | |
66 unsupported "nextoverthrow.exp could not find _Unwind_DebugHook" | 38 unsupported "nextoverthrow.exp could not find _Unwind_DebugHook" |
67 return -1 | 39 return -1 |
68 } | 40 } |
69 | 41 |
70 # Set a temporary breakpoint and then continue to it. | 42 # Set a temporary breakpoint and then continue to it. |
71 # The breakpoint is set according to a marker in the file. | 43 # The breakpoint is set according to a marker in the file. |
72 proc tbreak_and_cont {text} { | 44 proc tbreak_and_cont {text} { |
73 global testfile | 45 global testfile |
74 | 46 |
75 set line [gdb_get_line_number $text $testfile.cc] | 47 set line [gdb_get_line_number $text $testfile.cc] |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 gdb_test "tbreak _Unwind_RaiseException" | 135 gdb_test "tbreak _Unwind_RaiseException" |
164 gdb_test "continue" "Temporary breakpoint.*" "continuing to _Unwind_RaiseExcepti
on" | 136 gdb_test "continue" "Temporary breakpoint.*" "continuing to _Unwind_RaiseExcepti
on" |
165 gdb_test "finish" "Run till exit .*" | 137 gdb_test "finish" "Run till exit .*" |
166 gdb_test {set $retpc=$pc} | 138 gdb_test {set $retpc=$pc} |
167 gdb_test {break *$retpc if dummy ()} | 139 gdb_test {break *$retpc if dummy ()} |
168 tbreak_and_cont "Second: resumebpt" | 140 tbreak_and_cont "Second: resumebpt" |
169 gdb_test "next" | 141 gdb_test "next" |
170 | 142 |
171 tbreak_and_cont "done" | 143 tbreak_and_cont "done" |
172 verify_testval "post-check - advance" 10 | 144 verify_testval "post-check - advance" 10 |
OLD | NEW |