aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2000-04-24 21:32:51 +0000
committerMichael Snyder <msnyder@vmware.com>2000-04-24 21:32:51 +0000
commitb84b7669fb731a8b47f1f95860c1cf121de5c0e1 (patch)
tree63243aca5a8cbbb164f7986d427c695956e0309e /gdb/testsuite
parent447b43fa50e946d7287d01679839b0c476a2f941 (diff)
downloadgdb-b84b7669fb731a8b47f1f95860c1cf121de5c0e1.zip
gdb-b84b7669fb731a8b47f1f95860c1cf121de5c0e1.tar.gz
gdb-b84b7669fb731a8b47f1f95860c1cf121de5c0e1.tar.bz2
2000-04-24 Michael Snyder <msnyder@seadog.cygnus.com>
* gdb.base/miscexprs.exp: make sizeof long array test portable. * 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'.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog10
-rw-r--r--gdb/testsuite/gdb.base/ending-run.exp29
-rw-r--r--gdb/testsuite/gdb.base/miscexprs.exp23
3 files changed, 34 insertions, 28 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 85052b9..8218c23 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2000-04-24 Michael Snyder <msnyder@seadog.cygnus.com>
+
+ * gdb.base/miscexprs.exp: make sizeof long array test portable.
+
+ * 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'.
+
2000-04-17 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdb.base/help.exp: Update output for add-symbol-file command.
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
index ec0ea64..089a8a5 100644
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -51,12 +51,16 @@ gdb_load ${binfile}
# 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.*"
+
+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 31" ".*Breakpoint.*3.*"
+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,11 +80,12 @@ gdb_expect {
# 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"
+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 13\n"
+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,12 +97,12 @@ gdb_expect {
}
}
-send_gdb "inf line 14\n"
+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 14" ".*Breakpoint.*7.*"
- gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint.*8.*"
+ 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"
}
@@ -141,6 +146,10 @@ gdb_expect {
-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 $" {
# This is what happens on Solaris currently -sts 1999-08-25
pass "step out of main on Solaris"
diff --git a/gdb/testsuite/gdb.base/miscexprs.exp b/gdb/testsuite/gdb.base/miscexprs.exp
index 9778423..f7a5fd2 100644
--- a/gdb/testsuite/gdb.base/miscexprs.exp
+++ b/gdb/testsuite/gdb.base/miscexprs.exp
@@ -258,27 +258,14 @@ gdb_expect {
}
-if [istarget "hppa2.0w*-*-*"] then {
-send_gdb "print sizeof(lbig)\n"
+send_gdb "print sizeof(lbig)/sizeof(long)\n"
gdb_expect {
- -re ".\[0-9\]* = 7200.*$gdb_prompt $" {
- pass "print value of sizeof(lbig)"
+ -re ".\[0-9\]* = 900.*$gdb_prompt $" {
+ pass "print value of sizeof(lbig)/sizeof(long)"
}
- -re ".*$gdb_prompt $" { fail "print value of sizeof(lbig)" }
- timeout { fail "(timeout) print value of sizeof(lbig)" }
+ -re ".*$gdb_prompt $" { fail "print value of sizeof(lbig)/sizeof(long)" }
+ timeout { fail "(timeout) print value of sizeof(lbig)/sizeof(long)" }
}
-}
-
-if ![istarget "hppa2.0w*-*-*"] then {
-send_gdb "print sizeof(lbig)\n"
-gdb_expect {
- -re ".\[0-9\]* = 3600.*$gdb_prompt $" {
- pass "print value of sizeof(lbig)"
- }
- -re ".*$gdb_prompt $" { fail "print value of sizeof(lbig)" }
- timeout { fail "(timeout) print value of sizeof(lbig)" }
- }
-}
send_gdb "print ibig.i\[100\] << 2\n"
gdb_expect {