From: Tom Tromey <tromey@redhat.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Support counted strings and embedded nulls in value.string
Date: Mon, 06 Jul 2009 17:36:00 -0000 [thread overview]
Message-ID: <m3zlbhu31v.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4A4A3F27.9060401@redhat.com> (Phil Muldoon's message of "Tue\, 30 Jun 2009 17\:36\:55 +0100")
Phil> This patch adds two related elements to the pretty-printer python
Phil> support. This patch already exists in the archer-tromey-python branch
Phil> of the archer repository, and here is my submission for the FSF
Phil> repository.
Thanks.
Phil> Index: c-lang.c
[...]
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.
Tom
next prev parent reply other threads:[~2009-07-06 17:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-30 16:37 Phil Muldoon
2009-07-06 17:36 ` Tom Tromey [this message]
2009-07-07 7:32 ` Phil Muldoon
2009-07-07 19:28 ` Eli Zaretskii
2009-07-07 19:51 ` Phil Muldoon
2009-07-07 19:56 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3zlbhu31v.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pmuldoon@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox