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; 6+ 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] 6+ messages in thread
* [Bug gdb/9996] wrong size of wide strings
2009-03-24 17:14 [Bug gdb/9996] New: wrong size of wide strings pedro at codesourcery dot com
@ 2009-03-24 17:17 ` tromey at redhat dot com
2009-03-25 15:22 ` tromey at redhat dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2009-03-24 17:17 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2009-03-24 17:17 -------
Mine.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at sourceware dot|tromey at redhat dot com
|org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2009-03-24 17:17:36
date| |
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] 6+ messages in thread
* [Bug gdb/9996] wrong size of wide strings
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
3 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2009-03-25 15:22 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2009-03-25 15:22 -------
I think we tracked this down to a bad setting for target-wide-charset.
If you set this to UCS-2, it should work.
I'm leaving this open for the time being because I want to write
some additional documentation about this.
--
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] 6+ messages in thread
* [Bug gdb/9996] wrong size of wide strings
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
3 siblings, 0 replies; 6+ messages in thread
From: pedro at codesourcery dot com @ 2009-03-25 15:29 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From pedro at codesourcery dot com 2009-03-25 15:29 -------
Does it ever make sense to set target-wide-charset to UCS-4, when wchar_t is
16-bit, or UCS-2 when wchar_t is 32-bit?
Maybe we could have a more reasonable "auto" target-wide-charset
setting, that defaulted to ucs-2, or ucs-4, depending on wchar_t
width?
--
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] 6+ messages in thread
* [Bug gdb/9996] wrong size of wide strings
2009-03-24 17:14 [Bug gdb/9996] New: wrong size of wide strings pedro at codesourcery dot com
` (2 preceding siblings ...)
2009-03-25 15:29 ` pedro at codesourcery dot com
@ 2010-09-17 20:04 ` pebolle at tiscali dot nl
3 siblings, 0 replies; 6+ messages in thread
From: pebolle at tiscali dot nl @ 2010-09-17 20:04 UTC (permalink / raw)
To: gdb-prs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pebolle at tiscali dot nl
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] 6+ messages in thread
* [Bug gdb/9996] wrong size of wide strings
[not found] <bug-9996-4717@http.sourceware.org/bugzilla/>
@ 2014-10-27 12:46 ` ilya.konstantinov at gmail dot com
0 siblings, 0 replies; 6+ messages in thread
From: ilya.konstantinov at gmail dot com @ 2014-10-27 12:46 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=9996
Ilya Konstantinov <ilya.konstantinov at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ilya.konstantinov at gmail dot com
--- Comment #4 from Ilya Konstantinov <ilya.konstantinov at gmail dot com> ---
Keep in mind this is not Windows-specific but happens on Linux with
-fshort-wchar as well.
Ideally, we should support both UTF-16 and UTF-32 in the iconv-less (aka phony
iconv) build. (see gdb/charset.c)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-27 12:46 UTC | newest]
Thread overview: 6+ 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
[not found] <bug-9996-4717@http.sourceware.org/bugzilla/>
2014-10-27 12:46 ` ilya.konstantinov at gmail dot com
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).