| Index: gdb/testsuite/gdb.base/attach.exp
|
| diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
|
| index f28a537b2afe3b5ff6ae431e97db9474741e99a5..c3e12a0d858dea10fedc2397be150c4fee0de0ec 100644
|
| --- a/gdb/testsuite/gdb.base/attach.exp
|
| +++ b/gdb/testsuite/gdb.base/attach.exp
|
| @@ -14,10 +14,6 @@
|
| # You should have received a copy of the GNU General Public License
|
| # along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
| -if $tracelevel then {
|
| - strace $tracelevel
|
| -}
|
| -
|
|
|
| # On HP-UX 11.0, this test is causing a process running the program
|
| # "attach" to be left around spinning. Until we figure out why, I am
|
| @@ -62,7 +58,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {d
|
| return -1
|
| }
|
|
|
| -if [get_compiler_info ${binfile}] {
|
| +if [get_compiler_info] {
|
| return -1
|
| }
|
|
|
| @@ -164,6 +160,10 @@ proc do_attach_tests {} {
|
| # Response expected on Cygwin
|
| pass "$test"
|
| }
|
| + -re "Attaching to.*, process $boguspid.*failed.*$gdb_prompt $" {
|
| + # Response expected on the extended-remote target.
|
| + pass "$test"
|
| + }
|
| }
|
|
|
| # Verify that we can attach to the process by first giving its
|
| @@ -228,7 +228,8 @@ proc do_attach_tests {} {
|
| # Verify that we can attach to the process just by giving the
|
| # process ID.
|
|
|
| - set test "set file, before attach2"
|
| + set test "attach2, with no file"
|
| + set found_exec_file 0
|
| gdb_test_multiple "attach $testpid" "$test" {
|
| -re "Attaching to process $testpid.*Load new symbol table from \"$escapedbinfile\.exe\".*y or n. $" {
|
| # On Cygwin, the DLL's symbol tables are loaded prior to the
|
| @@ -237,9 +238,25 @@ proc do_attach_tests {} {
|
| # executable.
|
| gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
|
| "$test (reset file)"
|
| +
|
| + set found_exec_file 1
|
| }
|
| -re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $" {
|
| pass "$test"
|
| + set found_exec_file 1
|
| + }
|
| + }
|
| +
|
| + if {$found_exec_file == 0} {
|
| + set test "load file manually, after attach2"
|
| + gdb_test_multiple "file $binfile" "$test" {
|
| + -re "A program is being debugged already..*Are you sure you want to change the file.*y or n. $" {
|
| + gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
|
| + "$test (re-read)"
|
| + }
|
| + -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
|
| + pass "$test"
|
| + }
|
| }
|
| }
|
|
|
|
|