Re: printing wchar_t*

Eli Zaretskii
2006-04-14T14:08:26Z

> Date: Fri, 14 Apr 2006 09:05:27 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, gdb@sources.redhat.com
>
> Going away from GDB support for wide characters for a moment, and back to
> this; we have a "print N elements" notation; should we extend it to a
> "print all non-zero elements" notation?

How about "print elements until you find X", where X is any 8-bit
code, including zero? That would useful in situations, I think.

We will probably need some user-settable limit for the max number of
elements, to avoid running amok in case there's no X.

> Alternatively, we could do it specially by recognizing wchar_t, but
> I think the general solution might be more useful.

I agree.

> Eli'd know better than me, but I think that expecting wchar_t to be
> Unicode is not reliable.

I think we cannot assume Unicode is the only character set, but we can
make Unicode the default and let the user say otherwise if not.