aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-06-06 19:08:18 +0000
committerMichael Snyder <msnyder@vmware.com>2002-06-06 19:08:18 +0000
commitc15b0d21ff4f893b24241a07c2b6f655d2a9e4a1 (patch)
treec6456306e77d2e5bb8de7a4f60eaadb22f0c79c8 /gdb
parent7bd91a28ebed8a2d545c02a7f25b3a6c2daf8cfe (diff)
downloadgdb-c15b0d21ff4f893b24241a07c2b6f655d2a9e4a1.zip
gdb-c15b0d21ff4f893b24241a07c2b6f655d2a9e4a1.tar.gz
gdb-c15b0d21ff4f893b24241a07c2b6f655d2a9e4a1.tar.bz2
2002-06-06 Michael Snyder <msnyder@redhat.com>
* gdb.base/long_long.exp: Add check for sizeof (long double).
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/long_long.exp19
2 files changed, 17 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 220ec26..0bec1f1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-06-06 Michael Snyder <msnyder@redhat.com>
+
+ * gdb.base/long_long.exp: Add check for sizeof (long double).
+
2002-06-06 Michal Ludvig <mludvig@suse.cz>
* gdb.asm/asm-source.exp: Add x86-64 target.
diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp
index 7084a8d..55086d7 100644
--- a/gdb/testsuite/gdb.base/long_long.exp
+++ b/gdb/testsuite/gdb.base/long_long.exp
@@ -114,6 +114,14 @@ gdb_expect {
default { }
}
+set sizeof_long_double 8
+send_gdb "print sizeof(long double)\n"
+gdb_expect {
+ -re ".* = 4.*$gdb_prompt $" { set sizeof_long_double 4 }
+ -re ".*$gdb_prompt $" { }
+ default { }
+}
+
gdb_test "n 4" ".*38.*" "get to known place"
# Check the hack for long long prints.
@@ -146,11 +154,10 @@ if { $sizeof_ptr == 2 } {
}
gdb_test "p/c oct" ".*'w'.*"
-if { $sizeof_double == 8 } {
-
-# ARM floating point numbers are not strictly little endian or big endian,
-# but a hybrid. They are in little endian format with the two words
-# swapped in big endian format.
+if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
+ # ARM floating point numbers are not strictly little endian or big endian,
+ # but a hybrid. They are in little endian format with the two words
+ # swapped in big endian format.
if { [istarget "arm*-*-*"] || \
[istarget "xscale*-*-*"] || \
@@ -239,7 +246,7 @@ if { $target_bigendian_p } {
gdb_test "x/c &oct" ".*-89 .*"
# FIXME GDB's output is correct, but this longer match fails.
# gdb_test "x/c &oct" ".*-89 '\\\\247'.*"
- if { $sizeof_double == 8 } {
+ if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
gdb_test "x/f &oct" ".*-5.9822653797615723e-120.*"
} else {
gdb_test "x/f &oct" ".*-2.42716126e-15.*"