This is a tracking bug for the patch posted here: https://sourceware.org/ml/gdb-patches/2015-03/msg00312.html It turns out there's a couple of other problems. Patch and testcase to follow.
Patch posted here: https://sourceware.org/ml/gdb-patches/2015-04/msg00837.html
The master branch has been updated by Doug Evans <devans@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=34f5f757b389e8fb3eab64f816e484c2cc434292 commit 34f5f757b389e8fb3eab64f816e484c2cc434292 Author: Doug Evans <dje@google.com> Date: Tue Apr 28 22:14:23 2015 -0700 PR python/18299 gdb/ChangeLog: PR python/18299 * python/lib/gdb/printing.py (register_pretty_printer): Handle name or __name__ attributes. Handle gdb module as first argument. gdb/testsuite/ChangeLog: * gdb.python/py-pp-maint.py: Move "replace" testing to ... * gdb.python/py-pp-registration.exp: ... here. New file. * gdb.python/py-pp-registration.c: New file. * gdb.python/py-pp-registration.py: New file.
patch committed
The gdb-7.9-branch branch has been updated by Doug Evans <devans@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7d4281ee53df975135c132970e053a74bb18877a commit 7d4281ee53df975135c132970e053a74bb18877a Author: Doug Evans <dje@google.com> Date: Tue Apr 28 22:43:26 2015 -0700 PR python/18299 gdb/ChangeLog: PR python/18299 * python/lib/gdb/printing.py (register_pretty_printer): Handle name or __name__ attributes. Handle gdb module as first argument. gdb/testsuite/ChangeLog: * gdb.python/py-pp-maint.py: Move "replace" testing to ... * gdb.python/py-pp-registration.exp: ... here. New file. * gdb.python/py-pp-registration.c: New file. * gdb.python/py-pp-registration.py: New file.