From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31321 invoked by alias); 9 Mar 2005 01:46:02 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31279 invoked from network); 9 Mar 2005 01:45:58 -0000 Received: from unknown (HELO sj-iport-2.cisco.com) (171.71.176.71) by sourceware.org with SMTP; 9 Mar 2005 01:45:58 -0000 Received: from sj-core-2.cisco.com (171.71.177.254) by sj-iport-2.cisco.com with ESMTP; 08 Mar 2005 18:00:02 -0800 Received: from msnyder8600 (dhcp-128-107-166-21.cisco.com [128.107.166.21]) by sj-core-2.cisco.com (8.12.10/8.12.6) with SMTP id j291jpq8026217; Tue, 8 Mar 2005 17:45:53 -0800 (PST) Message-ID: <006c01c52449$bcd9a580$15a66b80@msnyder8600> From: "Michael Snyder" To: Cc: Subject: [plaintive noise] Andrew, this old change broke things Date: Wed, 09 Mar 2005 01:46:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-SW-Source: 2005-03/txt/msg00136.txt.bz2 Hi Andrew, I only just had occasion to notice this change that you made a year ago: 2004-02-09 Andrew Cagney * blockframe.c (find_pc_partial_function): If find_pc_overlay fails, try find_pc_section. Fix PR c++/1267. * minsyms.c (lookup_minimal_symbol_by_pc): Use find_pc_section instead of find_pc_mapped_section. (lookup_minimal_symbol_by_pc_section): If the SECTION is NULL, do not default to the section containing PC. Fix PR symtab/1519. This is not-the-right-thing (tm), and it breaks things. The "section" argument for these functions was introduced *only* for the purpose of overlays. In fact, all of the functions with like "pc_section" in their names are overlay-aware versions of other, simpler, pre-existing functions. The *only* difference between, for instance, find_pc_psymtab and find_pc_sect_psymtab is supposed to be that the later works in the presence of overlays. lookup_minimal_symbol_by_pc calls find_pc_mapped_section, which *only* returns a non-zero argument if overlay debugging is in effect. In all other cases, lookup_minimal_symbol_by_pc should be identical in effect to lookup_minimal_symbol_by_pc_section. If you're not debugging overlays, the section argument should be zero. Your comment explains that you found it to be zero most of the time (which you did not realize was intentional), and so substituted a call to find_pc_section -- but that defeats the intent. If you can tell me what problem you were trying to solve, I might be able to help figure out the right solution. Michael