From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17143 invoked by alias); 30 Jun 2010 22:37:33 -0000 Received: (qmail 17077 invoked by uid 22791); 30 Jun 2010 22:37:31 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,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; Wed, 30 Jun 2010 22:37:26 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5UMbPu4006121 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 30 Jun 2010 18:37:25 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5UMbPon024437; Wed, 30 Jun 2010 18:37:25 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o5UMbOuK022919; Wed, 30 Jun 2010 18:37:24 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 3AA2537818E; Wed, 30 Jun 2010 16:37:24 -0600 (MDT) From: Tom Tromey To: gdb-patches@sourceware.org Subject: [2/4] RFC: check psymtabs_addrmap before reading FDEs Reply-To: tromey@redhat.com Date: Wed, 30 Jun 2010 22:37:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-06/txt/msg00698.txt.bz2 This patch changes dwarf2_frame_find_fde to check psymtabs_addrmap before trying to read the FDE data. I am not totally convinced this is safe, so comments are especially appreciated here. This patch is actually independent of the rest of the series; it is just a possible optimization I found while working in this area. Tom b/gdb/ChangeLog: 2010-06-30 Tom Tromey * dwarf2-frame.c (dwarf2_frame_find_fde): Check psymtabs_addrmap. >From 3836ada921fcc8605362f51c163774f53d3db1c9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 30 Jun 2010 10:15:34 -0600 Subject: [PATCH 2/4] check psymtabs_addrmap before decoding FDEs --- gdb/ChangeLog | 4 ++++ gdb/dwarf2-frame.c | 7 +++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 9576341..e7c5d31 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -32,6 +32,7 @@ #include "objfiles.h" #include "regcache.h" #include "value.h" +#include "addrmap.h" #include "gdb_assert.h" #include "gdb_string.h" @@ -1593,6 +1594,12 @@ dwarf2_frame_find_fde (CORE_ADDR *pc) CORE_ADDR offset; CORE_ADDR seek_pc; + if (objfile->psymtabs_addrmap) + { + if (!addrmap_find (objfile->psymtabs_addrmap, *pc)) + continue; + } + fde_table = objfile_data (objfile, dwarf2_frame_objfile_data); if (fde_table == NULL) { -- 1.6.2.5