public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/15873] New: printcmds.exp oddities
@ 2013-08-21 14:45 muller at sourceware dot org
  0 siblings, 0 replies; only message in thread
From: muller at sourceware dot org @ 2013-08-21 14:45 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15873

            Bug ID: 15873
           Summary: printcmds.exp oddities
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: muller at sourceware dot org

Created attachment 7159
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7159&action=edit
Patch to add <incomplete> or <invalid> suffix to printed chars

I think that the test gdb.base/printcmds.exp
relies on hidden bugs inside GDB:

  The test prints all characters with binary values from 0 to 255.
The test uses
set sevenbit-strings
command and thus, for all values above 127, the test expect to
get the octal representation.

  This test completes successfully on linux, but fails
a lot on mingw32/mingw64.

  This is the reason of the failure for mingwXX test:
these executables default with target-charset set to CP1252
(on my installation).
  Thus binary values from 127 to 255 do have character
equivalent that the system is happy to display as single
character.
  The reason is that the printing is done using generic_emit_char
which does not honor sevenbit_strings value.

  Using 
set target-charset UTF-8
  reduces thus significantly the number of failures for mingwXX executables...
but I was then wondering why this is so.

  The reason binary values are displayed in octal representation
in UTF-8 is that they are either invalid or incomplete representations
of valid characters.
  But currently, no warning is displayed for those invalid or incomplete
characters.

  Suggested fix attached and to be sent to gdb-patches,
this patch adds <incomplete> or <invalid> suffix to simple characters
that are not valid in UTF-8.

Pierre Muller

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-21 14:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-21 14:45 [Bug testsuite/15873] New: printcmds.exp oddities muller at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).