aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-05-21 16:40:05 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-05-21 16:40:05 +0000
commitb1285bd9ebf4509d251930290e0a825854f593d5 (patch)
tree737bdadd1b539d7e116e4b5fc268a8a6fbe078c3 /gdb
parent1a8b5668494dd302e614481b0cfd573184334359 (diff)
downloadgdb-b1285bd9ebf4509d251930290e0a825854f593d5.zip
gdb-b1285bd9ebf4509d251930290e0a825854f593d5.tar.gz
gdb-b1285bd9ebf4509d251930290e0a825854f593d5.tar.bz2
Further revisions (for xcoff mostly) to test case logged in ChangeLog yesterday
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.stabs/wierd-xcoff.S11
-rw-r--r--gdb/testsuite/gdb.stabs/wierd.exp33
2 files changed, 40 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.stabs/wierd-xcoff.S b/gdb/testsuite/gdb.stabs/wierd-xcoff.S
index cdb5c13..b4d3a24 100644
--- a/gdb/testsuite/gdb.stabs/wierd-xcoff.S
+++ b/gdb/testsuite/gdb.stabs/wierd-xcoff.S
@@ -3,10 +3,13 @@
#define VAR(name) \
.globl name; \
- .csect .data[RW]; \
.align 1; \
name:; \
- .long 42; \
- .csect [PR]
-#define STAB(string,type,value) .stabx string,value,type
+ .long 42;
+#define STAB(string,type,value) .stabx string,value,type,0
+
+/* Put everything in this csect, which seems to make things work.
+ The compiler actually puts the stabs in .csect [PR], but that didn't
+ work here (I guess because there is no text section). */
+ .csect .data[RW]
#include "wierd.def"
diff --git a/gdb/testsuite/gdb.stabs/wierd.exp b/gdb/testsuite/gdb.stabs/wierd.exp
index 03256a0..f0af049 100644
--- a/gdb/testsuite/gdb.stabs/wierd.exp
+++ b/gdb/testsuite/gdb.stabs/wierd.exp
@@ -18,6 +18,8 @@ if ![file exists $binfile] then {
alldone
}
+# xcoffread.c wrongly bitches about the lack of a text section.
+setup_xfail "rs*-*-aix*"
send "file $binfile\n"
expect {
-re "^file $binfile\r*\nReading symbols from $binfile\.\.\.done\.\r*\n$prompt $" {
@@ -54,6 +56,23 @@ proc print_wierd_var { var } {
}
timeout { fail "variable $var not printed (timeout)" }
}
+
+ # Currently one of these symbols gives an error() in symbol
+ # reading, which causes any attempt to read (full, not
+ # partial) symbols for the file to lose.
+ setup_xfail "*-*-*"
+
+ # Make sure that the stabs did get loaded in a sensible way.
+ # If somehow the stabs got skipped, then the above test can
+ # pass because GDB assumes int for variables without a stab.
+
+ send "whatis $var\n"
+ expect {
+ -re "type = unsigned int.*$prompt $" {pass "whatis on $var"}
+ -re "type = inttype.*$prompt $" {pass "whatis on $var"}
+ -re "$prompt $" {fail "whatis on $var"}
+ timeout {fail "whatis on $var"}
+ }
}
print_wierd_var var0
@@ -144,6 +163,20 @@ print_wierd_var attr124
print_wierd_var attr125
print_wierd_var attr126
+# Currently one of these symbols gives an error() in symbol
+# reading, which causes any attempt to read (full, not
+# partial) symbols for the file to lose.
+setup_xfail "*-*-*"
+
+# One last test, while we're at it.
+send "ptype inttype\n"
+expect {
+ -re "type = unsigned int.*$prompt $" {pass "ptype on inttype"}
+ -re "type = inttype.*$prompt $" {pass "ptype on inttype"}
+ -re "$prompt $" {fail "ptype on inttype"}
+ timeout {fail "ptype on inttype"}
+}
+
#Prevent some failures in default.exp, which are probably GDB bugs
# (but trivial ones).
gdb_exit