Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: RFA: document a python function
Date: Tue, 10 Aug 2010 18:05:00 -0000	[thread overview]
Message-ID: <m3y6cecphz.fsf@fleche.redhat.com> (raw)

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  <tromey@redhat.com>

	* 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
 


             reply	other threads:[~2010-08-10 18:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-10 18:05 Tom Tromey [this message]
2010-08-10 19:54 ` Eli Zaretskii
2010-08-10 20:22   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3y6cecphz.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox