From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Tromey To: Eli Zaretskii Cc: Klaus-Georg Adams , gdb@sources.redhat.com Subject: Re: displaying wchar_t in gdb Date: Thu, 29 Nov 2001 08:04:00 -0000 Message-ID: <87k7w9d0n8.fsf@creche.redhat.com> References: X-SW-Source: 2001-11/msg00337.html Message-ID: <20011129080400.RXxH5sHW00pUt3NW3RJUOdXrnyiOVS8Ay_X2dnMjmQ8@z> >>>>> "Eli" == Eli Zaretskii writes: Eli> Risky assumptions, both of them (IMHO). For example, GDB can be Eli> conceivably built with libiconv, but you cannot force the Eli> debuggee to be built with it. I don't think the debuggee would need iconv. GDB would fetch raw bytes from the inferior, and then transform them to the appropriate output encoding using the host iconv. >> 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. Eli> I think you need a format because a buffer can be declared Eli> `unsigned char *' even though it holds wide characters. There's always `p (wchar_t *) buf'. I already use this idiom with ordinary char* strings on occasion. Tom