Bug 18299 - exception when registering a global pretty-printer in verbose mode
Summary: exception when registering a global pretty-printer in verbose mode
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: python (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-22 19:00 UTC by dje
Modified: 2015-04-29 05:45 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dje 2015-04-22 19:00:22 UTC
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.
Comment 1 dje 2015-04-22 19:54:01 UTC
Patch posted here:

https://sourceware.org/ml/gdb-patches/2015-04/msg00837.html
Comment 2 cvs-commit@gcc.gnu.org 2015-04-29 05:17:02 UTC
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.
Comment 3 dje 2015-04-29 05:18:16 UTC
patch committed
Comment 4 cvs-commit@gcc.gnu.org 2015-04-29 05:45:52 UTC
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.