MI failures related to string printing

Mark Kettenis mark.kettenis@xs4all.nl
Wed Jan 17 21:44:00 GMT 2007


> Date: Wed, 17 Jan 2007 01:05:52 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, ghost@cs.msu.su,
>         gdb-patches@sources.redhat.com
> Mail-Followup-To: Nick Roberts <nickrob@snap.net.nz>,
> 	Mark Kettenis <mark.kettenis@xs4all.nl>, ghost@cs.msu.su,
> 	gdb-patches@sources.redhat.com
> Content-Disposition: inline
> X-XS4ALL-DNSBL-Checked: mxdrop9.xs4all.nl checked 66.93.172.17 against DNS blacklists
> X-Virus-Scanned: by XS4ALL Virus Scanner
> X-XS4ALL-Spam-Score: 0.0 () DK_POLICY_SIGNSOME
> X-XS4ALL-Spam: NO
> Envelope-To: mark.kettenis@xs4all.nl
> X-UIDL: 1169013955._smtp.mxdrop9.92459,S=2839
> 
> 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.

Agreed, at least if you explicitly ask for it.  However, the testsuite
does something like "-var-update *", which does not seem very explicit
to me.  Or am I missing something.

Mark



More information about the Gdb-patches mailing list