public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/9996] New: wrong size of wide strings
@ 2009-03-24 17:14 pedro at codesourcery dot com
  2009-03-24 17:17 ` [Bug gdb/9996] " tromey at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pedro at codesourcery dot com @ 2009-03-24 17:14 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-17 20:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-24 17:14 [Bug gdb/9996] New: wrong size of wide strings pedro at codesourcery dot com
2009-03-24 17:17 ` [Bug gdb/9996] " tromey at redhat dot com
2009-03-25 15:22 ` tromey at redhat dot com
2009-03-25 15:29 ` pedro at codesourcery dot com
2010-09-17 20:04 ` pebolle at tiscali dot nl

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).