2004-07-08 Andrew Cagney <cagney@gnu.org>

* gdb.base/attach.exp: Cleanup copyright.  Re-indent.
This commit is contained in:
Andrew Cagney
2004-07-08 20:04:47 +00:00
parent a7ee766055
commit 1279f4ffe5
2 changed files with 468 additions and 365 deletions

View File

@ -1,5 +1,7 @@
2004-07-08 Andrew Cagney <cagney@gnu.org> 2004-07-08 Andrew Cagney <cagney@gnu.org>
* gdb.base/attach.exp: Cleanup copyright. Re-indent.
* gdb.base/sigbpt.exp: Make the common part of each test name a * gdb.base/sigbpt.exp: Make the common part of each test name a
prefix instead of suffix. prefix instead of suffix.

View File

@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
if $tracelevel then { if $tracelevel then {
strace $tracelevel strace $tracelevel
} }
@ -86,7 +83,7 @@ proc do_attach_tests {} {
# Start the program running and then wait for a bit, to be sure # Start the program running and then wait for a bit, to be sure
# that it can be attached to. # that it can be attached to.
#
set testpid [eval exec $binfile &] set testpid [eval exec $binfile &]
exec sleep 2 exec sleep 2
if { [istarget "*-*-cygwin*"] } { if { [istarget "*-*-cygwin*"] } {
@ -96,32 +93,36 @@ proc do_attach_tests {} {
} }
# Verify that we cannot attach to nonsense. # Verify that we cannot attach to nonsense.
#
send_gdb "attach abc\n" send_gdb "attach abc\n"
gdb_expect { gdb_expect {
-re ".*Illegal process-id: abc.*$gdb_prompt $"\ -re ".*Illegal process-id: abc.*$gdb_prompt $" {
{pass "attach to nonsense is prohibited"} pass "attach to nonsense is prohibited"
-re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\ }
{ -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $" {
# Response expected from /proc-based systems. # Response expected from /proc-based systems.
pass "attach to nonsense is prohibited" pass "attach to nonsense is prohibited"
} }
-re ".*Can't attach to process..*$gdb_prompt $"\ -re ".*Can't attach to process..*$gdb_prompt $" {
{
# Response expected on Cygwin # Response expected on Cygwin
pass "attach to nonsense is prohibited" pass "attach to nonsense is prohibited"
} }
-re "Attaching to.*$gdb_prompt $"\ -re "Attaching to.*$gdb_prompt $" {
{fail "attach to nonsense is prohibited (bogus pid allowed)"} fail "attach to nonsense is prohibited (bogus pid allowed)"
-re "$gdb_prompt $" {fail "attach to nonsense is prohibited"} }
timeout {fail "(timeout) attach to nonsense is prohibited"} -re "$gdb_prompt $" {
fail "attach to nonsense is prohibited"
}
timeout {
fail "(timeout) attach to nonsense is prohibited"
}
} }
# Verify that we cannot attach to what appears to be a valid # Verify that we cannot attach to what appears to be a valid
# process ID, but is a process that doesn't exist. Traditionally, # process ID, but is a process that doesn't exist. Traditionally,
# most systems didn't have a process with ID 0, so we take that as # most systems didn't have a process with ID 0, so we take that as
# the default. However, there are a few exceptions. # the default. However, there are a few exceptions.
#
set boguspid 0 set boguspid 0
if { [istarget "*-*-*bsd*"] } { if { [istarget "*-*-*bsd*"] } {
# In FreeBSD 5.0, PID 0 is used for "swapper". Use -1 instead # In FreeBSD 5.0, PID 0 is used for "swapper". Use -1 instead
@ -131,103 +132,127 @@ proc do_attach_tests {} {
} }
send_gdb "attach $boguspid\n" send_gdb "attach $boguspid\n"
gdb_expect { gdb_expect {
-re "Attaching to.*, process $boguspid.*No such process.*$gdb_prompt $"\ -re "Attaching to.*, process $boguspid.*No such process.*$gdb_prompt $" {
{
# Response expected on ptrace-based systems (i.e. HP-UX 10.20). # Response expected on ptrace-based systems (i.e. HP-UX 10.20).
pass "attach to nonexistent process is prohibited" pass "attach to nonexistent process is prohibited"
} }
-re "Attaching to.*, process $boguspid failed.*Hint.*$gdb_prompt $"\ -re "Attaching to.*, process $boguspid failed.*Hint.*$gdb_prompt $" {
{
# Response expected on ttrace-based systems (i.e. HP-UX 11.0). # Response expected on ttrace-based systems (i.e. HP-UX 11.0).
pass "attach to nonexistent process is prohibited" pass "attach to nonexistent process is prohibited"
} }
-re "Attaching to.*, process $boguspid.*denied.*$gdb_prompt $"\ -re "Attaching to.*, process $boguspid.*denied.*$gdb_prompt $" {
{pass "attach to nonexistent process is prohibited"} pass "attach to nonexistent process is prohibited"
-re "Attaching to.*, process $boguspid.*not permitted.*$gdb_prompt $"\ }
{pass "attach to nonexistent process is prohibited"} -re "Attaching to.*, process $boguspid.*not permitted.*$gdb_prompt $" {
-re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\ pass "attach to nonexistent process is prohibited"
{ }
-re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $" {
# Response expected from /proc-based systems. # Response expected from /proc-based systems.
pass "attach to nonexistent process is prohibited" pass "attach to nonexistent process is prohibited"
} }
-re ".*Can't attach to process..*$gdb_prompt $"\ -re ".*Can't attach to process..*$gdb_prompt $" {
{
# Response expected on Cygwin # Response expected on Cygwin
pass "attach to nonexistent process is prohibited" pass "attach to nonexistent process is prohibited"
} }
-re "$gdb_prompt $" {fail "attach to nonexistent process is prohibited"} -re "$gdb_prompt $" {
fail "attach to nonexistent process is prohibited"
}
timeout { timeout {
fail "(timeout) attach to nonexistent process is prohibited" fail "(timeout) attach to nonexistent process is prohibited"
} }
} }
# Verify that we can attach to the process by first giving its # Verify that we can attach to the process by first giving its
# executable name via the file command, and using attach with # executable name via the file command, and using attach with the
# the process ID. # process ID.
#
# (Actually, the test system appears to do this automatically # (Actually, the test system appears to do this automatically for
# for us. So, we must also be prepared to be asked if we want # us. So, we must also be prepared to be asked if we want to
# to discard an existing set of symbols.) # discard an existing set of symbols.)
#
send_gdb "file $binfile\n" send_gdb "file $binfile\n"
gdb_expect { gdb_expect {
-re "Load new symbol table from.*y or n.*$" { -re "Load new symbol table from.*y or n.*$" {
send_gdb "y\n" send_gdb "y\n"
gdb_expect { gdb_expect {
-re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $"\ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
{pass "(re)set file, before attach1"} pass "(re)set file, before attach1"
-re "$gdb_prompt $" {fail "(re)set file, before attach1"} }
timeout {fail "(timeout) (re)set file, before attach1"} -re "$gdb_prompt $" {
fail "(re)set file, before attach1"
}
timeout {
fail "(timeout) (re)set file, before attach1"
} }
} }
-re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $"\ }
{pass "set file, before attach1"} -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
-re "$gdb_prompt $" {fail "set file, before attach1"} pass "set file, before attach1"
timeout {fail "(timeout) set file, before attach1"} }
-re "$gdb_prompt $" {
fail "set file, before attach1"
}
timeout {
fail "(timeout) set file, before attach1"
}
} }
send_gdb "attach $testpid\n" send_gdb "attach $testpid\n"
gdb_expect { gdb_expect {
-re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $"\ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $" {
{pass "attach1, after setting file"} pass "attach1, after setting file"
-re "Attaching to program.*`?$escapedbinfile\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $"\ }
{ -re "Attaching to program.*`?$escapedbinfile\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" {
# Response expected on Cygwin # Response expected on Cygwin
pass "attach1, after setting file" pass "attach1, after setting file"
} }
-re "$gdb_prompt $" {fail "attach1, after setting file"} -re "$gdb_prompt $" {
timeout {fail "(timeout) attach1, after setting file"} fail "attach1, after setting file"
}
timeout {
fail "(timeout) attach1, after setting file"
}
} }
# Verify that we can "see" the variable "should_exit" in the # Verify that we can "see" the variable "should_exit" in the
# program, and that it is zero. # program, and that it is zero.
#
send_gdb "print should_exit\n" send_gdb "print should_exit\n"
gdb_expect { gdb_expect {
-re ".* = 0.*$gdb_prompt $"\ -re ".* = 0.*$gdb_prompt $" {
{pass "after attach1, print should_exit"} pass "after attach1, print should_exit"
-re "$gdb_prompt $" {fail "after attach1, print should_exit"} }
timeout {fail "(timeout) after attach1, print should_exit"} -re "$gdb_prompt $" {
fail "after attach1, print should_exit"
}
timeout {
fail "(timeout) after attach1, print should_exit"
}
} }
# Detach the process. # Detach the process.
#
send_gdb "detach\n" send_gdb "detach\n"
gdb_expect { gdb_expect {
-re "Detaching from program: .*$escapedbinfile.*$gdb_prompt $"\ -re "Detaching from program: .*$escapedbinfile.*$gdb_prompt $" {
{pass "attach1 detach"} pass "attach1 detach"
-re "$gdb_prompt $" {fail "attach1 detach"} }
timeout {fail "(timeout) attach1 detach"} -re "$gdb_prompt $" {
fail "attach1 detach"
}
timeout {
fail "(timeout) attach1 detach"
}
} }
# Wait a bit for gdb to finish detaching # Wait a bit for gdb to finish detaching
#
exec sleep 5 exec sleep 5
# Purge the symbols from gdb's brain. (We want to be certain # Purge the symbols from gdb's brain. (We want to be certain the
# the next attach, which won't be preceded by a "file" command, # next attach, which won't be preceded by a "file" command, is
# is really getting the executable file without our help.) # really getting the executable file without our help.)
#
set old_timeout $timeout set old_timeout $timeout
set timeout 15 set timeout 15
send_gdb "file\n" send_gdb "file\n"
@ -238,13 +263,20 @@ proc do_attach_tests {} {
-re "No executable file now.*Discard symbol table.*y or n.*$" { -re "No executable file now.*Discard symbol table.*y or n.*$" {
send_gdb "y\n" send_gdb "y\n"
gdb_expect { gdb_expect {
-re "No symbol file now.*$gdb_prompt $"\ -re "No symbol file now.*$gdb_prompt $" {
{pass "attach1, purging symbols after detach"} pass "attach1, purging symbols after detach"
-re "$gdb_prompt $" {fail "attach1, purging symbols after detach"} }
timeout {fail "(timeout) attach1, purging symbols after detach"} -re "$gdb_prompt $" {
fail "attach1, purging symbols after detach"
}
timeout {
fail "(timeout) attach1, purging symbols after detach"
} }
} }
-re "$gdb_prompt $" {fail "attach1, purging file after detach"} }
-re "$gdb_prompt $" {
fail "attach1, purging file after detach"
}
timeout { timeout {
fail "(timeout) attach1, purging file after detach" fail "(timeout) attach1, purging file after detach"
} }
@ -253,7 +285,7 @@ proc do_attach_tests {} {
# Verify that we can attach to the process just by giving the # Verify that we can attach to the process just by giving the
# process ID. # process ID.
#
send_gdb "attach $testpid\n" send_gdb "attach $testpid\n"
gdb_expect { gdb_expect {
-re "Attaching to process $testpid.*Load new symbol table from \"$escapedbinfile\.exe\".*y or n.*$" { -re "Attaching to process $testpid.*Load new symbol table from \"$escapedbinfile\.exe\".*y or n.*$" {
@ -263,64 +295,92 @@ proc do_attach_tests {} {
# executable. # executable.
send_gdb "y\n" send_gdb "y\n"
gdb_expect { gdb_expect {
-re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $"\ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
{pass "(re)set file, before attach2"} pass "(re)set file, before attach2"
-re "$gdb_prompt $"\ }
{fail "(re)set file, before attach2"} -re "$gdb_prompt $" {
timeout {fail "(timeout) (re)set file, before attach2"} fail "(re)set file, before attach2"
}
timeout {
fail "(timeout) (re)set file, before attach2"
} }
} }
-re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $"\ }
{pass "attach2"} -re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $" {
-re "$gdb_prompt $" {fail "attach2"} pass "attach2"
timeout {fail "(timeout) attach2"} }
-re "$gdb_prompt $" {
fail "attach2"
}
timeout {
fail "(timeout) attach2"
}
} }
# Verify that we can modify the variable "should_exit" in the # Verify that we can modify the variable "should_exit" in the
# program. # program.
#
send_gdb "set should_exit=1\n" send_gdb "set should_exit=1\n"
gdb_expect { gdb_expect {
-re "$gdb_prompt $" {pass "after attach2, set should_exit"} -re "$gdb_prompt $" {
timeout {fail "(timeout) after attach2, set should_exit"} pass "after attach2, set should_exit"
}
timeout {
fail "(timeout) after attach2, set should_exit"
}
} }
# Verify that the modification really happened. # Verify that the modification really happened.
#
send_gdb "tbreak 19\n" send_gdb "tbreak 19\n"
gdb_expect { gdb_expect {
-re "Breakpoint .*at.*$srcfile, line 19.*$gdb_prompt $"\ -re "Breakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" {
{pass "after attach2, set tbreak postloop"} pass "after attach2, set tbreak postloop"
-re "$gdb_prompt $" {fail "after attach2, set tbreak postloop"} }
timeout {fail "(timeout) after attach2, set tbreak postloop"} -re "$gdb_prompt $" {
fail "after attach2, set tbreak postloop"
}
timeout {
fail "(timeout) after attach2, set tbreak postloop"
}
} }
send_gdb "continue\n" send_gdb "continue\n"
gdb_expect { gdb_expect {
-re "main.*at.*$srcfile:19.*$gdb_prompt $"\ -re "main.*at.*$srcfile:19.*$gdb_prompt $" {
{pass "after attach2, reach tbreak postloop"} pass "after attach2, reach tbreak postloop"
-re "$gdb_prompt $" {fail "after attach2, reach tbreak postloop"} }
timeout {fail "(timeout) after attach2, reach tbreak postloop"} -re "$gdb_prompt $" {
fail "after attach2, reach tbreak postloop"
}
timeout {
fail "(timeout) after attach2, reach tbreak postloop"
}
} }
# Allow the test process to exit, to cleanup after ourselves. # Allow the test process to exit, to cleanup after ourselves.
#
send_gdb "continue\n" send_gdb "continue\n"
gdb_expect { gdb_expect {
-re "Program exited normally.*$gdb_prompt $"\ -re "Program exited normally.*$gdb_prompt $" {
{pass "after attach2, exit"} pass "after attach2, exit"
-re "$gdb_prompt $" {fail "after attach2, exit"} }
timeout {fail "(timeout) after attach2, exit"} -re "$gdb_prompt $" {
fail "after attach2, exit"
}
timeout {
fail "(timeout) after attach2, exit"
}
} }
# Make sure we don't leave a process around to confuse # Make sure we don't leave a process around to confuse
# the next test run (and prevent the compile by keeping # the next test run (and prevent the compile by keeping
# the text file busy), in case the "set should_exit" didn't # the text file busy), in case the "set should_exit" didn't
# work. # work.
#
remote_exec build "kill -9 ${testpid}" remote_exec build "kill -9 ${testpid}"
# Start the program running and then wait for a bit, to be sure # Start the program running and then wait for a bit, to be sure
# that it can be attached to. # that it can be attached to.
#
set testpid [eval exec $binfile &] set testpid [eval exec $binfile &]
exec sleep 2 exec sleep 2
if { [istarget "*-*-cygwin*"] } { if { [istarget "*-*-cygwin*"] } {
@ -332,67 +392,105 @@ proc do_attach_tests {} {
# Verify that we can attach to the process, and find its a.out # Verify that we can attach to the process, and find its a.out
# when we're cd'd to some directory that doesn't contain the # when we're cd'd to some directory that doesn't contain the
# a.out. (We use the source path set by the "dir" command.) # a.out. (We use the source path set by the "dir" command.)
#
send_gdb "dir ${objdir}/${subdir}\n" send_gdb "dir ${objdir}/${subdir}\n"
gdb_expect { gdb_expect {
-re ".*Source directories searched: .*$gdb_prompt $"\ -re ".*Source directories searched: .*$gdb_prompt $" {
{pass "set source path"} pass "set source path"
-re "$gdb_prompt $" {fail "set source path"} }
timeout {fail "(timeout) set source path"} -re "$gdb_prompt $" {
fail "set source path"
}
timeout {
fail "(timeout) set source path"
}
} }
send_gdb "cd /tmp\n" send_gdb "cd /tmp\n"
gdb_expect { gdb_expect {
-re ".*Working directory /tmp.*$gdb_prompt $"\ -re ".*Working directory /tmp.*$gdb_prompt $" {
{pass "cd away from process' a.out"} pass "cd away from process' a.out"
-re "$gdb_prompt $" {fail "cd away from process' a.out"} }
timeout {fail "(timeout) cd away from process' a.out"} -re "$gdb_prompt $" {
fail "cd away from process' a.out"
}
timeout {
fail "(timeout) cd away from process' a.out"
}
} }
# Explicitly flush out any knowledge of the previous attachment. # Explicitly flush out any knowledge of the previous attachment.
send_gdb "symbol\n" send_gdb "symbol\n"
gdb_expect { gdb_expect {
-re ".*Discard symbol table from.*y or n. $"\ -re ".*Discard symbol table from.*y or n. $" {
{send_gdb "y\n" send_gdb "y\n"
gdb_expect { gdb_expect {
-re ".*No symbol file now.*$gdb_prompt $"\ -re ".*No symbol file now.*$gdb_prompt $" {
{pass "before attach3, flush symbols"} pass "before attach3, flush symbols"
-re "$gdb_prompt $" {fail "before attach3, flush symbols"} }
timeout {fail "(timeout) before attach3, flush symbols"} -re "$gdb_prompt $" {
fail "before attach3, flush symbols"
}
timeout {
fail "(timeout) before attach3, flush symbols"
} }
} }
-re ".*No symbol file now.*$gdb_prompt $"\ }
{pass "before attach3, flush symbols"} -re ".*No symbol file now.*$gdb_prompt $" {
-re "$gdb_prompt $" {fail "before attach3, flush symbols"} pass "before attach3, flush symbols"
timeout {fail "(timeout) before attach3, flush symbols"} }
-re "$gdb_prompt $" {
fail "before attach3, flush symbols"
}
timeout {
fail "(timeout) before attach3, flush symbols"
}
} }
send_gdb "exec\n" send_gdb "exec\n"
gdb_expect { gdb_expect {
-re ".*No executable file now.*$gdb_prompt $"\ -re ".*No executable file now.*$gdb_prompt $" {
{pass "before attach3, flush exec"} pass "before attach3, flush exec"
-re "$gdb_prompt $" {fail "before attach3, flush exec"} }
timeout {fail "(timeout) before attach3, flush exec"} -re "$gdb_prompt $" {
fail "before attach3, flush exec"
}
timeout {
fail "(timeout) before attach3, flush exec"
}
} }
send_gdb "attach $testpid\n" send_gdb "attach $testpid\n"
gdb_expect { gdb_expect {
-re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $"\ -re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $" {
{pass "attach when process' a.out not in cwd"} pass "attach when process' a.out not in cwd"
-re "$gdb_prompt $" {fail "attach when process' a.out not in cwd"} }
timeout {fail "(timeout) attach when process' a.out not in cwd"} -re "$gdb_prompt $" {
fail "attach when process' a.out not in cwd"
}
timeout {
fail "(timeout) attach when process' a.out not in cwd"
}
} }
send_gdb "kill\n" send_gdb "kill\n"
gdb_expect { gdb_expect {
-re ".*Kill the program being debugged.*y or n. $"\ -re ".*Kill the program being debugged.*y or n. $" {
{send_gdb "y\n" send_gdb "y\n"
gdb_expect { gdb_expect {
-re "$gdb_prompt $" {pass "after attach3, exit"} -re "$gdb_prompt $" {
timeout {fail "(timeout) after attach3, exit"} pass "after attach3, exit"
}
timeout {
fail "(timeout) after attach3, exit"
} }
} }
-re "$gdb_prompt $" {fail "after attach3, exit"} }
timeout {fail "(timeout) after attach3, exit"} -re "$gdb_prompt $" {
fail "after attach3, exit"
}
timeout {
fail "(timeout) after attach3, exit"
}
} }
# Another "don't leave a process around" # Another "don't leave a process around"
@ -405,7 +503,7 @@ proc do_call_attach_tests {} {
# Start the program running and then wait for a bit, to be sure # Start the program running and then wait for a bit, to be sure
# that it can be attached to. # that it can be attached to.
#
set testpid [eval exec $binfile2 &] set testpid [eval exec $binfile2 &]
exec sleep 2 exec sleep 2
if { [istarget "*-*-cygwin*"] } { if { [istarget "*-*-cygwin*"] } {
@ -415,7 +513,7 @@ proc do_call_attach_tests {} {
} }
# Attach # Attach
#
gdb_test "file $binfile2" ".*" "force switch to gdb64, if necessary" gdb_test "file $binfile2" ".*" "force switch to gdb64, if necessary"
send_gdb "attach $testpid\n" send_gdb "attach $testpid\n"
gdb_expect { gdb_expect {
@ -428,12 +526,16 @@ proc do_call_attach_tests {} {
-re "Attaching to.*process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" { -re "Attaching to.*process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" {
pass "attach call" pass "attach call"
} }
-re "$gdb_prompt $" {fail "attach call"} -re "$gdb_prompt $" {
timeout {fail "(timeout) attach call"} fail "attach call"
}
timeout {
fail "(timeout) attach call"
}
} }
# See if other registers are problems # See if other registers are problems
#
send_gdb "i r r3\n" send_gdb "i r r3\n"
gdb_expect { gdb_expect {
-re ".*warning: reading register.*$gdb_prompt $" { -re ".*warning: reading register.*$gdb_prompt $" {
@ -446,30 +548,29 @@ proc do_call_attach_tests {} {
} }
# Get rid of the process # Get rid of the process
#
gdb_test "p should_exit = 1" ".*" gdb_test "p should_exit = 1" ".*"
gdb_test "c" ".*Program exited normally.*" gdb_test "c" ".*Program exited normally.*"
# Be paranoid # Be paranoid
#
remote_exec build "kill -9 ${testpid}"
remote_exec build "kill -9 ${testpid}"
} }
# Start with a fresh gdb # Start with a fresh gdb
#
gdb_exit gdb_exit
gdb_start gdb_start
gdb_reinitialize_dir $srcdir/$subdir gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile} gdb_load ${binfile}
# This is a test of gdb's ability to attach to a running process. # This is a test of gdb's ability to attach to a running process.
#
do_attach_tests do_attach_tests
# Test attaching when the target is inside a system call # Test attaching when the target is inside a system call
#
gdb_exit gdb_exit
gdb_start gdb_start