This is the mail archive of the
mailing list for the GDB project.
Re: printing wchar_t*
- From: "Jim Blandy" <jimb at red-bean dot com>
- To: "Vladimir Prus" <ghost at cs dot msu dot su>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 13 Apr 2006 10:31:18 -0700
- Subject: Re: printing wchar_t*
- References: <email@example.com>
On 4/13/06, Vladimir Prus <firstname.lastname@example.org> wrote:
> I have a user-defined command that can produce the output I want, but is
> defining a custom command the right approach?
Well, you'd like wide strings to be printed properly when they appear
in structures, as arguments to functions, and so on, right? So a
user-defined command isn't ideal.
The best approach would be to extend charset.[ch] to handle wide
character sets as well, and then add code to the language-specific
printing routines to use the charset functions. (This is fortunately
much simpler than adding support for multibyte characters.)