diff options
author | Luis Machado <luisgpm@br.ibm.com> | 2008-01-09 13:47:59 +0000 |
---|---|---|
committer | Luis Machado <luisgpm@br.ibm.com> | 2008-01-09 13:47:59 +0000 |
commit | 0aea4bf3547a3d9eb1dfdd0d6ee692e9db6a13f2 (patch) | |
tree | cd8b5ba75b2b3020421ca72704e844c3451e6cec /gdb/testsuite/gdb.base/printcmds.exp | |
parent | d2e2e64908d10fe34d4c6763c92c21cd29ac4a80 (diff) | |
download | gdb-0aea4bf3547a3d9eb1dfdd0d6ee692e9db6a13f2.zip gdb-0aea4bf3547a3d9eb1dfdd0d6ee692e9db6a13f2.tar.gz gdb-0aea4bf3547a3d9eb1dfdd0d6ee692e9db6a13f2.tar.bz2 |
* printcmd.c (printf_command): Add seen_big_h, seen_big_d and
seen_double_big_d, treat the new H, D, and DD modifiers as length
modifiers.
* doc/gdb.texinfo (Output): Update documentation on using printf with DFP
types.
* testsuite/gdb.base/printcmds.exp (test_printf_with_dfp): Update
printf calls with required float modifiers.
Diffstat (limited to 'gdb/testsuite/gdb.base/printcmds.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/printcmds.exp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index 36bda54..bad73be 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -674,49 +674,49 @@ proc test_printf_with_dfp {} { # Test various dfp values, covering 32-bit, 64-bit and 128-bit ones # _Decimal32 constants, which can support up to 7 digits - gdb_test "printf \"%H\\n\",1.2df" "1.2" - gdb_test "printf \"%H\\n\",-1.2df" "-1.2" - gdb_test "printf \"%H\\n\",1.234567df" "1.234567" - gdb_test "printf \"%H\\n\",-1.234567df" "-1.234567" - gdb_test "printf \"%H\\n\",1234567.df" "1234567" - gdb_test "printf \"%H\\n\",-1234567.df" "-1234567" + gdb_test "printf \"%Hf\\n\",1.2df" "1.2" + gdb_test "printf \"%Hf\\n\",-1.2df" "-1.2" + gdb_test "printf \"%Hf\\n\",1.234567df" "1.234567" + gdb_test "printf \"%Hf\\n\",-1.234567df" "-1.234567" + gdb_test "printf \"%Hf\\n\",1234567.df" "1234567" + gdb_test "printf \"%Hf\\n\",-1234567.df" "-1234567" - gdb_test "printf \"%H\\n\",1.2E1df" "12" - gdb_test "printf \"%H\\n\",1.2E10df" "1.2E\\+10" - gdb_test "printf \"%H\\n\",1.2E-10df" "1.2E-10" + gdb_test "printf \"%Hf\\n\",1.2E1df" "12" + gdb_test "printf \"%Hf\\n\",1.2E10df" "1.2E\\+10" + gdb_test "printf \"%Hf\\n\",1.2E-10df" "1.2E-10" # The largest exponent for 32-bit dfp value is 96. - gdb_test "printf \"%H\\n\",1.2E96df" "1.200000E\\+96" + gdb_test "printf \"%Hf\\n\",1.2E96df" "1.200000E\\+96" # _Decimal64 constants, which can support up to 16 digits - gdb_test "printf \"%D\\n\",1.2dd" "1.2" - gdb_test "printf \"%D\\n\",-1.2dd" "-1.2" - gdb_test "printf \"%D\\n\",1.234567890123456dd" "1.234567890123456" - gdb_test "printf \"%D\\n\",-1.234567890123456dd" "-1.234567890123456" - gdb_test "printf \"%D\\n\",1234567890123456.dd" "1234567890123456" - gdb_test "printf \"%D\\n\",-1234567890123456.dd" "-1234567890123456" + gdb_test "printf \"%Df\\n\",1.2dd" "1.2" + gdb_test "printf \"%Df\\n\",-1.2dd" "-1.2" + gdb_test "printf \"%Df\\n\",1.234567890123456dd" "1.234567890123456" + gdb_test "printf \"%Df\\n\",-1.234567890123456dd" "-1.234567890123456" + gdb_test "printf \"%Df\\n\",1234567890123456.dd" "1234567890123456" + gdb_test "printf \"%Df\\n\",-1234567890123456.dd" "-1234567890123456" - gdb_test "printf \"%D\\n\",1.2E1dd" "12" - gdb_test "printf \"%D\\n\",1.2E10dd" "1.2E\\+10" - gdb_test "printf \"%D\\n\",1.2E-10dd" "1.2E-10" + gdb_test "printf \"%Df\\n\",1.2E1dd" "12" + gdb_test "printf \"%Df\\n\",1.2E10dd" "1.2E\\+10" + gdb_test "printf \"%Df\\n\",1.2E-10dd" "1.2E-10" # The largest exponent for 64-bit dfp value is 384. - gdb_test "printf \"%D\\n\",1.2E384dd" "1.200000000000000E\\+384" + gdb_test "printf \"%Df\\n\",1.2E384dd" "1.200000000000000E\\+384" # _Decimal128 constants, which can support up to 34 digits - gdb_test "printf \"%DD\\n\",1.2dl" "1.2" - gdb_test "printf \"%DD\\n\",-1.2dl" "-1.2" - gdb_test "printf \"%DD\\n\",1.234567890123456789012345678901234dl" "1.234567890123456789012345678901234" - gdb_test "printf \"%DD\\n\",-1.234567890123456789012345678901234dl" "-1.234567890123456789012345678901234" - gdb_test "printf \"%DD\\n\",1234567890123456789012345678901234.dl" "1234567890123456789012345678901234" - gdb_test "printf \"%DD\\n\",-1234567890123456789012345678901234.dl" "-1234567890123456789012345678901234" + gdb_test "printf \"%DDf\\n\",1.2dl" "1.2" + gdb_test "printf \"%DDf\\n\",-1.2dl" "-1.2" + gdb_test "printf \"%DDf\\n\",1.234567890123456789012345678901234dl" "1.234567890123456789012345678901234" + gdb_test "printf \"%DDf\\n\",-1.234567890123456789012345678901234dl" "-1.234567890123456789012345678901234" + gdb_test "printf \"%DDf\\n\",1234567890123456789012345678901234.dl" "1234567890123456789012345678901234" + gdb_test "printf \"%DDf\\n\",-1234567890123456789012345678901234.dl" "-1234567890123456789012345678901234" - gdb_test "printf \"%DD\\n\",1.2E1dl" "12" - gdb_test "printf \"%DD\\n\",1.2E10dl" "1.2E\\+10" - gdb_test "printf \"%DD\\n\",1.2E-10dl" "1.2E-10" + gdb_test "printf \"%DDf\\n\",1.2E1dl" "12" + gdb_test "printf \"%DDf\\n\",1.2E10dl" "1.2E\\+10" + gdb_test "printf \"%DDf\\n\",1.2E-10dl" "1.2E-10" # The largest exponent for 128-bit dfp value is 6144. - gdb_test "printf \"%DD\\n\",1.2E6144dl" "1.200000000000000000000000000000000E\\+6144" + gdb_test "printf \"%DDf\\n\",1.2E6144dl" "1.200000000000000000000000000000000E\\+6144" } # Escape a left curly brace to prevent it from being interpreted as |