diff options
author | Pedro Alves <palves@redhat.com> | 2012-02-15 12:48:55 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-02-15 12:48:55 +0000 |
commit | 7cee1e5405310dae3ab7f6356d56f6b5f69e4b2c (patch) | |
tree | d3ff9606d14241207427d87dcac8d80c388f7e2e /gdb/testsuite/gdb.base/attach.exp | |
parent | f9fa4a63414294ef4eb46f6acb5b649382620f2a (diff) | |
download | gdb-7cee1e5405310dae3ab7f6356d56f6b5f69e4b2c.zip gdb-7cee1e5405310dae3ab7f6356d56f6b5f69e4b2c.tar.gz gdb-7cee1e5405310dae3ab7f6356d56f6b5f69e4b2c.tar.bz2 |
gdb/
2012-02-15 Pedro Alves <palves@redhat.com>
* remote.c (remote_detach_1, extended_remote_attach_1): Tweak
output to be like native targets'.
(remote_pid_to_str): Special case the null ptid.
gdb/testsuite/
2012-02-15 Pedro Alves <palves@redhat.com>
Support extended-remote. Avoid cascading timeouts.
* gdb.base/attach.exp (do_attach_tests): Add expected output for
the extended-remote target. If attaching with no file fails, load
the file manually.
* gdb.server/ext-attach.exp: Adjust expected attach/detach output.
Diffstat (limited to 'gdb/testsuite/gdb.base/attach.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/attach.exp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp index 87a22de..ff1b6bc 100644 --- a/gdb/testsuite/gdb.base/attach.exp +++ b/gdb/testsuite/gdb.base/attach.exp @@ -160,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 @@ -224,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 @@ -233,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" + } } } |