From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80434 invoked by alias); 18 Mar 2019 17:49: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 80424 invoked by uid 89); 18 Mar 2019 17:49:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=controlled X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Mar 2019 17:49:10 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5wNn-0001n4-TY; Mon, 18 Mar 2019 13:49:08 -0400 Received: from [176.228.60.248] (port=3082 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h5wNn-0001Rq-AP; Mon, 18 Mar 2019 13:49:07 -0400 Date: Mon, 18 Mar 2019 17:49:00 -0000 Message-Id: <83tvg0ul85.fsf@gnu.org> From: Eli Zaretskii To: Marco Barisione CC: gdb-patches@sourceware.org, kevinb@redhat.com In-reply-to: (message from Marco Barisione on Mon, 18 Mar 2019 09:22:36 +0000) Subject: Re: [PATCH v2] Add gdb.Value.format_string () References: <20190317135023.2e51944d@f29-4.lan> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00390.txt.bz2 > From: Marco Barisione > Date: Mon, 18 Mar 2019 09:22:36 +0000 > Cc: Kevin Buettner > > gdb/doc/ChangeLog: > > 2019-03-18 Marco Barisione > > * python.texi: Document gdb.Value.format_string (). Please state the node name where you made the changes, as if it were a function (i.e. in parentheses). > diff --git a/gdb/NEWS b/gdb/NEWS > index c45b313406..e4d9ae0fea 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -231,6 +231,12 @@ before Windows XP. > ** The gdb.Value type has a new constructor, which is used to construct a > gdb.Value from a Python buffer object and a gdb.Type. > > + ** The gdb.Value type has a new method 'format_string' which returns a > + string representing the value. The formatting is controlled by the > + optional keyword arguments: 'raw', 'pretty_arrays', 'pretty_structs', > + 'array_indexes', 'symbols', 'unions', 'deref_refs', 'actual_objects', > + 'static_members', 'max_elements', 'repeat_threshold', and 'format'. > + This part is OK. > +@code{True} if C++ references should be resolved to the value they refer ^^^ I believe we prefer to use C@t{++}, as it looks better in print. > +to, @code{False} (the default) if they shouldn't. Note that, unlike for > +the @code{print} command, references are not automatically expanded when > +using the @code{format_string ()} method or the @code{str ()} function. Please don't use "foo ()" to indicate that 'foo' is a function: the result looks like a call to 'foo' with no arguments, which is not what you mean Just @code{format_string} is enough, and likewise for 'str'. > +representation of a C++ object, @code{False} if they shouldn't (see ^^^ C@t{++} OK with those nits fixed. Thanks.