FYI: doc fix for pretty-printer registration
Tom Tromey
tromey@redhat.com
Thu Dec 1 20:27:00 GMT 2011
I'm checking this in.
I was writing a little pretty-printer today and consulted the docs.
They mention using the 'add' method, but this is wrong; the method is
called 'append'.
Tom
2011-12-01 Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Writing a Pretty-Printer): Use append method, not
add.
Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.901
diff -u -r1.901 gdb.texinfo
--- gdb.texinfo 22 Nov 2011 21:25:18 -0000 1.901
+++ gdb.texinfo 1 Dec 2011 20:26:33 -0000
@@ -22591,7 +22591,7 @@
@smallexample
def register_printers(objfile):
- objfile.pretty_printers.add(str_lookup_function)
+ objfile.pretty_printers.append(str_lookup_function)
@end smallexample
@noindent
More information about the Gdb-patches
mailing list