Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(977)

Unified Diff: gdb/testsuite/gdb.base/attach.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/async-shell.exp ('k') | gdb/testsuite/gdb.base/attach-pie-misread.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
+ }
}
}
« no previous file with comments | « gdb/testsuite/gdb.base/async-shell.exp ('k') | gdb/testsuite/gdb.base/attach-pie-misread.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698