From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33103 invoked by alias); 10 Jun 2019 12:20:27 -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 33092 invoked by uid 89); 10 Jun 2019 12:20:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:user, polite, prefixed, 20190530 X-HELO: relay.fit.cvut.cz Received: from relay.fit.cvut.cz (HELO relay.fit.cvut.cz) (147.32.232.237) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Jun 2019 12:20:24 +0000 Received: from imap.fit.cvut.cz (imap.fit.cvut.cz [IPv6:2001:718:2:2901:0:0:0:238]) by relay.fit.cvut.cz (8.15.2/8.15.2) with ESMTPS id x5ACKJn1005875 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 10 Jun 2019 14:20:21 +0200 (CEST) (envelope-from jan.vrany@fit.cvut.cz) Received: from [IPv6:2a02:c7d:2fcb:c700:6267:20ff:fee4:3e2c] ([IPv6:2a02:c7d:2fcb:c700:6267:20ff:fee4:3e2c]) (authenticated bits=0 as user vranyj1) by imap.fit.cvut.cz (8.15.2/8.15.2) with ESMTPSA id x5ACKH9p011149 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 10 Jun 2019 14:20:19 +0200 (CEST) (envelope-from jan.vrany@fit.cvut.cz) Message-ID: Subject: Re: [PATCH v3 0/5] Create MI commands using python. From: Jan Vrany To: gdb-patches Date: Mon, 10 Jun 2019 12:20:00 -0000 In-Reply-To: <20190530134850.3236-1-jan.vrany@fit.cvut.cz> References: <20190128124101.26243-1-jan.vrany@fit.cvut.cz> <20190530134850.3236-1-jan.vrany@fit.cvut.cz> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-06/txt/msg00192.txt.bz2 Polite ping. Thanks! Jan On Thu, 2019-05-30 at 14:48 +0100, Jan Vrany wrote: > This version mainly addresses comments raised by Simon. Tested with both > Python 2.7 and Python 3(.7). > > Changes v2 -> v3 > > * addressed Simon's comments: > - https://sourceware.org/ml/gdb-patches/2019-05/msg00406.html > - https://sourceware.org/ml/gdb-patches/2019-05/msg00407.html > * checked that it compiles with both Python 2.7 and Python 3(.7) > * add tests for MI command returning dictionary with non-string > keys > * add tests for creating MI commands with invalid names > > Changes v1 -> v2 > > * squashed following commits into one: > - 8e65585bdab0 Create MI commands using python. > - 9e2afadd2d4d03 mi/python: C++ify python MI command handling code > - 0491a0634f7de4 mi/python: Polish MI output of python commands > * moved class mi_command_py to python code > * use gdbpy_ref<> instead of void* to hold on Python object > in mi_command_py > * release python objects held on by mi_command_py objects > when finalizing Python > * merged py_mi_invoke() into mi_command_py::invoke() > * added missing copyright headers > * dropped micmdpy_parse_command_name() > * prefixed error messages by MI command name except for > "Problem parsing arguments:" since old C-implemented MI > commands do not prefix command name. > * make do_suppress_notification() to return gdb::optional > * split invoke to invoke and do_invoke, making invoke to perform > common initialization > * add test redefining Python MI command while the very same command > is running > * documented the fact that in mi_command_py::do_invoke() `this` pointer cannot > be used after invoking python code since it may got stale. > > > Didier Nadeau (3): > Use std::map for MI commands in mi-cmds.c > Use classes to represent MI Command instead of structures > Create MI commands using python. > > Jan Vrany (2): > mi/python: Allow redefinition of python MI commands > mi/python: Add tests for python-defined MI commands > > gdb/ChangeLog | 88 +++++ > gdb/Makefile.in | 1 + > gdb/mi/mi-cmd-info.c | 4 +- > gdb/mi/mi-cmds.c | 510 +++++++++++++------------ > gdb/mi/mi-cmds.h | 87 ++++- > gdb/mi/mi-main.c | 22 +- > gdb/mi/mi-main.h | 1 + > gdb/mi/mi-parse.c | 20 +- > gdb/mi/mi-parse.h | 6 +- > gdb/python/py-micmd.c | 307 +++++++++++++++ > gdb/python/py-micmd.h | 60 +++ > gdb/python/python-internal.h | 2 + > gdb/python/python.c | 13 +- > gdb/testsuite/ChangeLog | 5 + > gdb/testsuite/gdb.python/py-mi-cmd.exp | 132 +++++++ > gdb/testsuite/gdb.python/py-mi-cmd.py | 54 +++ > 16 files changed, 1007 insertions(+), 305 deletions(-) > create mode 100644 gdb/python/py-micmd.c > create mode 100644 gdb/python/py-micmd.h > create mode 100644 gdb/testsuite/gdb.python/py-mi-cmd.exp > create mode 100644 gdb/testsuite/gdb.python/py-mi-cmd.py >