Fix two regressions in scalar printing
authorTom Tromey <tom@tromey.com>
Tue, 11 Jul 2017 12:40:40 +0000 (06:40 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 14 Aug 2017 16:14:05 +0000 (10:14 -0600)
commitd6382fffde99214ce4aee99a208ddb703c647008
tree91590151181ced3a46bf0dc6ea123036198bea30
parentf978cb06dbfbd93dbd52bd39d992f8644b0c639e
Fix two regressions in scalar printing

PR gdb/21675 points out a few regressions in scalar printing.

One type of regression is due to not carrying over the old handling of
floating point printing -- where a format like "/d" causes a floating
point number to first be cast to a signed integer.  This patch restores
this behavior.

The other regression is a longstanding bug in print_octal_chars: one of
the constants was wrong.  This patch fixes the constant and adds static
asserts to help catch this sort of error.

ChangeLog
2017-08-14  Tom Tromey  <tom@tromey.com>

PR gdb/21675
* valprint.c (LOW_ZERO): Change value to 034.
(print_octal_chars): Add static_asserts for octal constants.
* printcmd.c (print_scalar_formatted): Add 'd' case.

testsuite/ChangeLog
2017-08-14  Tom Tromey  <tom@tromey.com>

PR gdb/21675:
* gdb.base/printcmds.exp (test_radices): New function.
* gdb.dwarf2/var-access.exp: Use p/u, not p/d.
* gdb.base/sizeof.exp (check_valueof): Use p/d.
* lib/gdb.exp (get_integer_valueof): Use p/d.
gdb/ChangeLog
gdb/printcmd.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/printcmds.exp
gdb/testsuite/gdb.base/sizeof.exp
gdb/testsuite/gdb.dwarf2/var-access.exp
gdb/valprint.c
This page took 0.041649 seconds and 4 git commands to generate.