aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-02-11 22:04:58 +0000
committerDoug Evans <dje@google.com>2013-02-11 22:04:58 +0000
commitc2792f5a8f0273b6599c905ac107603b2000cc06 (patch)
tree94a0b89326c3dcc3988bce82658acb3b9be50b6c /gdb/testsuite
parentf5c033f1f3d7534aa9513c49a89d97ef0bd1cac3 (diff)
downloadgdb-c2792f5a8f0273b6599c905ac107603b2000cc06.zip
gdb-c2792f5a8f0273b6599c905ac107603b2000cc06.tar.gz
gdb-c2792f5a8f0273b6599c905ac107603b2000cc06.tar.bz2
* printcmd.c (printf_c_string,printf_wide_c_string): New functions.
(printf_decfloat): New function. Broken out from ui_printf. Remove unnecessary code to shift the entire format string down. (printf_pointer): New function. (ui_printf): Code to print C strings, wide C strings, decfloats, and pointers moved to separate functions.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp3
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 822e031..bdbc59a 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-11 Doug Evans <dje@google.com>
+
+ * gdb.base/printcmds.exp (test_printf_with_dfp): Add test for printing
+ two decfloats.
+
2013-02-11 Sergio Durigan Junior <sergiodj@redhat.com>
* gdb.base/bitfields.c (struct internalvartest): New declaration.
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index 735f563..e9e6146 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -770,6 +770,9 @@ proc test_printf_with_dfp {} {
# The largest exponent for 128-bit dfp value is 6144.
gdb_test "printf \"%DDf\\n\",1.2E6144dl" "1.200000000000000000000000000000000E\\+6144"
+
+ # GDB used to get this wrong.
+ gdb_test "printf \"%Hf %Hf\\n\",1.2df,1.3df" "1.2 1.3"
}
proc test_print_symbol {} {