This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Patch v18 4/4] Add xmethod support to the Python API
- From: Doug Evans <dje at google dot com>
- To: Siva Chandra <sivachandra at google dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 28 May 2014 13:58:29 -0700
- Subject: Re: [Patch v18 4/4] Add xmethod support to the Python API
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gz5zh64AcfeHcqiXtYKpJf7GWpD+5FmKe38fg1bOMJc_w at mail dot gmail dot com> <m3ha4dh1vq dot fsf at sspiff dot org> <m3mwe2fqcp dot fsf at sspiff dot org> <CAGyQ6gx09MP8RPPr6bu9TfawKASX14d2j3+MkocKU_vtJhN7pA at mail dot gmail dot com>
On Wed, May 28, 2014 at 1:44 PM, Siva Chandra <sivachandra@google.com> wrote:
> On Tue, May 27, 2014 at 10:02 PM, Doug Evans <xdje42@gmail.com> wrote:
>> Ok, let's do this.
>>
>> extension.c:invoke_xmethod will throw an error if this function
>> returns EXT_LANG_RC_ERROR:
>>
>> if (rc == EXT_LANG_RC_ERROR)
>> {
>> error (_("Error while invoking a xmethod defined in %s"),
>> worker->extlang->capitalized_name);
>> }
>
> I did not understand this part. Since you suggest below that
> gdbpy_invoke_xmethod return value * and throw GDB errors for Python
> errors as well, where would invoke_xmethod get RC from?
invoke_method would look like this:
struct value *
invoke_xmethod (struct xmethod_worker *worker, struct value *obj,
struct value **args, int nargs)
{
gdb_assert (worker->extlang->ops->invoke_xmethod != NULL);
return worker->extlang->ops->invoke_xmethod (worker->extlang, worker,
obj, args, nargs);
}
Sorry for the confusion.