From: Eli Zaretskii <eliz@is.elta.co.il>
To: Tom Tromey <tromey@redhat.com>
Cc: Klaus-Georg Adams <Klaus-Georg.Adams@sap.com>, gdb@sources.redhat.com
Subject: Re: displaying wchar_t in gdb
Date: Thu, 29 Nov 2001 00:19:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.91.1011129101817.10998J-100000@is> (raw)
In-Reply-To: <87u1veigta.fsf@creche.redhat.com>
On 28 Nov 2001, Tom Tromey wrote:
> Eli> I'm not even sure this is feasible, taking the cross-debugging
> Eli> into consideration. I guess it's possible in native debugging,
> Eli> assuming GDB and the debuggee use compatible libraries for wide
> Eli> character support, and support the same character sets.
>
> I think it is feasible if you assume first that the host has a
> high-powered iconv() implementation (Linux does, other systems are
> typically less good -- but there is always libiconv) and second that
> the target's wchar_t is a well-known encoding and not some peculiar
> thing.
Risky assumptions, both of them (IMHO). For example, GDB can be
conceivably built with libiconv, but you cannot force the debuggee to
be built with it.
> With these assumptions the problem becomes one of telling gdb what
> encoding to expect when printing wchar_t strings. The terminal's
> encoding can just come from the current locale.
Yeah, I know all about how ``easy'' that is, from Emacs 20
experience...
> Eli> If it _is_ possible and feasible, then a special format is
> Eli> probably the way to go.
>
> For wchar_t I don't think you need a new `print' format (well maybe to
> specify the encoding). I think a wchar_t string could be printed
> based solely on the type, the way we print a char* string right now.
I think you need a format because a buffer can be declared `unsigned
char *' even though it holds wide characters.
WARNING: multiple messages have this Message-ID
From: Eli Zaretskii <eliz@is.elta.co.il>
To: Tom Tromey <tromey@redhat.com>
Cc: Klaus-Georg Adams <Klaus-Georg.Adams@sap.com>, gdb@sources.redhat.com
Subject: Re: displaying wchar_t in gdb
Date: Fri, 23 Nov 2001 13:27:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.91.1011129101817.10998J-100000@is> (raw)
Message-ID: <20011123132700.Pr0SaIQVG-_Fm4anG0ijCsDUYgUF2_ukZQxGsLvpZHM@z> (raw)
In-Reply-To: <87u1veigta.fsf@creche.redhat.com>
On 28 Nov 2001, Tom Tromey wrote:
> Eli> I'm not even sure this is feasible, taking the cross-debugging
> Eli> into consideration. I guess it's possible in native debugging,
> Eli> assuming GDB and the debuggee use compatible libraries for wide
> Eli> character support, and support the same character sets.
>
> I think it is feasible if you assume first that the host has a
> high-powered iconv() implementation (Linux does, other systems are
> typically less good -- but there is always libiconv) and second that
> the target's wchar_t is a well-known encoding and not some peculiar
> thing.
Risky assumptions, both of them (IMHO). For example, GDB can be
conceivably built with libiconv, but you cannot force the debuggee to
be built with it.
> With these assumptions the problem becomes one of telling gdb what
> encoding to expect when printing wchar_t strings. The terminal's
> encoding can just come from the current locale.
Yeah, I know all about how ``easy'' that is, from Emacs 20
experience...
> Eli> If it _is_ possible and feasible, then a special format is
> Eli> probably the way to go.
>
> For wchar_t I don't think you need a new `print' format (well maybe to
> specify the encoding). I think a wchar_t string could be printed
> based solely on the type, the way we print a char* string right now.
I think you need a format because a buffer can be declared `unsigned
char *' even though it holds wide characters.
next prev parent reply other threads:[~2001-11-29 0:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-13 16:57 Klaus-Georg Adams
2001-11-26 1:16 ` Klaus-Georg Adams
2001-11-26 1:29 ` Eli Zaretskii
2001-11-13 21:23 ` Eli Zaretskii
2001-11-26 1:59 ` Klaus-Georg Adams
2001-11-13 21:28 ` Klaus-Georg Adams
2001-11-26 4:11 ` Eli Zaretskii
2001-11-13 23:51 ` Eli Zaretskii
2001-11-22 9:19 ` LeakyStain
2001-11-28 15:38 ` LeakyStain
2001-11-22 14:30 ` Tom Tromey
2001-11-28 16:02 ` Tom Tromey
2001-11-29 0:19 ` Eli Zaretskii [this message]
2001-11-23 13:27 ` Eli Zaretskii
2001-11-24 22:42 ` Tom Tromey
2001-11-29 8:04 ` Tom Tromey
2001-11-25 10:38 Klaus-Georg Adams
2001-11-25 10:44 ` Arnaud Charlet
2001-11-30 2:22 ` Arnaud Charlet
2001-11-25 12:10 ` Paul Hilfinger
2001-11-30 3:36 ` Paul Hilfinger
2001-11-30 2:15 ` Klaus-Georg Adams
2001-11-30 2:25 ` Joel Brobecker
2001-11-25 10:54 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.SUN.3.91.1011129101817.10998J-100000@is \
--to=eliz@is.elta.co.il \
--cc=Klaus-Georg.Adams@sap.com \
--cc=gdb@sources.redhat.com \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox