Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
Subject: Re: [RFC] Signed/unsigned character arrays are not strings
Date: Mon, 12 Feb 2007 22:15:00 -0000	[thread overview]
Message-ID: <20070212221452.GA29888@caradoc.them.org> (raw)
In-Reply-To: <20070125113206.GA26448@host0.dyn.jankratochvil.net>

On Thu, Jan 25, 2007 at 12:32:06PM +0100, Jan Kratochvil wrote:
> Attaching also "gdb-cvs-nosign-char.patch" for possible comments.
> It starts printing
> 	$1 = {65 'A', 0 '\0'}
> finally as
> 	$1 = {65, 0}
> Not submitting it for commit review as it breaks the whole testsuite.
> Still if anybody could update the testsuite it would be IMO a helpful patch.
> Currently GDB displays the variants " 'X'" in many inappropriate cases.

I must have forgotten about this message when the other patch went in.
This would be a painful testsuite update... but I think it would be
really nice.  Does anyone else have an opinion?

Before Jan's now committed patch, for strings:
(gdb) p $mm0.v8_int8
$1 = "\000\000\000\000\000\000\000"

After, i.e. CVS HEAD:
(gdb) p $mm0.v8_int8
$2 = {0 '\0', 0 '\0', 0 '\0', 0 '\0', 0 '\0', 0 '\0', 0 '\0', 0 '\0'}

That's better... but it really should be:
$2 = {0, 0, 0, 0, 0, 0, 0, 0}

This is int8_t, we know it's not a char, and when I'm trying to do
math with an eight-element integer vector the chars are confusing.

If this is a good idea, I'll take care of the testsuite updates for at
least two platforms.  That will cover most of it, and then we can
fix the rest as they are noticed.

-- 
Daniel Jacobowitz
CodeSourcery


      parent reply	other threads:[~2007-02-12 22:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25  1:54 Jan Kratochvil
2007-01-25  4:23 ` Eli Zaretskii
2007-01-25 11:32   ` Jan Kratochvil
2007-01-26  8:54     ` Eli Zaretskii
2007-01-26 10:37       ` Jan Kratochvil
2007-01-26 14:44         ` Eli Zaretskii
2007-02-12 22:15     ` Daniel Jacobowitz [this message]

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=20070212221452.GA29888@caradoc.them.org \
    --to=drow@false.org \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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