gdb: Avoid trailing whitespace when pretty printing
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 21 Mar 2019 12:25:47 +0000 (12:25 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 26 Mar 2019 18:23:49 +0000 (18:23 +0000)
commit18c77628b1e97e412561029ec20195c1ffa61b2d
tree6c79f1c4d04742d7a5380a3821de691f35647b6a
parent53c973f200e39c4122e0db06a94e3a0079e6de80
gdb: Avoid trailing whitespace when pretty printing

While writing a new test for 'set print pretty on' I spotted that GDB
will sometimes add a trailing whitespace character when pretty
printing.  This commit removes the trailing whitespace and updates the
expected results in one tests where this was an issue.

I've added an extra test for 'set print pretty on' as it doesn't seem
to have much testing.

gdb/ChangeLog:

* cp-valprint.c (cp_print_value_fields): Don't print trailing
whitespace when pretty printing is on.

gdb/testsuite/ChangeLog:

* gdb.base/finish-pretty.exp: Update expected results.
* gdb.base/pretty-print.c: New file.
* gdb.base/pretty-print.exp: New file.
gdb/ChangeLog
gdb/cp-valprint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/finish-pretty.exp
gdb/testsuite/gdb.base/pretty-print.c [new file with mode: 0644]
gdb/testsuite/gdb.base/pretty-print.exp [new file with mode: 0644]
This page took 0.036444 seconds and 4 git commands to generate.