From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10976 invoked by alias); 5 Mar 2010 18:30:15 -0000 Received: (qmail 10938 invoked by uid 22791); 5 Mar 2010 18:30:13 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS 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; Fri, 05 Mar 2010 18:30:08 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o25IU6ED015078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 5 Mar 2010 13:30:07 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o25IU6E3020194; Fri, 5 Mar 2010 13:30:06 -0500 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 o25IU5cD029007; Fri, 5 Mar 2010 13:30:05 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 01CEC379315; Fri, 5 Mar 2010 11:30:04 -0700 (MST) From: Tom Tromey To: gdb-patches@sourceware.org Subject: RFA: update `print' docs Reply-To: Tom Tromey Date: Fri, 05 Mar 2010 18:30: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-03/txt/msg00236.txt.bz2 Ben Woodard, a user here at Red Hat, noticed that pretty-printing was not very explicitly described in the `Examining Data' part of the manual. This patch attempts to fix this a little, and also updates some text which was misleading -- it was based on an earlier version of the pretty-printing patch. Ok? Tom 2010-03-05 Tom Tromey * gdb.texinfo (Data): Link to pretty-printing. (Output Formats): Likewise. Correct text. Index: gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.676 diff -u -r1.676 gdb.texinfo --- gdb.texinfo 1 Mar 2010 17:19:22 -0000 1.676 +++ gdb.texinfo 5 Mar 2010 18:22:36 -0000 @@ -6661,7 +6661,8 @@ command (abbreviated @code{p}), or its synonym @code{inspect}. It evaluates and prints the value of an expression of the language your program is written in (@pxref{Languages, ,Using @value{GDBN} with -Different Languages}). +Different Languages}). It may also print the expression using a +Python-based pretty-printer (@pxref{Pretty Printing}). @table @code @item print @var{expr} @@ -7159,8 +7160,10 @@ @item r @cindex raw printing Print using the @samp{raw} formatting. By default, @value{GDBN} will -use a type-specific pretty-printer. The @samp{r} format bypasses any -pretty-printer which might exist for the value's type. +use a Python-based pretty-printer, if one is available (@pxref{Pretty +Printing}). This typically results in a higher-level display of the +value's contents. The @samp{r} format bypasses any Python +pretty-printer which might exist. @end table For example, to print the program counter in hex (@pxref{Registers}), type