| OLD | NEW |
| 1 # Copyright 2009, 2011-2012 Free Software Foundation, Inc. | 1 # Copyright 2009, 2011-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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 # we spawned SSH to a remote system. | 65 # we spawned SSH to a remote system. |
| 66 unsupported $test | 66 unsupported $test |
| 67 return -1 | 67 return -1 |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 | 70 |
| 71 set double_free [gdb_get_line_number "double-free"] | 71 set double_free [gdb_get_line_number "double-free"] |
| 72 | 72 |
| 73 set test "attach to debugger" | 73 set test "attach to debugger" |
| 74 gdb_test_multiple "" $test { | 74 gdb_test_multiple "" $test { |
| 75 -re "Invalid free\\(\\) / delete / delete\\\[\\\]\r\n.*: main \\(${srcfile}:
$double_free\\)\r\n.*---- Attach to debugger \\? --- \[^\r\n\]* ---- " { | 75 -re "Invalid free\\(\\).*: main \\(${srcfile}:$double_free\\)\r\n.*---- Atta
ch to debugger \\? --- \[^\r\n\]* ---- " { |
| 76 send_gdb "y\r" | 76 send_gdb "y\r" |
| 77 } | 77 } |
| 78 -re "---- Attach to debugger \\? --- \[^\r\n\]* ---- " { | 78 -re "---- Attach to debugger \\? --- \[^\r\n\]* ---- " { |
| 79 send_gdb "n\r" | 79 send_gdb "n\r" |
| 80 exp_continue | 80 exp_continue |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 gdb_test "" ".*" "eat first prompt" | 84 gdb_test "" ".*" "eat first prompt" |
| 85 | 85 |
| 86 # Initialization from default_gdb_start. | 86 # Initialization from default_gdb_start. |
| 87 gdb_test_no_output "set height 0" | 87 gdb_test_no_output "set height 0" |
| 88 gdb_test_no_output "set width 0" | 88 gdb_test_no_output "set width 0" |
| 89 | 89 |
| 90 gdb_test "bt" "in main \\(.*\\) at .*${srcfile}:$double_free" | 90 gdb_test "bt" "in main \\(.*\\) at .*${srcfile}:$double_free" |
| 91 | 91 |
| 92 # Explicitly kill the program so it doesn't dump core when we quit->detach. | 92 # Explicitly kill the program so it doesn't dump core when we quit->detach. |
| 93 gdb_test "kill" "" "kill program" "Kill the program being debugged.*y or n. $" "
y" | 93 gdb_test "kill" "" "kill program" "Kill the program being debugged.*y or n. $" "
y" |
| OLD | NEW |