From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26420 invoked by alias); 7 Dec 2014 17:56:59 -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 26378 invoked by uid 48); 7 Dec 2014 17:56:58 -0000 From: "xdje42 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug symtab/17684] New: lookup of builtin types: correctness and performance issues Date: Sun, 07 Dec 2014 17:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xdje42 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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: 2014-q4/txt/msg00343.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17684 Bug ID: 17684 Summary: lookup of builtin types: correctness and performance issues Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: xdje42 at gmail dot com This bug is to address the correctness and performance issues of gdb's current handling of the lookup of builtin types, as discussed in PR 16994. correctness: Though rare, we should still properly handle it, which is if we're in a file where the STATIC_BLOCK doesn't provide a definition for "double" (basetypes live in STATIC_BLOCK) and the fallback that gdb uses (search all static blocks of all objfiles) happens to find a find a definition of "double" in a file that was compiled with -fshort-double. performance: We search in all static blocks of all objfiles. The definition of "void" is typically not specified in debug info and yet gdb can look up "void" a lot. Thus every time gdb goes to search "void" it will look in all static blocks of all objfiles, find nothing, and only *then* does c-exp.y:classify_name, for example, call language_lookup_primitive_type_by_name. Fixing this will require giving lookup_symbol (et.al.) the ability to return builtin types as symbols. Patch to follow. -- You are receiving this mail because: You are on the CC list for the bug.