This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch v18 4/4] Add xmethod support to the Python API


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]