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

Side by Side Diff: gdb/testsuite/gdb.base/call-signal-resume.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.base/call-sc.exp ('k') | gdb/testsuite/gdb.base/call-signals.c » ('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 2008, 2010-2012 Free Software Foundation, Inc. 1 # Copyright 2008, 2010-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 # Test inferior resumption after discarding a hand-called function. 16 # Test inferior resumption after discarding a hand-called function.
17 # There are two things to test. 17 # There are two things to test.
18 # 1) Inferior stops normally. Upon resumption it should continue normally, 18 # 1) Inferior stops normally. Upon resumption it should continue normally,
19 # regardless of whatever signal the hand-called function got. 19 # regardless of whatever signal the hand-called function got.
20 # 2) Inferior is stopped at a signal. Upon resumption it should continue 20 # 2) Inferior is stopped at a signal. Upon resumption it should continue
21 # with that signal, regardless of whatever the hand-called function did. 21 # with that signal, regardless of whatever the hand-called function did.
22 22
23 if $tracelevel then {
24 strace $tracelevel
25 }
26
27 if [target_info exists gdb,noinferiorio] { 23 if [target_info exists gdb,noinferiorio] {
28 verbose "Skipping call-signal-resume.exp because of no fileio capabilities." 24 verbose "Skipping call-signal-resume.exp because of no fileio capabilities."
29 continue 25 continue
30 } 26 }
31 27
32 if [target_info exists gdb,nosignals] { 28 if [target_info exists gdb,nosignals] {
33 verbose "Skipping call-signal-resume.exp because of nosignals." 29 verbose "Skipping call-signal-resume.exp because of nosignals."
34 continue 30 continue
35 } 31 }
36 32
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 if { "$frame_number" == "" } { 92 if { "$frame_number" == "" } {
97 fail "dummy stack frame number" 93 fail "dummy stack frame number"
98 setup_xfail "*-*-*" 94 setup_xfail "*-*-*"
99 } else { 95 } else {
100 pass "dummy stack frame number" 96 pass "dummy stack frame number"
101 } 97 }
102 98
103 # Pop the dummy frame. 99 # Pop the dummy frame.
104 gdb_test "frame $frame_number" ".*" 100 gdb_test "frame $frame_number" ".*"
105 gdb_test_no_output "set confirm off" 101 gdb_test_no_output "set confirm off"
106 gdb_test_no_output "return" 102 gdb_test "return" ""
103
104 # Verify there are no remains of the dummy frame.
105 gdb_test_no_output "maintenance print dummy-frames"
106 set test "maintenance info breakpoints"
107 gdb_test_multiple $test $test {
108 -re " call dummy .*\r\n$gdb_prompt $" {
109 » fail $test
110 }
111 -re "\r\n$gdb_prompt $" {
112 » pass $test
113 }
114 }
107 115
108 # Resume execution, the program should continue without any signal. 116 # Resume execution, the program should continue without any signal.
109 117
110 gdb_test "break stop_two" "Breakpoint \[0-9\]* at .*" 118 gdb_test "break stop_two" "Breakpoint \[0-9\]* at .*"
111 gdb_test "continue" "Breakpoint \[0-9\]*, stop_two.*" \ 119 gdb_test "continue" "Breakpoint \[0-9\]*, stop_two.*" \
112 "continue to breakpoint at stop_two" 120 "continue to breakpoint at stop_two"
113 121
114 # Continue again, we should get a signal. 122 # Continue again, we should get a signal.
115 123
116 gdb_test "continue" "Program received signal .*" \ 124 gdb_test "continue" "Program received signal .*" \
(...skipping 12 matching lines...) Expand all
129 setup_xfail "*-*-*" 137 setup_xfail "*-*-*"
130 # Need something. 138 # Need something.
131 set frame_number 0 139 set frame_number 0
132 } else { 140 } else {
133 pass "dummy stack frame number" 141 pass "dummy stack frame number"
134 } 142 }
135 143
136 # Pop the dummy frame. 144 # Pop the dummy frame.
137 gdb_test "frame $frame_number" ".*" 145 gdb_test "frame $frame_number" ".*"
138 gdb_test_no_output "set confirm off" 146 gdb_test_no_output "set confirm off"
139 gdb_test_no_output "return" 147 gdb_test "return" ""
140 148
141 # Continue again, this time we should get to the signal handler. 149 # Continue again, this time we should get to the signal handler.
142 150
143 gdb_test "break handle_signal" "Breakpoint \[0-9\]* at .*" 151 gdb_test "break handle_signal" "Breakpoint \[0-9\]* at .*"
144 gdb_test "continue" "Breakpoint \[0-9\]*, handle_signal.*" \ 152 gdb_test "continue" "Breakpoint \[0-9\]*, handle_signal.*" \
145 "continue to breakpoint at handle_signal" 153 "continue to breakpoint at handle_signal"
146 154
147 # Continue one last time, the program should exit normally. 155 # Continue one last time, the program should exit normally.
148 156
149 gdb_test "continue" "$inferior_exited_re normally." \ 157 gdb_test "continue" "$inferior_exited_re normally." \
150 "continue to program exit" 158 "continue to program exit"
151 159
152 return 0 160 return 0
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.base/call-sc.exp ('k') | gdb/testsuite/gdb.base/call-signals.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698