mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
2011-09-08 Pedro Alves <pedro@codesourcery.com>
* gdb.base/annota1.exp, gdb.base/annota3.exp: Extract the inferior's pid and look for a core dump named core.$pid. Use `remote_file' commands on the host instead of hand coding shell commands on the build. * gdb.base/valgrind-db-attach.exp: Kill the program before finishing the test.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2011-09-08 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
|
* gdb.base/annota1.exp, gdb.base/annota3.exp: Extract the
|
||||||
|
inferior's pid and look for a core dump named core.$pid. Use
|
||||||
|
`remote_file' commands on the host instead of hand coding shell
|
||||||
|
commands on the build.
|
||||||
|
* gdb.base/valgrind-db-attach.exp: Kill the program before
|
||||||
|
finishing the test.
|
||||||
|
|
||||||
2011-09-02 Matt Rice <ratmice@gmail.com>
|
2011-09-02 Matt Rice <ratmice@gmail.com>
|
||||||
|
|
||||||
* lib/prompt.exp: New file for testing the first prompt.
|
* lib/prompt.exp: New file for testing the first prompt.
|
||||||
|
@ -392,6 +392,17 @@ gdb_test_multiple "next" "breakpoint ignore count" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Get the inferior's PID for later.
|
||||||
|
|
||||||
|
set test "get inferior pid"
|
||||||
|
set pid -1
|
||||||
|
gdb_test_multiple "info inferior 1" "$test" {
|
||||||
|
-re "process (\[0-9\]*).*$gdb_prompt$" {
|
||||||
|
set pid $expect_out(1,string)
|
||||||
|
pass "$test"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Send a signal that is not handled; test:
|
# Send a signal that is not handled; test:
|
||||||
# annotate-signalled
|
# annotate-signalled
|
||||||
@ -422,21 +433,17 @@ if [target_info exists gdb,nosignals] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Check for production of a core file and remove it!
|
# Check for production of a core file and remove it!
|
||||||
|
|
||||||
set exec_output [remote_exec build "ls core"]
|
|
||||||
|
|
||||||
set test "cleanup core file"
|
set test "cleanup core file"
|
||||||
if [ regexp "core not found" $exec_output] {
|
if { [remote_file host exists core] } {
|
||||||
pass "$test (not dumped)"
|
remote_file host delete core
|
||||||
|
pass "$test (removed)"
|
||||||
|
} elseif { $pid != -1 && [remote_file host exists core.$pid] } {
|
||||||
|
remote_file host delete core.$pid
|
||||||
|
pass "$test (removed)"
|
||||||
} else {
|
} else {
|
||||||
if [ regexp "No such file or directory" $exec_output] {
|
pass "$test (not dumped)"
|
||||||
pass "$test (not dumped)"
|
|
||||||
} else {
|
|
||||||
remote_exec build "rm -f core"
|
|
||||||
pass "$test (removed)"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
proc thread_test {} {
|
proc thread_test {} {
|
||||||
|
@ -365,6 +365,17 @@ gdb_expect_list "breakpoint ignore count" "$gdb_prompt$" {
|
|||||||
"\r\n\032\032stopped\r\n"
|
"\r\n\032\032stopped\r\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Get the inferior's PID for later.
|
||||||
|
|
||||||
|
set test "get inferior pid"
|
||||||
|
set pid -1
|
||||||
|
gdb_test_multiple "info inferior 1" "$test" {
|
||||||
|
-re "process (\[0-9\]*).*$gdb_prompt$" {
|
||||||
|
set pid $expect_out(1,string)
|
||||||
|
pass "$test"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Send a signal that is not handled
|
# Send a signal that is not handled
|
||||||
#
|
#
|
||||||
@ -396,18 +407,15 @@ if [target_info exists gdb,nosignals] {
|
|||||||
|
|
||||||
# Check for production of a core file and remove it!
|
# Check for production of a core file and remove it!
|
||||||
|
|
||||||
set exec_output [remote_exec build "ls core"]
|
|
||||||
|
|
||||||
set test "cleanup core file"
|
set test "cleanup core file"
|
||||||
if [ regexp "core not found" $exec_output] {
|
if { [remote_file host exists core] } {
|
||||||
pass "$test (not dumped)"
|
remote_file host delete core
|
||||||
|
pass "$test (removed)"
|
||||||
|
} elseif { $pid != -1 && [remote_file host exists core.$pid] } {
|
||||||
|
remote_file host delete core.$pid
|
||||||
|
pass "$test (removed)"
|
||||||
} else {
|
} else {
|
||||||
if [ regexp "No such file or directory" $exec_output] {
|
pass "$test (not dumped)"
|
||||||
pass "$test (not dumped)"
|
|
||||||
} else {
|
|
||||||
remote_exec build "rm -f core"
|
|
||||||
pass "$test (removed)"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# restore the original prompt for the rest of the testsuite
|
# restore the original prompt for the rest of the testsuite
|
||||||
|
@ -83,3 +83,6 @@ gdb_test_no_output "set height 0"
|
|||||||
gdb_test_no_output "set width 0"
|
gdb_test_no_output "set width 0"
|
||||||
|
|
||||||
gdb_test "bt" "in main \\(.*\\) at .*${srcfile}:$double_free"
|
gdb_test "bt" "in main \\(.*\\) at .*${srcfile}:$double_free"
|
||||||
|
|
||||||
|
# Explicitly kill the program so it doesn't dump core when we quit->detach.
|
||||||
|
gdb_test "kill" "" "kill program" "Kill the program being debugged.*y or n. $" "y"
|
||||||
|
Reference in New Issue
Block a user