From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14042 invoked by alias); 24 Apr 2015 20:22:36 -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 14030 invoked by uid 89); 24 Apr 2015 20:22:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout28.012.net.il Received: from mtaout28.012.net.il (HELO mtaout28.012.net.il) (80.179.55.184) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Apr 2015 20:22:34 +0000 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NNB00B00V4Z3W00@mtaout28.012.net.il> for gdb-patches@sourceware.org; Fri, 24 Apr 2015 23:21:19 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NNB00APQV7IIW00@mtaout28.012.net.il>; Fri, 24 Apr 2015 23:21:19 +0300 (IDT) Date: Fri, 24 Apr 2015 20:22:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] [PR python/18285] Fix. In-reply-to: To: Doug Evans Cc: gdb-patches@sourceware.org, sivachandra@google.com Reply-to: Eli Zaretskii Message-id: <83vbglxonc.fsf@gnu.org> References: X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00949.txt.bz2 > From: Doug Evans > cc: sivachandra@google.com > Date: Fri, 24 Apr 2015 12:30:07 -0700 > > This patch fixes pr 18285 by adding a new get_result_type method > to xmethod workers. This way we can fetch the result type without > having to call the xmethod (which is important for ptype where > we have EVAL_AVOID_SIDE_EFFECTS). > > Regression tested on amd64-linux. > > 2015-04-24 Doug Evans > > PR python/18285 > * NEWS: Document new gdb.XMethodWorker.get_result_type method. > * eval.c (evaluate_subexp_standard) : Handle > EVAL_AVOID_SIDE_EFFECTS for xmethods. > * extension-priv.h (struct extension_language_ops) > : New member. > * extension.c (get_xmethod_result_type): New function. > * extension.h (get_xmethod_result_type): Declare. > * python/py-xmethods.c (get_result_type_method_name): New static > global. > (py_get_result_type_method_name): Ditto. > (gdbpy_get_xmethod_result_type): New function. > (gdbpy_initialize_xmethods): Initialize py_get_result_type_method_name. > * python/python-internal.h (gdbpy_get_xmethod_result_type): Declare. > * python/python.c (python_extension_ops): Add > gdbpy_get_xmethod_result_type. > * valarith.c (value_x_binop): Handle EVAL_AVOID_SIDE_EFFECTS for > xmethods. > (value_x_unop): Ditto. > * value.c (result_type_of_xmethod): New function. > * value.h (result_type_of_xmethod): Declare. > > testsuite/ > * gdb.python/py-xmethods.exp: Add ptype tests. > * gdb.python/py-xmethods.py (E_method_char_worker): Add > get_result_type method. > > doc/ > * python.texi (Xmethod API) : > Document. > (Writing an Xmethod): Add get_result_type to example. The documentation parts are okay. Thanks.