This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] docs to register_pretty_printer `replace' arg
- From: dje at google dot com (Doug Evans)
- To: eliz at gnu dot org, gdb-patches at sourceware dot org
- Date: Fri, 7 Oct 2011 16:05:04 -0700 (PDT)
- Subject: [commit] docs to register_pretty_printer `replace' arg
Heh,
And here's the docs.
ref: http://sourceware.org/ml/gdb-patches/2011-10/msg00212.html
Eli, if you want any corrections, let me know.
2011-10-07 Doug Evans <dje@google.com>
* gdb.texinfo (gdb.printing): Document new `replace' arg to
register_pretty_printer.
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.871
diff -u -p -r1.871 gdb.texinfo
--- doc/gdb.texinfo 7 Oct 2011 13:23:18 -0000 1.871
+++ doc/gdb.texinfo 7 Oct 2011 23:00:36 -0000
@@ -24001,8 +24001,11 @@ Utility class for handling multiple prin
regular expressions.
@xref{Writing a Pretty-Printer}, for an example.
-@item register_pretty_printer (@var{obj}, @var{printer})
+@item register_pretty_printer (@var{obj}, @var{printer}, @var{replace}=False)
Register @var{printer} with the pretty-printer list of @var{obj}.
+If @var{replace} is @code{True} then any existing copy of the printer
+is replaced. Otherwise a @code{RuntimeError} exception is raised
+if a printer with the same name already exists.
@end table
@node gdb.types