diff options
author | Michael Snyder <msnyder@vmware.com> | 2001-05-24 18:30:10 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2001-05-24 18:30:10 +0000 |
commit | 2caa35cb88a53794723bf0d6126ff6dae112753f (patch) | |
tree | 7fe4055939a61b887e8757d89b8fe80672d980f7 /gdb | |
parent | e027f3e8a4613fdc2a7db63dab2b723528445865 (diff) | |
download | gdb-2caa35cb88a53794723bf0d6126ff6dae112753f.zip gdb-2caa35cb88a53794723bf0d6126ff6dae112753f.tar.gz gdb-2caa35cb88a53794723bf0d6126ff6dae112753f.tar.bz2 |
2001-05-21 Michael Snyder <msnyder@redhat.com>
* gdb.base/long_long.exp: Allow for targets with 4-byte short.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/long_long.exp | 34 |
2 files changed, 31 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9e634bd..12214b0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -22,6 +22,10 @@ stop on the call statement as well as the statement after the call. +2001-05-21 Michael Snyder <msnyder@redhat.com> + + * gdb.base/long_long.exp: Allow for targets with 4-byte short. + 2001-05-10 Elena Zannoni <ezannoni@redhat.com> * gdb.base/completion.exp: Revamp test. Make it execute on all diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp index 87accdd..69a456b 100644 --- a/gdb/testsuite/gdb.base/long_long.exp +++ b/gdb/testsuite/gdb.base/long_long.exp @@ -85,6 +85,16 @@ gdb_expect { default { } } +# Detect targets with 4-byte shorts. Assume all others use 2-bytes. + +set sizeof_short 2 +send_gdb "print sizeof(short)\n" +gdb_expect { + -re ".* = 4.*$gdb_prompt $" { set sizeof_short 4 } + -re ".*$gdb_prompt $" { } + default { } +} + # Detect targets with 4-byte doubles. set sizeof_double 8 @@ -172,13 +182,23 @@ if { $target_bigendian_p } { } - gdb_test "p/d *(short *)&oct" ".*-22738.*" - gdb_test "p/u *(short *)&oct" ".*42798.*" - gdb_test "p/o *(short *)&oct" ".*0123456.*" - gdb_test "p/t *(short *)&oct" ".*1010011100101110.*" - gdb_test "p/a *(short *)&oct" ".*0xf*ffffa72e.*" - gdb_test "p/c *(short *)&oct" ".* 46 '.'.*" - gdb_test "p/f *(short *)&oct" ".*-22738.*" + if { $sizeof_short == 2 } { + gdb_test "p/d *(short *)&oct" ".*-22738.*" + gdb_test "p/u *(short *)&oct" ".*42798.*" + gdb_test "p/o *(short *)&oct" ".*0123456.*" + gdb_test "p/t *(short *)&oct" ".*1010011100101110.*" + gdb_test "p/a *(short *)&oct" ".*0xf*ffffa72e.*" + gdb_test "p/c *(short *)&oct" ".* 46 '.'.*" + gdb_test "p/f *(short *)&oct" ".*-22738.*" + } else { + gdb_test "p/d *(short *)&oct" ".*-1490098887.*" + gdb_test "p/u *(short *)&oct" ".*2804868409.*" + gdb_test "p/o *(short *)&oct" ".*024713562471.*" + gdb_test "p/t *(short *)&oct" ".*10100111001011101110010100111001.*" + gdb_test "p/a *(short *)&oct" ".*0xf*a72ee539.*" + gdb_test "p/c *(short *)&oct" ".* 57 '9'.*" + gdb_test "p/f *(short *)&oct" ".*-2.42716126e-15.*" + } gdb_test "x/x &oct" ".*0xa72ee539.*" gdb_test "x/d &oct" ".*.-1490098887*" |