From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29683 invoked by alias); 17 Jan 2007 21:44:58 -0000 Received: (qmail 29675 invoked by uid 22791); 17 Jan 2007 21:44:58 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 17 Jan 2007 21:44:49 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.13.8/8.13.8) with ESMTP id l0HLiD46011361; Wed, 17 Jan 2007 22:44:13 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.13.8/8.13.8/Submit) id l0HLiDuP001951; Wed, 17 Jan 2007 22:44:13 +0100 (CET) Date: Wed, 17 Jan 2007 21:44:00 -0000 Message-Id: <200701172144.l0HLiDuP001951@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: nickrob@snap.net.nz, mark.kettenis@xs4all.nl, ghost@cs.msu.su, gdb-patches@sources.redhat.com In-reply-to: <20070117060552.GC19331@nevyn.them.org> (message from Daniel Jacobowitz on Wed, 17 Jan 2007 01:05:52 -0500) Subject: Re: MI failures related to string printing References: <200701121351.29310.vladimir@codesourcery.com> <17831.31430.442855.801431@kahikatea.snap.net.nz> <17836.26533.146945.793792@kahikatea.snap.net.nz> <200701162123.l0GLN5kF029500@brahms.sibelius.xs4all.nl> <17837.18315.809868.354650@kahikatea.snap.net.nz> <20070117060552.GC19331@nevyn.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00389.txt.bz2 > Date: Wed, 17 Jan 2007 01:05:52 -0500 > From: Daniel Jacobowitz > Cc: Mark Kettenis , ghost@cs.msu.su, > gdb-patches@sources.redhat.com > Mail-Followup-To: Nick Roberts , > Mark Kettenis , 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