A testsuite fix-up (attn: David Taylor)
msnyder@cygnus.com
msnyder@cygnus.com
Mon Apr 24 12:18:00 GMT 2000
David, it looks like you authored this test originally (or at least)
checked it in). These changes make it run better on remote targets.
2000-04-24 Michael Snyder <msnyder@seadog.cygnus.com>
* gdb.base/ending-run.exp: After connecting to a remote target,
but before running, the target will appear to be in a random
location. Specify both a file and a line for breakpoints.
Also, the function that calls main may be called 'init'
rather than 'start'.
Index: ending-run.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ending-run.exp,v
retrieving revision 1.1.1.9
diff -c -r1.1.1.9 ending-run.exp
*** ending-run.exp 2000/02/03 04:14:44 1.1.1.9
--- ending-run.exp 2000/04/24 19:15:15
***************
*** 51,62 ****
# first line in the routine, which turns out to correspond
# to the prolog--that's another bug...)
#
- gdb_test "b 1" ".*Breakpoint.*line 1.*" "bpt at line before routine"
- gdb_test "b 13" ".*Note.*also.*Breakpoint.*2.*"
# Set up to go to the next-to-last line of the program
#
! gdb_test "b 31" ".*Breakpoint.*3.*"
# Expect to hit the bp at line "1", but symbolize this
# as line "13". Then try to clear it--this should work.
--- 51,66 ----
# first line in the routine, which turns out to correspond
# to the prolog--that's another bug...)
#
+ gdb_test "b ending-run.c:1" ".*Breakpoint.*ending-run.c, line 1.*" \
+ "bpt at line before routine"
+
+ gdb_test "b ending-run.c:13" \
+ ".*Note.*also.*Breakpoint 2.*ending-run.c, line 13.*"
+
# Set up to go to the next-to-last line of the program
#
! gdb_test "b ending-run.c:31" ".*Breakpoint 3.*ending-run.c, line 31.*"
# Expect to hit the bp at line "1", but symbolize this
# as line "13". Then try to clear it--this should work.
***************
*** 76,86 ****
# Test some other "clear" combinations
#
! gdb_test "b 1" ".*Breakpoint.*4.*"
! gdb_test "b 13" ".*Note.*also.*Breakpoint.*5.*"
! gdb_test "cle 13" ".*Deleted breakpoint 5.*" "Only cleared 1 by line"
! send_gdb "inf line 13\n"
gdb_expect {
-re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" {
set line_eight $expect_out(1,string)
--- 80,91 ----
# Test some other "clear" combinations
#
! gdb_test "b ending-run.c:1" ".*Breakpoint.*4.*"
! gdb_test "b ending-run.c:13" ".*Note.*also.*Breakpoint.*5.*"
! gdb_test "cle ending-run.c:13" \
! ".*Deleted breakpoint 5.*" "Only cleared 1 by line"
! send_gdb "inf line ending-run.c:13\n"
gdb_expect {
-re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" {
set line_eight $expect_out(1,string)
***************
*** 92,103 ****
}
}
! send_gdb "inf line 14\n"
gdb_expect {
-re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" {
set line_nine $expect_out(1,string)
! gdb_test "b 14" ".*Breakpoint.*7.*"
! gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint.*8.*"
gdb_test "c" ".*Breakpoint.*7.*callee.*14.*"
gdb_test "cle" ".*Deleted breakpoints 8 7.*" "Clear 2 by default"
}
--- 97,108 ----
}
}
! send_gdb "inf line ending-run.c:14\n"
gdb_expect {
-re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" {
set line_nine $expect_out(1,string)
! gdb_test "b ending-run.c:14" ".*Breakpoint 7.*ending-run.c, line 14.*"
! gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint 8.*"
gdb_test "c" ".*Breakpoint.*7.*callee.*14.*"
gdb_test "cle" ".*Deleted breakpoints 8 7.*" "Clear 2 by default"
}
***************
*** 139,144 ****
--- 144,153 ----
gdb_test "n" ".*" ""
}
-re ".*in.*start.*$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 .nope ().*$gdb_prompt $" {
More information about the Gdb-patches
mailing list