+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.
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 {} {
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.