From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19468 invoked by alias); 10 Aug 2010 18:05:37 -0000 Received: (qmail 19383 invoked by uid 22791); 10 Aug 2010 18:05:36 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Aug 2010 18:05:32 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7AI5U25006594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 10 Aug 2010 14:05:31 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7AI5U8w020397; Tue, 10 Aug 2010 14:05:30 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o7AI5TtE018517; Tue, 10 Aug 2010 14:05:30 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 66CE63781A0; Tue, 10 Aug 2010 12:05:29 -0600 (MDT) From: Tom Tromey To: gdb-patches@sourceware.org Subject: RFA: document a python function Date: Tue, 10 Aug 2010 18:05:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2010-08/txt/msg00125.txt.bz2 A user noticed that gdb.texinfo does not document the Python function gdb.default_visualizer. This patch adds documentation for it. Please review. Tom 2010-08-10 Tom Tromey * gdb.texinfo (Pretty Printing API): Document gdb.default_visualizer. Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.748 diff -u -r1.748 gdb.texinfo --- doc/gdb.texinfo 7 Aug 2010 15:00:38 -0000 1.748 +++ doc/gdb.texinfo 10 Aug 2010 18:03:59 -0000 @@ -21156,6 +21156,16 @@ If the result is not one of these types, an exception is raised. @end defop +@value{GDBN} provides a function which can be used to look up the +default pretty-printer for a @code{gdb.Value}: + +@findex gdb.default_visualizer +@defun default_visualizer value +This function takes a @code{gdb.Value} object as an argument. If a +pretty-printer for this value exists, then it is returned. If no such +printer exists, then this returns @code{None}. +@end defun + @node Selecting Pretty-Printers @subsubsection Selecting Pretty-Printers