From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 3+sMOqthJ2HeJQAAWB0awg (envelope-from ) for ; Thu, 26 Aug 2021 05:40:59 -0400 Received: by simark.ca (Postfix, from userid 112) id DEB1B1EE1B; Thu, 26 Aug 2021 05:40:59 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 1BB251ECEB for ; Thu, 26 Aug 2021 05:40:59 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A84603857C5F for ; Thu, 26 Aug 2021 09:40:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A84603857C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629970858; bh=ZlxWuWetiyzype6FiLMDlrUWyJlJwkdidh6x7OqBTGk=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=qGGZqWntoxOG6MO5ZWqNGiDVDeiS768GgBk63W/+Q76VtdrTJNNIKf0kuFakMzn6H /i7GyRnx8gk2WlH6VkOEJCJngmwEgXXc/bPHyn3NkluCYq2VBd85zJj/R+PLoVx2PX eo1vzSlY74p5LZCurRNwvn8KX26Ociz+5UVL+31Y= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id E35373858C27 for ; Thu, 26 Aug 2021 09:40:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E35373858C27 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56426) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJBsF-0005tL-Eb; Thu, 26 Aug 2021 05:40:39 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4073 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJBsF-0001nq-1x; Thu, 26 Aug 2021 05:40:39 -0400 Date: Thu, 26 Aug 2021 12:40:18 +0300 Message-Id: <83eeagtugt.fsf@gnu.org> To: Andrew Burgess In-Reply-To: <20210826092002.GI2581@embecosm.com> (message from Andrew Burgess on Thu, 26 Aug 2021 10:20:02 +0100) Subject: Re: [PATCHv2] gdb/python: add facility to add values into the history References: <874kbfaon0.fsf@tromey.com> <20210825172719.3814152-1-andrew.burgess@embecosm.com> <83y28ptnch.fsf@gnu.org> <20210826092002.GI2581@embecosm.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > Date: Thu, 26 Aug 2021 10:20:02 +0100 > From: Andrew Burgess > Cc: gdb-patches@sourceware.org > > * Eli Zaretskii [2021-08-25 21:01:50 +0300]: > > > > From: Andrew Burgess > > > Date: Wed, 25 Aug 2021 18:27:19 +0100 > > > > > > +* Python API > > > + > > > + ** New function gdb.add_history(), which takes a gdb.Value object > > > + and adds the value to GDB's history list. An integer, the index > > ^^^^^^^^^ > > "its value", right? > > I don't know, that doesn't sound right to me. 'its value' seems to > imply a value that belongs to someone/something, but I don't think > that's the case here. > > Maybe, '...takes a gdb.Value object and adds it to GDB's history list.' ? No, that's worse, because you don't add the Python object to the history. How about if you use the same wording you suggested for the manual: "the value it represents"? > Takes @var{value}, an instance of @code{gdb.Value} (@pxref{Values From > Inferior}), and appends the value this object represents to > @value{GDBN}'s value history (@pxref{Value History}) and return an > integer, its history number. If @var{value} is not a > @code{gdb.Value}, it is is converted using the @code{gdb.Value} > constructor. If @var{value} can't be converted to a @code{gdb.Value} > then a @code{TypeError} is raised. This text is fine, thanks.