From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39461 invoked by alias); 29 May 2015 12:06:10 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 39433 invoked by uid 48); 29 May 2015 12:06:09 -0000 From: "jwakely.gcc at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug python/17136] 'info type-printers' causes an exception when there are per-objfile printers Date: Fri, 29 May 2015 12:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: 7.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jwakely.gcc at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00340.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17136 --- Comment #2 from Jonathan Wakely --- Keith, sorry for not replying to your question, not sure why I didn't see it. I still see this in Fedora 22 with: GNU gdb (GDB) Fedora 7.9.1-13.fc22 tmp$ cat > p.cc int main() { return 0; } tmp$ tmp$ tmp$ g++ -g p.cc tmp$ gdb a.out GNU gdb (GDB) Fedora 7.9.1-13.fc22 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from a.out...done. (gdb) python >class Printer(object): > def __init__ (self): > self.name = 'Printer' > self.enabled = True > > class _recognizer(object): > def recognize(self, type_obj): > if type_obj.tag == "Foo": > return "Bar" > return None > > def instantiate(self): > return self._recognizer() >end (gdb) start Temporary breakpoint 1 at 0x4005ba: file p.cc, line 2. Starting program: /tmp/a.out Missing separate debuginfos, use: dnf debuginfo-install glibc-2.21-5.fc22.x86_64 Temporary breakpoint 1, main () at p.cc:2 2 return 0; Missing separate debuginfos, use: dnf debuginfo-install libgcc-5.1.1-1.fc22.x86_64 libstdc++-5.1.1-1.fc22.x86_64 (gdb) python gdb.types.register_type_printer(gdb.current_objfile(), Printer()) (gdb) info type-printers Python Exception 'gdb.Objfile' object has no attribute 'name': Error occurred in Python command: 'gdb.Objfile' object has no attribute 'name' (gdb) -- You are receiving this mail because: You are on the CC list for the bug.