This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug testsuite/15873] New: printcmds.exp oddities


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]