| OLD | NEW |
| 1 # Copyright 2009, 2011-2012 Free Software Foundation, Inc. | 1 # Copyright 2009-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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 if ![runto_main] then { | 63 if ![runto_main] then { |
| 64 fail "Can't run to main" | 64 fail "Can't run to main" |
| 65 return 0 | 65 return 0 |
| 66 } | 66 } |
| 67 | 67 |
| 68 delete_breakpoints | 68 delete_breakpoints |
| 69 | 69 |
| 70 gdb_test "continue" ".*Aborted.*" | 70 gdb_test "continue" ".*Aborted.*" |
| 71 | 71 |
| 72 set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test] | 72 if {![gdb_gcore_cmd "${objdir}/${subdir}/gcore.test" \ |
| 73 | 73 » "save a corefile"]} { |
| 74 gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \ | |
| 75 "save a corefile" \ | |
| 76 { | |
| 77 -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" { | |
| 78 pass "save a corefile" | |
| 79 } | |
| 80 -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" { | |
| 81 unsupported "save a corefile" | |
| 82 return -1 | 74 return -1 |
| 83 } | |
| 84 } | 75 } |
| 85 | 76 |
| 86 | |
| 87 # Now restart gdb and load the corefile. | 77 # Now restart gdb and load the corefile. |
| 88 gdb_exit | 78 gdb_exit |
| 89 gdb_start | 79 gdb_start |
| 90 gdb_reinitialize_dir $srcdir/$subdir | 80 gdb_reinitialize_dir $srcdir/$subdir |
| 91 gdb_load ${ppu_bin} | 81 gdb_load ${ppu_bin} |
| 92 | 82 |
| 93 send_gdb "core-file $objdir/$subdir/gcore.test\n" | 83 send_gdb "core-file $objdir/$subdir/gcore.test\n" |
| 94 gdb_expect { | 84 gdb_expect { |
| 95 -re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $"
{ | 85 -re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $"
{ |
| 96 pass "core-file command" | 86 pass "core-file command" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 110 "Switching to thread $thread_id.*" \ | 100 "Switching to thread $thread_id.*" \ |
| 111 "switch to thread $thread_id" | 101 "switch to thread $thread_id" |
| 112 gdb_test "backtrace" \ | 102 gdb_test "backtrace" \ |
| 113 ".*terminal_func.*factorial_func.*value=1.*factorial_func.*value=2.*f
actorial_func.*value=3.*factorial_func.*value=4.*factorial_func.*value=5.*factor
ial_func.*value=6.*main.*speid.*argp.*envp.*at.*$spu_file.c.*<cross-architecture
call>.*spe_context_run.*spe_thread.*at.*$ppu_file.c.*" \ | 103 ".*terminal_func.*factorial_func.*value=1.*factorial_func.*value=2.*f
actorial_func.*value=3.*factorial_func.*value=4.*factorial_func.*value=5.*factor
ial_func.*value=6.*main.*speid.*argp.*envp.*at.*$spu_file.c.*<cross-architecture
call>.*spe_context_run.*spe_thread.*at.*$ppu_file.c.*" \ |
| 114 "backtrace in thread $thread_id" | 104 "backtrace in thread $thread_id" |
| 115 } | 105 } |
| 116 | 106 |
| 117 gdb_exit | 107 gdb_exit |
| 118 | 108 |
| 119 return 0 | 109 return 0 |
| OLD | NEW |