| OLD | NEW |
| 1 # Copyright 2004, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 2004, 2007-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 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 # output. Note that a frame's "info frame" can only be captured after | 22 # output. Note that a frame's "info frame" can only be captured after |
| 23 # it is non-current (made a call, interrupted, ...), this is because | 23 # it is non-current (made a call, interrupted, ...), this is because |
| 24 # instructions executed to perform the call may affect "info frame" | 24 # instructions executed to perform the call may affect "info frame" |
| 25 # output. | 25 # output. |
| 26 | 26 |
| 27 if [target_info exists gdb,nosignals] { | 27 if [target_info exists gdb,nosignals] { |
| 28 verbose "Skipping savedregs.exp because of nosignals." | 28 verbose "Skipping savedregs.exp because of nosignals." |
| 29 continue | 29 continue |
| 30 } | 30 } |
| 31 | 31 |
| 32 if $tracelevel then { | |
| 33 strace $tracelevel | |
| 34 } | |
| 35 | |
| 36 | 32 |
| 37 set testfile savedregs | 33 set testfile savedregs |
| 38 set srcfile ${testfile}.c | 34 set srcfile ${testfile}.c |
| 39 set binfile ${objdir}/${subdir}/${testfile} | 35 set binfile ${objdir}/${subdir}/${testfile} |
| 40 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 36 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
| 41 untested "Couldn't compile ${module}.c" | 37 untested "Couldn't compile ${module}.c" |
| 42 return -1 | 38 return -1 |
| 43 } | 39 } |
| 44 | 40 |
| 45 # get things started | 41 # get things started |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 145 |
| 150 # Breakpoint at and call the caller function, saved-regs of main and | 146 # Breakpoint at and call the caller function, saved-regs of main and |
| 151 # catcher, capture caller's registers. | 147 # catcher, capture caller's registers. |
| 152 gdb_test "break caller" | 148 gdb_test "break caller" |
| 153 gdb_test "call caller (1,2,3,4,5,6,7,8)" | 149 gdb_test "call caller (1,2,3,4,5,6,7,8)" |
| 154 process_saved_regs caller { dummy catcher } { sigtramp thrower main } | 150 process_saved_regs caller { dummy catcher } { sigtramp thrower main } |
| 155 | 151 |
| 156 # Run to callee, again check everything. | 152 # Run to callee, again check everything. |
| 157 gdb_test "advance callee" "callee .* at .*" | 153 gdb_test "advance callee" "callee .* at .*" |
| 158 process_saved_regs callee { caller } { dummy catcher sigtramp thrower main } | 154 process_saved_regs callee { caller } { dummy catcher sigtramp thrower main } |
| OLD | NEW |