This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: displaying wchar_t in gdb


>>>>> "Eli" == Eli Zaretskii <eliz@is.elta.co.il> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]