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

Unified Diff: gdb/testsuite/gdb.server/ext-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.server/Makefile.in ('k') | gdb/testsuite/gdb.server/ext-run.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.server/ext-attach.exp
diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp
index edf08fd4c97b60e21a516cdf72033da9e665fc27..c5aec84d20166fb58ac47440400e00ed5c20c014 100644
--- a/gdb/testsuite/gdb.server/ext-attach.exp
+++ b/gdb/testsuite/gdb.server/ext-attach.exp
@@ -19,9 +19,7 @@
load_lib gdbserver-support.exp
-set testfile "ext-attach"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
if { [skip_gdbserver_tests] } {
return 0
@@ -32,15 +30,13 @@ if [is_remote target] then {
return 0
}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested ext-attach.exp
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
return -1
}
-gdb_exit
-gdb_start
-gdb_load $binfile
-gdb_reinitialize_dir $srcdir/$subdir
+# Make sure we're disconnected, in case we're testing with an
+# extended-remote board, therefore already connected.
+gdb_test "disconnect" ".*"
set target_exec [gdbserver_download_current_prog]
gdbserver_start_extended
@@ -57,14 +53,16 @@ if { [istarget "*-*-cygwin*"] } {
set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
}
-gdb_test "attach $testpid" "Attached to.*" \
+gdb_test "attach $testpid" \
+ "Attaching to program: .*, process $testpid.*(in|at).*" \
"attach to remote program 1"
gdb_test "backtrace" ".*main.*" "backtrace 1"
-gdb_test "detach" "Detached from remote process.*\\."
+gdb_test "detach" "Detaching from program.*process.*"
gdb_test "backtrace" "No stack\\." "backtrace with no program"
-gdb_test "attach $testpid" "Attached to.*" \
+gdb_test "attach $testpid" \
+ "Attaching to program: .*, process $testpid.*(in|at).*" \
"attach to remote program 2"
gdb_test "backtrace" ".*main.*" "backtrace 2"
« no previous file with comments | « gdb/testsuite/gdb.server/Makefile.in ('k') | gdb/testsuite/gdb.server/ext-run.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698