[rfa] long_long.exp, spurious p/a fails

Felix Lee felix.1@canids.net
Mon Nov 8 00:13:00 GMT 2004


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.

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"



More information about the Gdb-patches mailing list