mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
* gdb.base/ending-run.exp: Flatten expect script stepping out of
main to remove duplication. Add start function of the form '_*start[1-9]*'. Add RVDS start function.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2006-11-27 Nathan Sidwell <nathan@codesourcery.com>
|
||||||
|
Paul Brook <paul@codesourcery.com>
|
||||||
|
Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
|
* gdb.base/ending-run.exp: Flatten expect script stepping out of
|
||||||
|
main to remove duplication. Add start function of the form
|
||||||
|
'_*start[1-9]*'. Add RVDS start function.
|
||||||
|
|
||||||
2006-11-22 Daniel Jacobowitz <dan@codesourcery.com>
|
2006-11-22 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
* gdb.arch/thumb-prologue.c, gdb.arch/thumb-prologue.exp: New files.
|
* gdb.arch/thumb-prologue.c, gdb.arch/thumb-prologue.exp: New files.
|
||||||
|
@ -153,90 +153,83 @@ set old_timeout $timeout
|
|||||||
set timeout 50
|
set timeout 50
|
||||||
set program_exited 0
|
set program_exited 0
|
||||||
send_gdb "next\n"
|
send_gdb "next\n"
|
||||||
|
set nexted 0
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
-re "33.*$gdb_prompt $" {
|
-re "33.*$gdb_prompt $" {
|
||||||
# sometimes we stop at the closing brace, if so, do another next
|
# sometimes we stop at the closing brace, if so, do another next
|
||||||
send_gdb "next\n"
|
if { $nexted } {
|
||||||
gdb_expect {
|
fail "step out of main"
|
||||||
-re ".*Unable to find return pc for this frame.*$gdb_prompt $" {
|
} else {
|
||||||
fail "step out of main (Old bug came back!)"
|
set nexted 1
|
||||||
gdb_test "n" ".*" ""
|
send_gdb "next\n"
|
||||||
}
|
exp_continue
|
||||||
-re ".*in.*start.*$gdb_prompt $" {
|
|
||||||
pass "step out of main"
|
|
||||||
}
|
|
||||||
-re ".*in.*bsp_trap.*$gdb_prompt $" {
|
|
||||||
pass "step out of main"
|
|
||||||
}
|
|
||||||
-re ".*in.*init.*$gdb_prompt $" {
|
|
||||||
# This is what happens on sparc64-elf ultra.
|
|
||||||
pass "step out of main"
|
|
||||||
}
|
|
||||||
-re ".*in.*dll_crt0_1.*$gdb_prompt $" {
|
|
||||||
# This is what happens on Cygwin.
|
|
||||||
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 $" {
|
|
||||||
# This is what happens on Solaris currently -sts 1999-08-25
|
|
||||||
pass "step out of main (on Solaris)"
|
|
||||||
}
|
|
||||||
-re ".*in _int_reset ().*$gdb_prompt $" {
|
|
||||||
# This is what happens on Sanyo XStormy16
|
|
||||||
pass "step out of main"
|
|
||||||
}
|
|
||||||
-re ".*init ().*$gdb_prompt $" {
|
|
||||||
# This is what happens on many Mips targets
|
|
||||||
pass "step out of main"
|
|
||||||
}
|
|
||||||
-re ".*in ..change.mode ().*$gdb_prompt $" {
|
|
||||||
# This is what happens on ARM in thumb mode -fn 2000-02-01
|
|
||||||
pass "step out of main (on ARM thumb)"
|
|
||||||
}
|
|
||||||
-re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" {
|
|
||||||
pass "step out of main"
|
|
||||||
}
|
|
||||||
-re ".*in __wrap__?main ().*$gdb_prompt $" {
|
|
||||||
pass "step out of main (status wrapper)"
|
|
||||||
}
|
|
||||||
-re "__setup_argv_for_main (.*).*$gdb_prompt $" {
|
|
||||||
# On sh, another wrapper function (start_l) exists, so
|
|
||||||
# another `next' is necessary.
|
|
||||||
gdb_test "next" ".*in start_l ().*" "step out of main (on sh)"
|
|
||||||
}
|
|
||||||
-re ".*$gdb_prompt $" { fail "step out of main (at end 2)" }
|
|
||||||
timeout {
|
|
||||||
fail "step out of main (hang or timeout on step at end 2)"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-re ".*Unable to find return pc for this frame.*$gdb_prompt $" {
|
-re ".*Unable to find return pc for this frame.*$gdb_prompt $" {
|
||||||
fail "Old bug came back!"
|
fail "step out of main"
|
||||||
gdb_test "n" ".*" ""
|
gdb_test "n" ".*" ""
|
||||||
}
|
}
|
||||||
-re ".*in.*start.*$gdb_prompt $" {
|
-re ".*in.*start.*$gdb_prompt $" {
|
||||||
pass "step out of main"
|
pass "step out of main"
|
||||||
}
|
}
|
||||||
-re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" {
|
-re ".*in.*bsp_trap.*$gdb_prompt $" {
|
||||||
pass "step out of main (2)"
|
pass "step out of main"
|
||||||
|
}
|
||||||
|
-re ".*in.*init.*$gdb_prompt $" {
|
||||||
|
# This is what happens on sparc64-elf ultra.
|
||||||
|
pass "step out of main"
|
||||||
|
}
|
||||||
|
-re ".*in.*dll_crt0_1.*$gdb_prompt $" {
|
||||||
|
# This is what happens on Cygwin.
|
||||||
|
pass "step out of main"
|
||||||
}
|
}
|
||||||
-re ".*Program exited normally.*$gdb_prompt $" {
|
-re ".*Program exited normally.*$gdb_prompt $" {
|
||||||
# This is what happens on Linux i86 (and I would expect others)
|
# This is what happens on Linux i86 (and I would expect others)
|
||||||
set program_exited 1
|
set program_exited 1
|
||||||
pass "step out of main"
|
pass "step out of main"
|
||||||
}
|
}
|
||||||
|
-re ".*in .nope ().*$gdb_prompt $" {
|
||||||
|
# This is what happens on Solaris currently -sts 1999-08-25
|
||||||
|
pass "step out of main"
|
||||||
|
}
|
||||||
|
-re ".*in _int_reset ().*$gdb_prompt $" {
|
||||||
|
# This is what happens on Sanyo XStormy16
|
||||||
|
pass "step out of main"
|
||||||
|
}
|
||||||
|
-re ".*init ().*$gdb_prompt $" {
|
||||||
|
# This is what happens on many Mips targets
|
||||||
|
pass "step out of main"
|
||||||
|
}
|
||||||
|
-re ".*in ..change.mode ().*$gdb_prompt $" {
|
||||||
|
# This is what happens on ARM in thumb mode -fn 2000-02-01
|
||||||
|
pass "step out of main"
|
||||||
|
}
|
||||||
|
-re ".*__rt_entry ().*$gdb_prompt $" {
|
||||||
|
# This is what happens on the ARM RVDS runtime
|
||||||
|
pass "step out of main"
|
||||||
|
}
|
||||||
|
-re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" {
|
||||||
|
pass "step out of main"
|
||||||
|
}
|
||||||
|
-re ".*in __wrap__?main ().*$gdb_prompt $" {
|
||||||
|
pass "step out of main"
|
||||||
|
}
|
||||||
|
-re "__setup_argv_for_main (.*).*$gdb_prompt $" {
|
||||||
|
# On sh, another wrapper function (start_l) exists, so
|
||||||
|
# another `next' is necessary.
|
||||||
|
gdb_test "next" ".*in start_l ().*" "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"
|
||||||
|
}
|
||||||
|
-re "_*start\[0-9\]* \\(\[^)\]*\\).*$gdb_prompt $" {
|
||||||
|
pass "step out of main"
|
||||||
}
|
}
|
||||||
-re ".*Program received signal SIGTRAP.*$gdb_prompt $" {
|
-re ".*Program received signal SIGTRAP.*$gdb_prompt $" {
|
||||||
pass "Cygmon stopped in ending trap."
|
pass "step out of main"
|
||||||
}
|
}
|
||||||
-re ".*$gdb_prompt $" { fail "step out of main (at end 1)" }
|
-re ".*$gdb_prompt $" { fail "step out of main" }
|
||||||
timeout { fail "step out of main (hang or timeout on step at end 1)" }
|
timeout { fail "step out of main" }
|
||||||
}
|
}
|
||||||
|
|
||||||
# When we're talking to a program running on a real stand-alone board,
|
# When we're talking to a program running on a real stand-alone board,
|
||||||
|
Reference in New Issue
Block a user