From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9108 invoked by alias); 7 Jul 2009 19:51:35 -0000 Received: (qmail 9096 invoked by uid 22791); 7 Jul 2009 19:51:34 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_56,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jul 2009 19:51:26 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n67JpLvp016526; Tue, 7 Jul 2009 15:51:21 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n67JpK4H022308; Tue, 7 Jul 2009 15:51:20 -0400 Received: from localhost.localdomain (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n67JpGVq013927; Tue, 7 Jul 2009 15:51:18 -0400 Message-ID: <4A53A734.4040803@redhat.com> Date: Tue, 07 Jul 2009 19:51:00 -0000 From: Phil Muldoon User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 MIME-Version: 1.0 To: Eli Zaretskii CC: tromey@redhat.com, gdb-patches@sourceware.org Subject: Re: [patch] Support counted strings and embedded nulls in value.string References: <4A4A3F27.9060401@redhat.com> <4A52FA05.9050607@redhat.com> <83skh8z424.fsf@gnu.org> In-Reply-To: <83skh8z424.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2009-07/txt/msg00214.txt.bz2 On 07/07/2009 08:27 PM, Eli Zaretskii wrote: >> Date: Tue, 07 Jul 2009 08:32:21 +0100 >> From: Phil Muldoon >> CC: gdb-patches@sourceware.org >> >> Pending Eli's response, I'll check this patch in. >> > > Sorry, I missed that because you sent the patch as binary attachment. > Thanks. I'm not sure what this means, I attached the patch as an attachment just like all the others I've sent. I don't think I've changed any behaviour in any/all patches I've sent as attachments? What did you see? > The patch for the manual is okay, with one comment. I don't > understand the last sentence in this hunk: > > For C-like languages, a value is a string if it is a pointer to or an > array of characters or ints. The string is assumed to be terminated > -by a zero of the appropriate width. > +by a zero of the appropriate width. However if the optional length > +argument is given, the string will be converted beyond any embedded > +nulls up to the length specified. > > What does it mean ``converted beyond any embedded nulls''? > I'll add a clearer description; it does assume too much user C string knowledge, and the wording is unclear. What I was trying to convey was the string will be converted up to the the optional length, ignoring any nulls (as a null in a C string context traditionally conveys the end of a string). Regards Phil