Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>,
	ghost@cs.msu.su, 	gdb-patches@sources.redhat.com
Subject: Re: MI failures related to string printing
Date: Wed, 17 Jan 2007 06:06:00 -0000	[thread overview]
Message-ID: <20070117060552.GC19331@nevyn.them.org> (raw)
In-Reply-To: <17837.18315.809868.354650@kahikatea.snap.net.nz>

On Wed, Jan 17, 2007 at 10:45:47AM +1300, Nick Roberts wrote:
> would have tried to adjust it.  When is it appropriate to use an XFAIL, if
> not here?

XFAIL are expected failures due to limitations of the environment.
Something which broke because your OS kernel version doesn't support
it, or because no version of GCC emits good information, is a
legitimate XFAIL.

>  > I'm still not convinced the change is ok.  Having 'char *' point to a
>  > buffer that's not null-terminated is not uncommon.  We have a lot of
>  > those in gdb itself.

Hi Mark,

We already use the equivalent of "print" to pass the value to the front
end when it asks for the variable's value.  What Nick's change did was
to use the same code when it asks if the variable's "value" has
changed.  I think it's an improvement on that basis alone.

If we wanted printing a char * which doesn't point to a string to stop
after one character, we'd need some way to identify strings, which
C doesn't really give us.  As long as it's convenient for "print"
to dump out the string, I suspect MI ought to too.  Just my opinion,
though - and I hope to be doing some more talking about data
representations this year...

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-01-17  6:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200701121351.29310.vladimir@codesourcery.com>
     [not found] ` <17831.31430.442855.801431@kahikatea.snap.net.nz>
2007-01-16  2:08   ` Vladimir Prus
2007-01-16  5:50     ` Nick Roberts
2007-01-16  6:42       ` Vladimir Prus
2007-01-16 20:44         ` Nick Roberts
2007-01-16 23:06           ` Vladimir Prus
2007-01-17  0:59             ` Nick Roberts
2007-01-17  6:01               ` Daniel Jacobowitz
2007-01-17  8:12                 ` Nick Roberts
2007-01-16 21:23       ` Mark Kettenis
2007-01-16 22:16         ` Nick Roberts
2007-01-17  6:06           ` Daniel Jacobowitz [this message]
2007-01-17 21:44             ` Mark Kettenis
2007-01-17 22:19               ` Daniel Jacobowitz

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=20070117060552.GC19331@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    --cc=mark.kettenis@xs4all.nl \
    --cc=nickrob@snap.net.nz \
    /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