From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36836 invoked by alias); 30 May 2018 23:05:12 -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 36819 invoked by uid 89); 30 May 2018 23:05:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Fedora, Hx-languages-length:1312 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 May 2018 23:05:08 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7CDBE117E37; Wed, 30 May 2018 19:05:07 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OYCgcrE0btra; Wed, 30 May 2018 19:05:07 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4BC9B117D62; Wed, 30 May 2018 19:05:07 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 953CC83056; Wed, 30 May 2018 16:05:05 -0700 (PDT) Date: Wed, 30 May 2018 23:14:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Add basic Python API for convenience variables Message-ID: <20180530230505.rikgb3v6zkywsmnl@adacore.com> References: <20180422211309.31251-1-tom@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180422211309.31251-1-tom@tromey.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-05/txt/msg00824.txt.bz2 Hi Tom, > This adds a basic Python API for accessing convenience variables. > With this, convenience variables can be read and set from Python. > Although gdb supports convenience variables whose value changes at > each call, this is not exposed to Python; it could be, but I think > it's just as good to write a convenience function in this situation. > > This is PR python/23080. > > Tested on x86-64 Fedora 26. > > ChangeLog > 2018-04-22 Tom Tromey > > PR python/23080: > * NEWS: Update for new functions. > * python/py-value.c (gdbpy_set_convenience_variable) > (gdbpy_convenience_variable): New functions. > * python/python-internal.h (gdbpy_convenience_variable) > (gdbpy_set_convenience_variable): Declare. > * python/python.c (python_GdbMethods): Add convenience_variable, > set_convenience_variable. > > doc/ChangeLog > 2018-04-22 Tom Tromey > > PR python/23080: > * python.texi (Basic Python): Document gdb.convenience_variable, > gdb.set_convenience_variable. > > testsuite/ChangeLog > 2018-04-22 Tom Tromey > > PR python/23080: > * gdb.python/python.exp: Add convenience variable tests. Really very sorry about the delay. The patch looks good to me, so go ahead and push. Thanks! -- Joel