From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17184 invoked by alias); 1 Nov 2010 04:07:33 -0000 Received: (qmail 17176 invoked by uid 22791); 1 Nov 2010 04:07:32 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Nov 2010 04:07:26 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LB600B00TQLB900@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Mon, 01 Nov 2010 06:07:24 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.127.144.59]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LB600BV8U4A3N50@a-mtaout20.012.net.il>; Mon, 01 Nov 2010 06:07:23 +0200 (IST) Date: Mon, 01 Nov 2010 04:07:00 -0000 From: Eli Zaretskii Subject: Re: [RFA, doc RFA]: New printing module and info/disable/enable commands In-reply-to: <20101101024704.6A4AA2461AF@ruffy.mtv.corp.google.com> To: dje@google.com (Doug Evans) Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83r5f56611.fsf@gnu.org> References: <20101101024704.6A4AA2461AF@ruffy.mtv.corp.google.com> X-IsSubscribed: yes 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-11/txt/msg00003.txt.bz2 > Date: Sun, 31 Oct 2010 19:47:04 -0700 (PDT) > From: dje@google.com (Doug Evans) > > This patch adds two things: A new python module to assist in writing > pretty-printers (mostly to formalize some of the administrivia aspects > to support the new commands), and three new commands: > info|enable|disable pretty-printer. Thanks. > + ** Module gdb.printing has been added. > + It contains utilities for writing and registering pretty-printers. > + New classes: PrettyPrinter, SubPrettyPrinter, > + RegexpCollectionPrettyPrinter. > + New function: register_pretty_printer. > + > + ** New commands "info pretty-printers", "enable pretty-printer" and > + "disable pretty-printer" have been added. This is okay. > +Pretty-printers are normally named. This makes them easy to manage. > +For example, the @samp{info pretty-printer} command will list all the > +installed pretty-printers. It's not clear how "info pretty-printers" is an example of giving names to pretty-printers. How about The @samp{info pretty-printer} command will list all the installed pretty-printers with their names. > +For pretty-printers that handle multiple types, we call the printer > +of each individual type a @code{subprinter}, and each subprinter is named. Suggest to rephrase: If a pretty-printer can handle multiple data types, then its @dfn{subprinters} are the printers for the individual data types. Each such subprinter has its own name. > +The format of the name is @samp{printer-name}:@samp{subprinter-name}. Please use @var here, not @code, since both of these stand for something else, they are not literal symbols. > +Pretty-printers are installed by @samp{registering} them with @value{GDBN}. ^^^^^^^^^^^^^^^^^^ @dfn, not @samp. You are defining new terminology. > +@node Pretty-Printer Commands > +@subsection Pretty-Printer Commands A @cindex entry here would be good. > +@var{object-regexp} is a regular expression matching the objects to list. "Objects to list" or "objects whose pretty-printers to list"? > +Objects are @code{global}, the program space's file ^^^^^^^^^^^ "Objects can be ...", perhaps? > +@item disable pretty-printer @var{object-regexp} @var{name-regexp} > +Disable the pretty-printer matching @var{object-regexp} and @var{name-regexp}. ^^^^^^^^^^^^^^^^^^^^^^^^^^ "Disable pretty-printers", in plural. > +@item enable pretty-printer @var{object-regexp} @var{name-regexp} > +Enable the pretty-printer matching @var{object-regexp} and @var{name-regexp}. ^^^^^^^^^^^^^^^^^^^^^^^^^ Ditto. > +Note that for @code{bar} the entire printer can be disabled, > +as can each individual @code{subprinter}. Why is "subprinter" in @code here? > +When a printer handles several types we call the printer for each type > +a @code{subprinter}. @dfn, and I suggest to rephrase as above. > +@node gdb.printing > +@subsubsection gdb.printing An index entry here, please. Thanks.