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

Side by Side Diff: gdb/testsuite/gdb.threads/thread-unwindonsignal.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 (C) 2008, 2010-2012 Free Software Foundation, Inc. 1 # Copyright (C) 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 use of unwindonsignal when a hand function call that gets interrupted 16 # Test use of unwindonsignal when a hand function call that gets interrupted
17 # by a signal in another thread. 17 # by a signal in another thread.
18 18
19 set NR_THREADS 4 19 set NR_THREADS 4
20 20
21 if $tracelevel then { 21 standard_testfile interrupted-hand-call.c
22 » strace $tracelevel
23 }
24 22
25 set testfile "interrupted-hand-call" 23 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab le [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
26 set srcfile ${testfile}.c
27 set binfile ${objdir}/${subdir}/${testfile}
28
29 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab le [list debug "incdir=${objdir}" "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
30 return -1 24 return -1
31 } 25 }
32 26
33 # Some targets can't do function calls, so don't even bother with this 27 # Some targets can't do function calls, so don't even bother with this
34 # test. 28 # test.
35 if [target_info exists gdb,cannot_call_functions] { 29 if [target_info exists gdb,cannot_call_functions] {
36 setup_xfail "*-*-*" 2416 30 setup_xfail "*-*-*" 2416
37 fail "This target can not call functions" 31 fail "This target can not call functions"
38 continue 32 continue
39 } 33 }
40 34
41 gdb_exit 35 clean_restart ${binfile}
42 gdb_start
43 gdb_reinitialize_dir $srcdir/$subdir
44 gdb_load ${binfile}
45 36
46 if { ![runto_main] } { 37 if { ![runto_main] } {
47 fail "Can't run to main" 38 fail "Can't run to main"
48 return 0 39 return 0
49 } 40 }
50 41
51 gdb_test "break all_threads_running" \ 42 gdb_test "break all_threads_running" \
52 "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ 43 "Breakpoint 2 at .*: file .*${srcfile}, line .*" \
53 "breakpoint on all_threads_running" 44 "breakpoint on all_threads_running"
54 45
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 -re ".*$gdb_prompt $" { 97 -re ".*$gdb_prompt $" {
107 pass "dummy frame popped" 98 pass "dummy frame popped"
108 } 99 }
109 } 100 }
110 101
111 # Continue one last time, the program should exit normally. 102 # Continue one last time, the program should exit normally.
112 103
113 gdb_continue_to_end "" continue 1 104 gdb_continue_to_end "" continue 1
114 105
115 return 0 106 return 0
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.threads/thread-specific.exp ('k') | gdb/testsuite/gdb.threads/thread_check.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698