From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1822 invoked by alias); 17 Jan 2007 06:06:07 -0000 Received: (qmail 1814 invoked by uid 22791); 17 Jan 2007 06:06:06 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 17 Jan 2007 06:06:01 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H73vk-00059u-59; Wed, 17 Jan 2007 01:05:52 -0500 Date: Wed, 17 Jan 2007 06:06:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Mark Kettenis , ghost@cs.msu.su, gdb-patches@sources.redhat.com Subject: Re: MI failures related to string printing Message-ID: <20070117060552.GC19331@nevyn.them.org> Mail-Followup-To: Nick Roberts , Mark Kettenis , ghost@cs.msu.su, gdb-patches@sources.redhat.com 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17837.18315.809868.354650@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes 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/msg00379.txt.bz2 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