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

Side by Side Diff: gdb/testsuite/gdb.threads/interrupted-hand-call.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.threads/ia64-sigill.exp ('k') | gdb/testsuite/gdb.threads/killed.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 (C) 2004, 2007-2008, 2010-2012 Free Software Foundation, 1 # Copyright (C) 2004, 2007-2008, 2010-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 # Test recovering from a hand function call that gets interrupted 17 # Test recovering from a hand function call that gets interrupted
18 # by a signal in another thread. 18 # by a signal in another thread.
19 19
20 set NR_THREADS 4 20 set NR_THREADS 4
21 21
22 if $tracelevel then { 22 standard_testfile
23 » strace $tracelevel
24 }
25 23
26 set testfile "interrupted-hand-call" 24 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab le [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
27 set srcfile ${testfile}.c
28 set binfile ${objdir}/${subdir}/${testfile}
29
30 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab le [list debug "incdir=${objdir}" "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
31 return -1 25 return -1
32 } 26 }
33 27
34 # Some targets can't do function calls, so don't even bother with this 28 # Some targets can't do function calls, so don't even bother with this
35 # test. 29 # test.
36 if [target_info exists gdb,cannot_call_functions] { 30 if [target_info exists gdb,cannot_call_functions] {
37 setup_xfail "*-*-*" 2416 31 setup_xfail "*-*-*" 2416
38 fail "This target can not call functions" 32 fail "This target can not call functions"
39 continue 33 continue
40 } 34 }
41 35
42 gdb_exit 36 clean_restart ${binfile}
43 gdb_start
44 gdb_reinitialize_dir $srcdir/$subdir
45 gdb_load ${binfile}
46 37
47 if { ![runto_main] } { 38 if { ![runto_main] } {
48 fail "Can't run to main" 39 fail "Can't run to main"
49 return 0 40 return 0
50 } 41 }
51 42
52 gdb_test "break all_threads_running" \ 43 gdb_test "break all_threads_running" \
53 "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ 44 "Breakpoint 2 at .*: file .*${srcfile}, line .*" \
54 "breakpoint on all_threads_running" 45 "breakpoint on all_threads_running"
55 46
(...skipping 27 matching lines...) Expand all
83 -re ".*$gdb_prompt $" { 74 -re ".*$gdb_prompt $" {
84 pass "dummy frame popped" 75 pass "dummy frame popped"
85 } 76 }
86 } 77 }
87 78
88 # Continue one last time, the program should exit normally. 79 # Continue one last time, the program should exit normally.
89 80
90 gdb_continue_to_end "" continue 1 81 gdb_continue_to_end "" continue 1
91 82
92 return 0 83 return 0
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.threads/ia64-sigill.exp ('k') | gdb/testsuite/gdb.threads/killed.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698