From: Andrew Cagney <cagney@gnu.org>
To: Felix Lee <felix.1@canids.net>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa] long_long.exp, spurious p/a fails
Date: Thu, 11 Nov 2004 16:49:00 -0000 [thread overview]
Message-ID: <419397C0.2060901@gnu.org> (raw)
In-Reply-To: <20041108001352.0343E502AB5@stray.canids>
Felix Lee wrote:
> gdb.base/long_long.exp has a number of tests like
>
> p/a *(short *)s
> $40 = 0x123
> (gdb) PASS: gdb.base/long_long.exp: p/a *(short *)s
>
> in some rare situations, p/a will print a symbolic name, like so
>
> $40 = 0x123 <data.0+255>
>
> which is unexpected, and becomes a false FAIL.
Tested on? (Ok MichaelC, going to laugh at me doing this :-)
Can you post what you tested this on (so we've a baseline).
The test is checking our long-long value manipulation, not symbol
weirdness. A comment explaining this in the code would help though. So
with named test system, and a quick comment, ok.
Just also post the final patch.
Andrew
> testsuite/ChangeLog
> 2004-11-07 Felix Lee <felix+log1@specifixinc.com>
>
> * gdb.base/long_long.exp: Ignore symbolic name from "p/a".
>
> --- long_long.exp.~1.15.~ 2004-06-16 08:19:41.000000000 -0700
> +++ long_long.exp 2004-11-07 15:57:45.000000000 -0800
> @@ -197,7 +197,7 @@ gdb_test "p/d val.oct" "-639992598547416
> gdb_test "p/u val.oct" "12046818088235383159"
> gdb_test "p/o val.oct" ""
> gdb_test "p/t val.oct" "1010011100101110111001010011100101110111000001010011100101110111"
> -gdb_test_ptr "p/a val.oct" "" "" "0x77053977" "0xa72ee53977053977"
> +gdb_test_ptr "p/a val.oct" "" "" "0x77053977( <\[^>]+>)?" "0xa72ee53977053977( <\[^>]+>)?"
> gdb_test "p/c val.oct" "'w'"
>
> if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
> @@ -224,7 +224,7 @@ gdb_test_char "p/d *(char *)c" "1"
> gdb_test_char "p/u *(char *)c" "1"
> gdb_test_char "p/o *(char *)c" "01"
> gdb_test_char "p/t *(char *)c" "1"
> -gdb_test_char "p/a *(char *)c" "0x1"
> +gdb_test_char "p/a *(char *)c" "0x1( <\[^>]+>)?"
> gdb_test_char "p/f *(char *)c" "1"
> gdb_test_char "p/c *(char *)c" "1 '.001'"
>
> @@ -233,7 +233,7 @@ gdb_test_short "p/d *(short *)s" "" "291
> gdb_test_short "p/u *(short *)s" "" "291" ""
> gdb_test_short "p/o *(short *)s" "" "0443" ""
> gdb_test_short "p/t *(short *)s" "" "100100011" ""
> -gdb_test_short "p/a *(short *)s" "" "0x123" ""
> +gdb_test_short "p/a *(short *)s" "" "0x123( <\[^>]+>)?" ""
> gdb_test_short "p/f *(short *)s" "" "291" ""
> gdb_test_short "p/c *(short *)s" "" "35 '.'" ""
>
> @@ -242,7 +242,7 @@ gdb_test_int "p/d *(int *)i" "" "291" "1
> gdb_test_int "p/u *(int *)i" "" "291" "19088743" ""
> gdb_test_int "p/o *(int *)i" "" "0443" "0110642547" ""
> gdb_test_int "p/t *(int *)i" "" "100100011" "1001000110100010101100111" ""
> -gdb_test_int "p/a *(int *)i" "" "" "0x1234567" ""
> +gdb_test_int "p/a *(int *)i" "" "" "0x1234567( <\[^>]+>)?" ""
> gdb_test_int "p/f *(int *)i" "" "291" "2.99881655e-38" ""
> gdb_test_int "p/c *(int *)i" "" "35 '.'" "103 'g'" ""
>
> @@ -251,7 +251,7 @@ gdb_test_long "p/d *(long *)l" "" "291"
> gdb_test_long "p/u *(long *)l" "" "291" "19088743" "81985529216486895"
> gdb_test_long "p/o *(long *)l" "" "0443" "0110642547" "04432126361152746757"
> gdb_test_long "p/t *(long *)l" "" "100100011" "1001000110100010101100111" "100100011010001010110011110001001101010111100110111101111"
> -gdb_test_ptr "p/a *(long *)l" "" "" "0x1234567" "0x123456789abcdef"
> +gdb_test_ptr "p/a *(long *)l" "" "" "0x1234567( <\[^>]+>)?" "0x123456789abcdef( <\[^>]+>)?"
> gdb_test_long "p/f *(long *)l" "" "291" "2.99881655e-38" "3.5127005640885037e-303"
> gdb_test_long "p/c *(long *)l" "" "35 '.'" "103 'g'" "-17 '.*'"
>
> @@ -260,7 +260,7 @@ gdb_test_long_long "p/d *(long long *)ll
> gdb_test_long_long "p/u *(long long *)ll" "" "" "" "81985529216486895"
> gdb_test_long_long "p/o *(long long *)ll" "" "" "" "04432126361152746757"
> gdb_test_long_long "p/t *(long long *)ll" "" "" "" "100100011010001010110011110001001101010111100110111101111"
> -gdb_test_ptr "p/a *(long long *)ll" "" "" "0x89abcdef" "0x123456789abcdef"
> +gdb_test_ptr "p/a *(long long *)ll" "" "" "0x89abcdef( <\[^>]+>)?" "0x123456789abcdef( <\[^>]+>)?"
> gdb_test_long_long "p/f *(long long *)ll" "" "" "" "3.5127005640885037e-303"
> gdb_test_long_long "p/c *(long long *)ll" "" "" "" "-17 '.*'"
>
> @@ -272,7 +272,7 @@ gdb_test "x/d w" "19088743"
> gdb_test "x/u w" "19088743"
> gdb_test "x/o w" "0110642547"
> gdb_test "x/t w" "00000001001000110100010101100111"
> -gdb_test_xptr "x/a" { b "" } { h "" } { w "0x1234567" } { g "0x123456789abcdef" }
> +gdb_test_xptr "x/a" { b "" } { h "" } { w "0x1234567( <\[^>]+>)?" } { g "0x123456789abcdef( <\[^>]+>)?" }
> gdb_test "x/c b" "1 '.001'"
> if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
> gdb_test "x/f &val.oct" "-5.9822653797615723e-120"
prev parent reply other threads:[~2004-11-11 16:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-08 0:13 Felix Lee
2004-11-11 16:49 ` Andrew Cagney [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=419397C0.2060901@gnu.org \
--to=cagney@gnu.org \
--cc=felix.1@canids.net \
--cc=gdb-patches@sources.redhat.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