From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31968 invoked by alias); 26 Feb 2019 17:35:06 -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 31952 invoked by uid 89); 26 Feb 2019 17:35:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Feb 2019 17:35:05 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2352636899 for ; Tue, 26 Feb 2019 17:35:04 +0000 (UTC) Received: from f29-4.lan (ovpn-117-11.phx2.redhat.com [10.3.117.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED1FC5D6AA for ; Tue, 26 Feb 2019 17:35:03 +0000 (UTC) Date: Tue, 26 Feb 2019 17:35:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: Re: [PATCH v2 0/4] Define gdb.Value(val, type) constructor Message-ID: <20190226103503.3b92240c@f29-4.lan> In-Reply-To: <20190219143356.1576e67f@f29-4.lan> References: <20190219143356.1576e67f@f29-4.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00443.txt.bz2 I've pushed this series. Kevin On Tue, 19 Feb 2019 14:33:56 -0700 Kevin Buettner wrote: > This four part patch series defines a two argument constructor for > gdb.Value. > > gdb.Value currently has a one argument constructor. It takes a python > value, figures out some potentially suitable gdb type and then > constructs a gdb value of that type. > > The two argument version that I'm introducing is useful for > constructing a gdb value of a specified type from a buffer of bytes. > It takes the form gdb.Value (val, type). VAL is a python buffer object, > i.e. an object from which bytes may be read using python's buffer > protocol. TYPE is a gdb type perhaps obtained by calling > gdb.lookup_type(). > > Changes between the original series and this v2 series are as follows: > > Patch #1: No changes. > > Patch #2: > > Fix wording of comment noted by Simon. > > Change PyExc_RuntimeError to PyExc_TypeError for "type argument must > be a gdb.Type" error. I found this while adding the additional test > that Simon suggested. > > Patch #3: > > Add test which invokes gdb.Value where second argument is not > a gdb.Type. (Suggested by Simon.) > > Patch #4: > > Add NEWS entry. (Requested by Eli.) > > Made other python.texi changes requested by Eli. > > Added missing "@end defun".