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 gdb/9996] New: wrong size of wide strings


On cygwin, with the new charset support, I get this:

 (top-gdb) whatis L""
 type = wchar_t [1]

 (top-gdb) ptype wchar_t
 type = short unsigned int

This is correct.  wchar_t is 16-bit on Windows.

 (top-gdb) ptype L""
 type = short unsigned int [1]
 (top-gdb) ptype L"a"
 type = short unsigned int [3]
 (top-gdb) ptype L"aa"
 type = short unsigned int [5]
 (top-gdb) ptype L"aaa"
 type = short unsigned int [7]
 (top-gdb) ptype L"aaaa"
 type = short unsigned int [9]

Notice how the size of the array grows 1,3,5,7,9,...

GDB was linked with the real iconv.

On x86_64-linux, I get:

 (top-gdb) ptype L""
 type = int [1]
 (top-gdb) ptype L"a"
 type = int [2]
 (top-gdb) ptype L"aa"
 type = int [3]
 (top-gdb) ptype L"aaa"
 type = int [4]
 (top-gdb) ptype L"aaaa"
 type = int [5]

-- 
           Summary: wrong size of wide strings
           Product: gdb
           Version: 6.50
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: pedro at codesourcery dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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