This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Python pretty-printing [6/6]
> Cc: gdb-patches@sources.redhat.com
> From: Tom Tromey <tromey@redhat.com>
> Date: Thu, 21 May 2009 12:11:15 -0600
>
> It also has a small documentation change, to explain the rationale for
> the Python API.
Thanks. The documentation change is approved, with the following
minor comment:
> +If not @samp{None}, @var{visualizer} must be a Python expression.
> +This expression must evaluate to a callable object which accepts a
> +single argument. @value{GDBN} will call this object with the value of
> +the varobj @var{name} as an argument (this is done so that the same
> +Python pretty-printing code can be used for both the CLI and MI).
> +This function must return an object which conforms to the
> +pretty-printing interface (@pxref{Pretty Printing}).
You said VISUALIZER must evaluate to an _object_ that GDB will call,
but now you are saying that the _function_ must return something.
Suggest to say "When called, this object must return ...", to avoid
confusion about how did we get to a function.
OK with that change.