| OLD | NEW |
| 1 # Copyright 1992-2000, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1992-2000, 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 |
| 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 # This file was written by Fred Fish. (fnf@cygnus.com) | 16 # This file was written by Fred Fish. (fnf@cygnus.com) |
| 17 | 17 |
| 18 if $tracelevel then { | |
| 19 strace $tracelevel | |
| 20 } | |
| 21 | |
| 22 | 18 |
| 23 # are we on a target board | 19 # are we on a target board |
| 24 if ![isnative] then { | 20 if ![isnative] then { |
| 25 return | 21 return |
| 26 } | 22 } |
| 27 | 23 |
| 28 set testfile "coremaker" | 24 set testfile "coremaker" |
| 29 set srcfile ${testfile}.c | 25 set srcfile ${testfile}.c |
| 30 set binfile ${objdir}/${subdir}/${testfile} | 26 set binfile ${objdir}/${subdir}/${testfile} |
| 31 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 27 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
| 32 untested corefile.exp | 28 untested corefile.exp |
| 33 return -1 | 29 return -1 |
| 34 } | 30 } |
| 35 | 31 |
| 36 # Create and source the file that provides information about the compiler | 32 # Create and source the file that provides information about the compiler |
| 37 # used to compile the test case. | 33 # used to compile the test case. |
| 38 if [get_compiler_info ${binfile}] { | 34 if [get_compiler_info] { |
| 39 return -1; | 35 return -1; |
| 40 } | 36 } |
| 41 | 37 |
| 42 set corefile [core_find $binfile {coremmap.data}] | 38 set corefile [core_find $binfile {coremmap.data}] |
| 43 if {$corefile == ""} { | 39 if {$corefile == ""} { |
| 44 return 0 | 40 return 0 |
| 45 } | 41 } |
| 46 | 42 |
| 47 # Test that we can simply startup with a "-core=$corefile" command line arg | 43 # Test that we can simply startup with a "-core=$corefile" command line arg |
| 48 # and recognize that the core file is a valid, usable core file. | 44 # and recognize that the core file is a valid, usable core file. |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 -re "\r\nLocal core dump file:\r\n.*\r\n$gdb_prompt $" { | 249 -re "\r\nLocal core dump file:\r\n.*\r\n$gdb_prompt $" { |
| 254 fail $test | 250 fail $test |
| 255 } | 251 } |
| 256 -re "\r\n$gdb_prompt $" { | 252 -re "\r\n$gdb_prompt $" { |
| 257 pass $test | 253 pass $test |
| 258 } | 254 } |
| 259 } | 255 } |
| 260 | 256 |
| 261 gdb_exit | 257 gdb_exit |
| 262 } | 258 } |
| OLD | NEW |