From: Daniel Jacobowitz <drow@false.org>
To: gdb@sourceware.org
Subject: Re: printing wchar_t*
Date: Fri, 14 Apr 2006 14:29:00 -0000 [thread overview]
Message-ID: <20060414141640.GA14789@nevyn.them.org> (raw)
In-Reply-To: <uslog1c8e.fsf@gnu.org>
On Fri, Apr 14, 2006 at 05:08:17PM +0300, Eli Zaretskii wrote:
> > 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.
Well, I suppose. But in the general case, there's always user-defined
functions, and hopefully better scripting languages in the future;
is this something that will be frequently useful direct from the
command line?
It'll involve another extension to the language expression parsers, you
see. We ought to minimize such extensions; e.g. the set of operators
available is fairly limited.
I was thinking "print *ptr@@", by analogy to "print *ptr@5". Or we
could use the existing @ N syntax. Right now we issue errors for
anything less than one; so how about "print *ptr@0" for "print *ptr
until you encounter a zero"?
> We will probably need some user-settable limit for the max number of
> elements, to avoid running amok in case there's no X.
We can just use the "set print elements" limit for that. Although,
it's always bugged me that we use the same setting for "number of
members of an array" and "number of characters in a string"; I usually
want only a few elements of an array, but much more of a string. Maybe
someday we should separate them.
> 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.
Seems reasonable to me.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-04-14 14:16 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-13 17:07 Vladimir Prus
2006-04-13 17:25 ` Eli Zaretskii
2006-04-14 7:29 ` Vladimir Prus
2006-04-14 8:47 ` Eli Zaretskii
2006-04-14 12:47 ` Vladimir Prus
2006-04-14 13:05 ` Eli Zaretskii
2006-04-14 13:06 ` Vladimir Prus
2006-04-14 13:15 ` Robert Dewar
2006-04-14 13:17 ` Daniel Jacobowitz
2006-04-14 13:59 ` Robert Dewar
2006-04-14 14:37 ` Eli Zaretskii
2006-04-14 14:08 ` Paul Koning
2006-04-14 14:47 ` Eli Zaretskii
2006-04-14 15:00 ` Vladimir Prus
2006-04-14 17:53 ` Eli Zaretskii
2006-04-17 7:05 ` Vladimir Prus
2006-04-17 8:35 ` Eli Zaretskii
2006-04-13 18:06 ` Jim Blandy
2006-04-13 21:18 ` Eli Zaretskii
2006-04-14 6:02 ` Jim Blandy
2006-04-14 8:43 ` Eli Zaretskii
2006-04-14 7:58 ` Vladimir Prus
2006-04-14 8:07 ` Jim Blandy
2006-04-14 8:30 ` Vladimir Prus
2006-04-14 8:57 ` Eli Zaretskii
2006-04-14 12:52 ` Vladimir Prus
2006-04-14 13:07 ` Daniel Jacobowitz
2006-04-14 14:23 ` Eli Zaretskii
2006-04-14 14:29 ` Daniel Jacobowitz [this message]
2006-04-14 14:53 ` Eli Zaretskii
2006-04-14 17:10 ` Daniel Jacobowitz
2006-04-14 17:55 ` Jim Blandy
2006-04-14 18:27 ` Eli Zaretskii
2006-04-14 18:30 ` Jim Blandy
2006-04-14 19:19 ` Eli Zaretskii
2006-04-14 14:16 ` Eli Zaretskii
2006-04-14 14:50 ` Vladimir Prus
2006-04-14 17:18 ` Eli Zaretskii
2006-04-14 18:03 ` Jim Blandy
2006-04-14 19:16 ` Eli Zaretskii
2006-04-14 19:22 ` Jim Blandy
2006-04-14 22:18 ` Daniel Jacobowitz
2006-04-16 11:39 ` Jim Blandy
2006-04-16 15:07 ` Eli Zaretskii
2006-04-15 7:14 ` Eli Zaretskii
2006-04-17 7:16 ` Vladimir Prus
2006-04-17 8:58 ` Eli Zaretskii
2006-04-17 10:35 ` Vladimir Prus
2006-04-17 12:26 ` Eli Zaretskii
2006-04-17 13:56 ` Vladimir Prus
2006-04-18 5:31 ` Eli Zaretskii
2006-04-14 19:53 ` Mark Kettenis
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=20060414141640.GA14789@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
/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