From: Fernando Nasser <fnasser@redhat.com>
To: Michael Snyder <msnyder@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fixup long_long.exp for 4-byte short
Date: Wed, 23 May 2001 09:24:00 -0000 [thread overview]
Message-ID: <3B0BE38A.4D5F91C@redhat.com> (raw)
In-Reply-To: <3B096162.3B153EA0@cygnus.com>
Michael Snyder wrote:
>
> Along the same lines as one of Stephane Carrez's recent submissions:
>
Approved. Thanks Michael.
P.S.: I will look for Stephane's patch(es). They may have come while I
was away.
> ------------------------------------------------------------------------
> 2001-05-21 Michael Snyder <msnyder@redhat.com>
>
> * gdb.base/long_long.exp: Allow for targets with 4-byte short.
>
> Index: long_long.exp
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/long_long.exp,v
> retrieving revision 1.10
> diff -c -3 -p -r1.10 long_long.exp
> *** long_long.exp 2001/03/26 19:55:25 1.10
> --- long_long.exp 2001/05/21 18:37:45
> *************** gdb_expect {
> *** 85,90 ****
> --- 85,100 ----
> 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
> *************** if { $target_bigendian_p } {
> *** 172,185 ****
>
> }
>
> ! 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/a *(short *)&oct" ".*0xf*ffffa72e.*"
> ! gdb_test "p/f *(short *)&oct" ".*-22738.*"
>
> gdb_test "x/x &oct" ".*0xa72ee539.*"
> gdb_test "x/d &oct" ".*.-1490098887*"
> --- 182,204 ----
>
> }
>
> ! 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*"
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
prev parent reply other threads:[~2001-05-23 9:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-21 11:41 Michael Snyder
2001-05-23 9:24 ` Fernando Nasser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B0BE38A.4D5F91C@redhat.com \
--to=fnasser@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox