From: Yao Qi Date: Tue, 14 Dec 2010 01:11:00 +0000 (+0000) Subject: 2010-12-14 Yao Qi X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=612750efccd56f3d13bbcc680a709f414d4329b2;p=thirdparty%2Fbinutils-gdb.git 2010-12-14 Yao Qi Backport from mainline: 2010-09-02 Jan Kratochvil * 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. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f1541496706..93f1a88e5e0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2010-12-14 Yao Qi + + Backport from mainline: + + 2010-09-02 Jan Kratochvil + * 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 * gdb.trace/tsv.exp: Test print command on trace state variables. diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index c602a8b8e13..bc3cd6add3f 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -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.