2001-07-25 Michael Snyder <msnyder@redhat.com>
* gdb.base/ending-run.exp: Accept "Program exited normally" as legitimate output from stepping out of main.
This commit is contained in:
parent
46bac6de18
commit
2b1a1355c5
|
@ -1,3 +1,8 @@
|
||||||
|
2001-07-25 Michael Snyder <msnyder@redhat.com>
|
||||||
|
|
||||||
|
* gdb.base/ending-run.exp: Accept "Program exited normally" as
|
||||||
|
legitimate output from stepping out of main.
|
||||||
|
|
||||||
2001-07-22 Keith Seitz <keiths@redhat.com>
|
2001-07-22 Keith Seitz <keiths@redhat.com>
|
||||||
|
|
||||||
* lib/gdb.exp (_gdbtk_xvfb_init): If GDB_DISPLAY is
|
* lib/gdb.exp (_gdbtk_xvfb_init): If GDB_DISPLAY is
|
||||||
|
|
|
@ -140,6 +140,7 @@ if ![gdb_skip_stdio_test "Step to return"] {
|
||||||
|
|
||||||
set old_timeout $timeout
|
set old_timeout $timeout
|
||||||
set timeout 50
|
set timeout 50
|
||||||
|
set program_exited 0
|
||||||
send_gdb "next\n"
|
send_gdb "next\n"
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
-re "33.*$gdb_prompt $" {
|
-re "33.*$gdb_prompt $" {
|
||||||
|
@ -160,6 +161,11 @@ gdb_expect {
|
||||||
# This is what happens on sparc64-elf ultra.
|
# This is what happens on sparc64-elf ultra.
|
||||||
pass "step out of main"
|
pass "step out of main"
|
||||||
}
|
}
|
||||||
|
-re ".*Program exited normally.*$gdb_prompt $" {
|
||||||
|
# This is what happens on Linux i86 (and I would expect others)
|
||||||
|
set program_exited 1
|
||||||
|
pass "step out of main"
|
||||||
|
}
|
||||||
-re ".*in .nope ().*$gdb_prompt $" {
|
-re ".*in .nope ().*$gdb_prompt $" {
|
||||||
# This is what happens on Solaris currently -sts 1999-08-25
|
# This is what happens on Solaris currently -sts 1999-08-25
|
||||||
pass "step out of main on Solaris"
|
pass "step out of main on Solaris"
|
||||||
|
@ -185,6 +191,11 @@ gdb_expect {
|
||||||
-re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" {
|
-re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" {
|
||||||
pass "step out of main 2"
|
pass "step out of main 2"
|
||||||
}
|
}
|
||||||
|
-re ".*Program exited normally.*$gdb_prompt $" {
|
||||||
|
# This is what happens on Linux i86 (and I would expect others)
|
||||||
|
set program_exited 1
|
||||||
|
pass "step out of main"
|
||||||
|
}
|
||||||
-re ".*in.*currently asm.*$gdb_prompt $" {
|
-re ".*in.*currently asm.*$gdb_prompt $" {
|
||||||
pass "step out of main into assembler"
|
pass "step out of main into assembler"
|
||||||
}
|
}
|
||||||
|
@ -196,6 +207,8 @@ gdb_expect {
|
||||||
}
|
}
|
||||||
|
|
||||||
if {![target_info exists use_cygmon] || ![target_info use_cygmon]} {
|
if {![target_info exists use_cygmon] || ![target_info use_cygmon]} {
|
||||||
|
global program_exited;
|
||||||
|
if {[eval expr $program_exited == 0]} {
|
||||||
send_gdb "n\n"
|
send_gdb "n\n"
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
-re "Program exited normally.*$gdb_prompt $" {
|
-re "Program exited normally.*$gdb_prompt $" {
|
||||||
|
@ -211,7 +224,13 @@ if {![target_info exists use_cygmon] || ![target_info use_cygmon]} {
|
||||||
pass "step to end of run 2"
|
pass "step to end of run 2"
|
||||||
gdb_test "c" ".*" "continue after exit"
|
gdb_test "c" ".*" "continue after exit"
|
||||||
}
|
}
|
||||||
timeout { fail "(timeout) step to end of run" }
|
-re ".*$gdb_prompt $" {
|
||||||
|
fail "step to end of run"
|
||||||
|
}
|
||||||
|
timeout {
|
||||||
|
fail "(timeout) step to end of run"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set timeout $old_timeout
|
set timeout $old_timeout
|
||||||
|
@ -220,7 +239,6 @@ if {![target_info exists use_cygmon] || ![target_info use_cygmon]} {
|
||||||
|
|
||||||
set exec_output [remote_exec host "ls core"]
|
set exec_output [remote_exec host "ls core"]
|
||||||
|
|
||||||
|
|
||||||
if [ regexp "core not found" $exec_output] {
|
if [ regexp "core not found" $exec_output] {
|
||||||
pass "No core dumped on quit"
|
pass "No core dumped on quit"
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue