]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2010-12-14 Yao Qi <yao@codesourcery.com>
authorYao Qi <yao@codesourcery.com>
Tue, 14 Dec 2010 01:11:00 +0000 (01:11 +0000)
committerYao Qi <yao@codesourcery.com>
Tue, 14 Dec 2010 01:11:00 +0000 (01:11 +0000)
        Backport from mainline:

        2010-09-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
        * gdb.base/printcmds.exp (test_float_accepted): Import gdb_prompt.
        Move here, negate and extend by XFAIL the "p 0x1.1" test from ...
        (test_float_rejected): ... here.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/printcmds.exp

index f15414967067f9c442c9d4c0ecf8af7b9eec1d40..93f1a88e5e0787ac95090672bdae5f7a28d77873 100644 (file)
@@ -1,3 +1,12 @@
+2010-12-14  Yao Qi  <yao@codesourcery.com>
+
+       Backport from mainline:
+
+       2010-09-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
+       * gdb.base/printcmds.exp (test_float_accepted): Import gdb_prompt.
+       Move here, negate and extend by XFAIL the "p 0x1.1" test from ... 
+       (test_float_rejected): ... here.
+
 2010-12-12  Stan Shebs  <stan@codesourcery.com>
 
        * gdb.trace/tsv.exp: Test print command on trace state variables.
index c602a8b8e13be126e20682c9de1cf18b11b21dd7..bc3cd6add3ff2ea97898dc8d212165b9531645e3 100644 (file)
@@ -85,6 +85,18 @@ proc test_integer_literals_accepted {} {
     gdb_test "p 0b1111" " = 15"
     gdb_test "p 0B1111" " = 15"
     gdb_test "p -0b1111" " = -15"
+
+    # Test hexadecimal floating point.
+    set test "p 0x1.1"
+    gdb_test_multiple $test $test {
+       -re " = 1\\.0625\r\n$gdb_prompt $" {
+           pass $test
+       }
+       -re "Invalid number \"0x1\\.1\"\\.\r\n$gdb_prompt $" {
+           # Older glibc does not support hex float, newer does.
+           xfail $test
+       }
+    }
 }
 
 proc test_character_literals_accepted {} {
@@ -128,7 +140,6 @@ proc test_integer_literals_rejected {} {
     test_print_reject "p 123DEADBEEF"
     test_print_reject "p 123foobar.bazfoo3"
     test_print_reject "p 123EEEEEEEEEEEEEEEEE33333k333"
-    test_print_reject "p 0x1.1"
     gdb_test "p 123.4+56.7" "180.(099\[0-9]*|100\[0-9\]*)" "check for floating addition"
 
     # Test various octal values.