This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RFA: document a python function
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 10 Aug 2010 12:05:28 -0600
- Subject: RFA: document a python function
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