From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6960 invoked by alias); 2 Jun 2014 04:03:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6951 invoked by uid 89); 2 Jun 2014 04:03:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f176.google.com Received: from mail-pd0-f176.google.com (HELO mail-pd0-f176.google.com) (209.85.192.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 02 Jun 2014 04:03:28 +0000 Received: by mail-pd0-f176.google.com with SMTP id p10so2980647pdj.21 for ; Sun, 01 Jun 2014 21:03:27 -0700 (PDT) X-Received: by 10.66.122.70 with SMTP id lq6mr37362137pab.51.1401681807044; Sun, 01 Jun 2014 21:03:27 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-50-sfba.hfc.comcastbusiness.net. [173.13.178.50]) by mx.google.com with ESMTPSA id au4sm17924952pbc.10.2014.06.01.21.03.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jun 2014 21:03:26 -0700 (PDT) From: Doug Evans To: Siva Chandra Cc: gdb-patches Subject: Re: [PATCH 2/4 v19] Add xmethod interface to the extension language API References: Date: Mon, 02 Jun 2014 04:03:00 -0000 In-Reply-To: (Siva Chandra's message of "Fri, 30 May 2014 15:59:00 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00009.txt.bz2 Siva Chandra writes: > Small change around the invoke_method API as compared to v18. Patch attached. > > ChangeLog > > 2014-05-30 Siva Chandra Reddy > > * defs.h (enum lval_type): New enumerator "lval_xcallable". > * extension-priv.h (struct extension_language_ops): Add the > xmethod interface. > * extension.c (new_xmethod_worker, clone_xmethod_worker, > get_matching_xmethod_workers, get_xmethod_argtypes, > invoke_xmethod, free_xmethod_worker, > free_xmethod_worker_vec): New functions. > * extension.h: #include "common/vec.h". > New function declarations. > (struct xmethod_worker): New struct. > (VEC (xmethod_worker_ptr)): New vector type. > (xmethod_worker_ptr): New typedef. > (xmethod_worker_vec): Likewise. > * gdbtypes.c (gdbtypes_post_init): Initialize "xmethod" field of > builtin_type. > * gdbtypes.h (enum type_code): New enumerator TYPE_CODE_XMETHOD. > (struct builtin_type): New field "xmethod". > * valarith.c (value_ptradd): Assert that the value argument is not > lval_xcallable. > * valops.c (value_must_coerce_to_target): Return 0 for > lval_xcallable values. > * value.c (struct value): New field XM_WORKER in the field > LOCATION. > (value_address, value_raw_address): Return 0 for lval_xcallable > values. > (set_value_address): Assert that the value is not an > lval_xcallable. > (value_free): Free the associated xmethod worker when freeing > lval_xcallable values. > (set_value_component_location): Assert that the WHOLE value is not > lval_xcallable. > (value_of_xmethod, call_xmethod): New functions. > * value.h: Declare "struct xmethod_worker". > Declare new functions value_of_xmethod, call_xmethod. LGTM