This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Support counted strings and embedded nulls in value.string

On 07/07/2009 08:27 PM, Eli Zaretskii wrote:
Date: Tue, 07 Jul 2009 08:32:21 +0100
From: Phil Muldoon<>

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).



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]