From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49349 invoked by alias); 24 Mar 2019 16:07:29 -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 49339 invoked by uid 89); 24 Mar 2019 16:07:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy= 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; Sun, 24 Mar 2019 16:07:27 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h85ef-0006A3-LS; Sun, 24 Mar 2019 12:07:25 -0400 Received: from [176.228.60.248] (port=3753 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h85ef-0007f2-1Q; Sun, 24 Mar 2019 12:07:25 -0400 Date: Sun, 24 Mar 2019 16:07:00 -0000 Message-Id: <83lg14ntmp.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess CC: gdb-patches@sourceware.org In-reply-to: <74c9886b523c8116691457826dc011cb74266b33.1553382150.git.andrew.burgess@embecosm.com> (message from Andrew Burgess on Sat, 23 Mar 2019 23:04:44 +0000) Subject: Re: [PATCH 3/3] gdb: Make python display_hint None handling defined behaviour References: <74c9886b523c8116691457826dc011cb74266b33.1553382150.git.andrew.burgess@embecosm.com> 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/msg00518.txt.bz2 > From: Andrew Burgess > Cc: Andrew Burgess > Date: Sat, 23 Mar 2019 23:04:44 +0000 > > The documentation say that the display_hint method must return a > string to serve as a display hint, and then goes on to list some > acceptable strings. > > However, if we don't supply the display_hint method then we get a > default display style behaviour and there's currently no way (in the > python api) to force this default behaviour. > > The guile api allows #f to be used in order to force the default > display style behaviour, and this is documented. > > Currently, using None in the python api also forces the default > display behaviour. > > This commit extends the documentation to make returning None from the > display_hint method and official mechanism by which the user can get > the default display style. > > I've extended one of the existing tests to cover this case. > > gdb/doc/ChangeLog: > > * python.texi (Pretty Printing API): Document use of None for the > display_hint. > > gdb/testsuite/ChangeLog: > > * gdb.python/py-prettyprint.c (struct container) : New > field. > (make_container): Initialise new field. > * gdb.python/py-prettyprint.exp: Add new tests. > * gdb.python/py-prettyprint.py (class ContainerPrinter) > : New method. The documentation part is OK. Thanks.