This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Add la_getstr member to language_defn
On Sun, Nov 23, 2008 at 11:40:21PM -0200, Thiago Jung Bauermann wrote:
> The comment is wrong. c_getstr actually reads until a null character is
> found, but doesn't read past the end of an array with known length. I
> updated the comment to reflect that.
>
> Except that there was a bug for GDB-hosted strings, in which case the
> function behaved as described by the comment. I fixed it now.
Are you sure? I took a look at read_string and its comments and it
seemed to do what I described - but I might be wrong.
+ If LEN is -1, stops at the first null character (not necessarily the first
+ null byte) up to a maximum of FETCHLIMIT characters, otherwise reading
+ proceeds (including null characters) until LEN characters have been read.
+ Set FETCHLIMIT to UINT_MAX to read as many characters as possible from the
+ string.
--
Daniel Jacobowitz
CodeSourcery