This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Support counted strings and embedded nulls in value.string
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 07 Jul 2009 08:32:21 +0100
- Subject: Re: [patch] Support counted strings and embedded nulls in value.string
- References: <4A4A3F27.email@example.com> <firstname.lastname@example.org>
On 07/06/2009 06:36 PM, Tom Tromey wrote:
Phil> /* Obtain a C string from the inferior storing it in a newly allocated
Phil> + buffer in BUFFER, which should be freed by the caller. If LENGTH
Phil> + is specified at -1, the string is read until a null character of
This should mention *LENGTH, not LENGTH.
I think this comment (and the similar comment in language.h) would be
clearer if it mentioned that LENGTH is both an in- and out-parameter.
Phil> Index: python/python-prettyprint.c
Phil> + /* Apply a pretty-printer for the varobj code. PRINTER_OBJ is the
Phil> + print object. It must have a 'to_string' method (but this is
Phil> + checked by varobj, not here) which takes no arguments and
Phil> + returns a string. The printer will return a value and in the case
Phil> + of a Python string being returned, this function will return a
Phil> + PyObject containing the string. For any other type, *REPLACEMENT is
Phil> + set to the replacement value and this function returns NULL. On
Phil> + error, *REPLACEMENT is set to NULL and this function also returns
Phil> + NULL. */
I noticed recently that this entire comment is shifted over by a space.
Could you move it back?
The code bits are approved with those two changes.
It still needs a doc review.
I've made the two changes above. Pending Eli's response, I'll check this