From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15189 invoked by alias); 22 Jul 2010 22:11:34 -0000 Received: (qmail 15180 invoked by uid 22791); 22 Jul 2010 22:11:33 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Jul 2010 22:11:26 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6MMBOMv030840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 22 Jul 2010 18:11:24 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6MMBM7M013894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 22 Jul 2010 18:11:23 -0400 Message-ID: <4C48C209.10708@redhat.com> Date: Thu, 22 Jul 2010 22:11:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Lightning/1.0b2pre Thunderbird/3.0.4 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [RFA] Pre-expand psymtabs for STATIC_BLOCK types Content-Type: multipart/mixed; boundary="------------060508050204090605010508" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-07/txt/msg00357.txt.bz2 This is a multi-part message in MIME format. --------------060508050204090605010508 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 362 Hi, In basic_lookup_transparent_type, we call the pre-expand psymtabs hook for the GLOBAL_BLOCK but not for the STATIC_BLOCK. I believe this was a simple omission (as opposed to intentional). Ok? Keith ChangeLog 2010-07-22 Keith Seitz * symtab.c (basic_lookup_transparent_type): Call pre-expand hook for STATIC_BLOCK types, too. --------------060508050204090605010508 Content-Type: text/plain; name="pre-expand-static.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pre-expand-static.patch" Content-length: 1100 Index: symtab.c =================================================================== RCS file: /cvs/src/src/gdb/symtab.c,v retrieving revision 1.245 diff -u -p -r1.245 symtab.c --- symtab.c 16 Jul 2010 19:23:56 -0000 1.245 +++ symtab.c 22 Jul 2010 22:03:05 -0000 @@ -1642,14 +1642,21 @@ basic_lookup_transparent_type (const cha conversion on the fly and return the found symbol. */ - ALL_PRIMARY_SYMTABS (objfile, s) + ALL_OBJFILES (objfile) { - bv = BLOCKVECTOR (s); - block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - sym = lookup_block_symbol (block, name, STRUCT_DOMAIN); - if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + if (objfile->sf) + objfile->sf->qf->pre_expand_symtabs_matching (objfile, STATIC_BLOCK, + name, STRUCT_DOMAIN); + + ALL_OBJFILE_SYMTABS (objfile, s) { - return SYMBOL_TYPE (sym); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } } } --------------060508050204090605010508--