Fix latent quote char bug in generic_printstr
authorTom Tromey <tom@tromey.com>
Thu, 27 Jan 2022 01:07:18 +0000 (18:07 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 10 Oct 2022 16:43:33 +0000 (10:43 -0600)
commit1be8435c74de6738aec7ed623b59e381fa9bb644
tree0a2e2d275bf9cc7b63bc5ece21ecfb828a78bc64
parent79aafec96b237165e66f14ba963214fb709af847
Fix latent quote char bug in generic_printstr

generic_printstr prints an empty string like:

      fputs_filtered ("\"\"", stream);

However, this seems wrong to me if the quote character is something
other than double quote.  This patch fixes this latent bug.  Thanks to
Andrew for the test case.

Co-authored-by: Andrew Burgess <aburgess@redhat.com>
gdb/testsuite/gdb.fortran/empty-string.exp [new file with mode: 0644]
gdb/testsuite/gdb.fortran/empty-string.f90 [new file with mode: 0644]
gdb/valprint.c