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

Unified Diff: gdb/testsuite/gdb.threads/attach-stopped.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.threads/attach-into-signal.exp ('k') | gdb/testsuite/gdb.threads/attachstop-mt.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.threads/attach-stopped.exp
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
index d2aacb3589a21ea3651ac9eef0c508e89dc77b04..f4c05baeadb97b4034e46271478d6485339bc252 100644
--- a/gdb/testsuite/gdb.threads/attach-stopped.exp
+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp
@@ -23,10 +23,8 @@ if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub]
continue
}
-set testfile "attach-stopped"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
+standard_testfile
+set escapedbinfile [string_to_regexp $binfile]
#execute_anywhere "rm -f ${binfile}"
remote_exec build "rm -f ${binfile}"
@@ -42,7 +40,7 @@ proc corefunc { threadtype } {
global subdir
global gdb_prompt
- if [get_compiler_info ${binfile}] {
+ if [get_compiler_info] {
return -1
}
@@ -78,61 +76,16 @@ proc corefunc { threadtype } {
} else {
gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach2 to stopped bt"
}
- # This breakpoint is there for old/non-x86 kernels not restarting syscalls.
- gdb_breakpoint $srcfile:[gdb_get_line_number "Second sleep"]
- set test "$threadtype: attach2 continue"
- gdb_test_multiple "continue" "continue ($test)" {
- -re "Continuing" {
- pass "continue ($test)"
- }
- }
-
- # For this to work we must be sure to consume the "Continuing."
- # message first, or GDB's signal handler may not be in place.
- after 1000 {send_gdb "\003"}
- set test "$threadtype: attach2 stop interrupt"
- gdb_expect 10 {
- -re "Program received signal SIGINT.*$gdb_prompt $"
- {
- pass $test
- }
- -re "Breakpoint \[0-9\].*$srcfile.*$gdb_prompt $"
- {
- pass $test
- }
- timeout
- {
- fail $test
- }
- }
gdb_exit
# Avoid some race:
sleep 2
- # At this point, the process should be sleeping
+ # At this point, the process may be sleeping or T (Stopped) depending on
+ # the Linux kernel version. The behavior is not tested as it is not
+ # dependent on GDB.
- if [catch {open /proc/${testpid}/status r} fileid2] {
- set line2 "NOTFOUND"
- } else {
- gets $fileid2 line1;
- gets $fileid2 line2;
- close $fileid2;
- }
-
- set test "$threadtype: attach2, exit leaves process sleeping"
- if {[string match "*(sleeping)*" $line2]} {
- pass $test
- } else {
- fail $test
- }
-
- # Make sure we don't leave a process around to confuse
- # the next test run (and prevent the compile by keeping
- # the text file busy), in case the "set should_exit" didn't
- # work.
-
remote_exec build "kill -9 ${testpid}"
}
« no previous file with comments | « gdb/testsuite/gdb.threads/attach-into-signal.exp ('k') | gdb/testsuite/gdb.threads/attachstop-mt.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698