From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30954 invoked by alias); 28 Mar 2011 09:12:40 -0000 Received: (qmail 30945 invoked by uid 22791); 28 Mar 2011 09:12:39 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Mar 2011 09:12:35 +0000 From: "jan.kratochvil at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/48229] DW_TAG_type_unit has no DW_AT_producer X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 28 Mar 2011 09:34:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg02838.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48229 --- Comment #5 from Jan Kratochvil 2011-03-28 09:12:20 UTC --- Created attachment 23788 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23788 GDB patch attempt with ptype regressions. (In reply to comment #4) > Still I believe DW_TAG_type_unit should have DW_AT_producer as it is a > standalone entity - but currently it is not. I guess I have to implement your > described althorithm into GDB instead. It cannot work as GDB often looks up the type without any referrer from DW_TAG_compile_unit, such as during the `ptype' GDB command. A draft patch thus has many regressions such as: -PASS: gdb.base/nofield.exp: ptype struct not_empty +FAIL: gdb.base/nofield.exp: ptype struct not_empty (GDB internal error) This means GDB will have to start full read (like -readnow) of CUs till it finds some CU referencing the specific type to find its DW_AT_producer. During scan of .debug_info for GDB partial symbols GDB currently skips over subtrees of DIEs which reference the type signature for performance reasons, it no longer can. With .gdb_index there is no GDB partial symbols scan but .gdb_index also indexes types by their name and there is no referrer ever seen during the `ptype' GDB command. So it means performance regression for non-.gdb_index case and a possible new extension/version of .gdb_index to handle it.