| OLD | NEW |
| 1 # Copyright 2008, 2010-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 12 matching lines...) Expand all Loading... |
| 24 verbose "Skipping call-signal-resume.exp because of no fileio capabilities." | 24 verbose "Skipping call-signal-resume.exp because of no fileio capabilities." |
| 25 continue | 25 continue |
| 26 } | 26 } |
| 27 | 27 |
| 28 if [target_info exists gdb,nosignals] { | 28 if [target_info exists gdb,nosignals] { |
| 29 verbose "Skipping call-signal-resume.exp because of nosignals." | 29 verbose "Skipping call-signal-resume.exp because of nosignals." |
| 30 continue | 30 continue |
| 31 } | 31 } |
| 32 | 32 |
| 33 | 33 |
| 34 set testfile "call-signals" | 34 standard_testfile call-signals.c |
| 35 set srcfile ${testfile}.c | |
| 36 set binfile ${objdir}/${subdir}/${testfile} | |
| 37 | 35 |
| 38 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 36 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
| 39 untested call-signal-resume.exp | 37 untested call-signal-resume.exp |
| 40 return -1 | 38 return -1 |
| 41 } | 39 } |
| 42 | 40 |
| 43 # Some targets can't do function calls, so don't even bother with this | 41 # Some targets can't do function calls, so don't even bother with this |
| 44 # test. | 42 # test. |
| 45 if [target_info exists gdb,cannot_call_functions] { | 43 if [target_info exists gdb,cannot_call_functions] { |
| 46 setup_xfail "*-*-*" 2416 | 44 setup_xfail "*-*-*" 2416 |
| 47 fail "This target can not call functions" | 45 fail "This target can not call functions" |
| 48 continue | 46 continue |
| 49 } | 47 } |
| 50 | 48 |
| 51 proc get_dummy_frame_number { } { | 49 proc get_dummy_frame_number { } { |
| 52 global gdb_prompt | 50 global gdb_prompt |
| 53 | 51 |
| 54 gdb_test_multiple "bt" "backtrace" { | 52 gdb_test_multiple "bt" "backtrace" { |
| 55 -re "#(\[0-9\]*) *<function called from gdb>.*$gdb_prompt $" { | 53 -re "#(\[0-9\]*) *<function called from gdb>.*$gdb_prompt $" { |
| 56 return $expect_out(1,string) | 54 return $expect_out(1,string) |
| 57 } | 55 } |
| 58 } | 56 } |
| 59 return "" | 57 return "" |
| 60 } | 58 } |
| 61 | 59 |
| 62 # Start with a fresh gdb. | 60 # Start with a fresh gdb. |
| 63 | 61 |
| 64 gdb_exit | 62 clean_restart ${binfile} |
| 65 gdb_start | |
| 66 gdb_reinitialize_dir $srcdir/$subdir | |
| 67 gdb_load ${binfile} | |
| 68 | 63 |
| 69 if { ![runto_main] } { | 64 if { ![runto_main] } { |
| 70 fail "Can't run to main" | 65 fail "Can't run to main" |
| 71 return 0 | 66 return 0 |
| 72 } | 67 } |
| 73 | 68 |
| 74 gdb_test "break stop_one" "Breakpoint \[0-9\]* at .*" | 69 gdb_test "break stop_one" "Breakpoint \[0-9\]* at .*" |
| 75 gdb_test "continue" "Continuing.*Breakpoint \[0-9\]*, stop_one.*" \ | 70 gdb_test "continue" "Continuing.*Breakpoint \[0-9\]*, stop_one.*" \ |
| 76 "continue to breakpoint at stop_one" | 71 "continue to breakpoint at stop_one" |
| 77 | 72 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 gdb_test "break handle_signal" "Breakpoint \[0-9\]* at .*" | 146 gdb_test "break handle_signal" "Breakpoint \[0-9\]* at .*" |
| 152 gdb_test "continue" "Breakpoint \[0-9\]*, handle_signal.*" \ | 147 gdb_test "continue" "Breakpoint \[0-9\]*, handle_signal.*" \ |
| 153 "continue to breakpoint at handle_signal" | 148 "continue to breakpoint at handle_signal" |
| 154 | 149 |
| 155 # Continue one last time, the program should exit normally. | 150 # Continue one last time, the program should exit normally. |
| 156 | 151 |
| 157 gdb_test "continue" "$inferior_exited_re normally." \ | 152 gdb_test "continue" "$inferior_exited_re normally." \ |
| 158 "continue to program exit" | 153 "continue to program exit" |
| 159 | 154 |
| 160 return 0 | 155 return 0 |
| OLD | NEW |