From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7905 invoked by alias); 15 May 2008 18:19:54 -0000 Received: (qmail 7878 invoked by uid 22791); 15 May 2008 18:19:52 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 15 May 2008 18:19:34 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 64F1E3BA32; Thu, 15 May 2008 11:19:32 -0700 (PDT) Subject: Re: Overlay support broken (Re: [patch] [2/2] Discontiguous PSYMTABs (psymtabs->symtabs by addrmap)) From: Michael Snyder To: Jan Kratochvil Cc: gdb-patches@sources.redhat.com In-Reply-To: <20080515101100.GA3624@host0.dyn.jankratochvil.net> References: <20080512203232.GA28415@host0.dyn.jankratochvil.net> <200805131700.m4DH0mDf006985@d12av02.megacenter.de.ibm.com> <20080515101100.GA3624@host0.dyn.jankratochvil.net> Content-Type: text/plain Date: Thu, 15 May 2008 19:18:00 -0000 Message-Id: <1210875572.4615.607.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit 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: 2008-05/txt/msg00476.txt.bz2 On Thu, 2008-05-15 at 12:11 +0200, Jan Kratochvil wrote: > On Tue, 13 May 2008 19:00:48 +0200, Ulrich Weigand wrote: > ... > > Which parts of GDB do you think do not support overlays? I'd be interested > > in fixing such problems ... > > There is still a lot of stub functions X() just calling X_sect() using > find_pc_mapped_section(), these should get removed as otherwise one may find > a countercase where it fails for the overlayed sections. > [blockvector_for_pc, block_for_pc, find_pc_psymtab, find_pc_psymbol, > find_pc_symtab, find_pc_section, find_pc_function] ? It's been 10 years, but I think that's the way it is supposed to work. Old code calls X(), without supplying a section. Then X forwards the call to X_sect() after attempting to lookup the appropriate section. In most cases this should not be critical for overlays, because code that depends on overlays should be calling X_sect() directly. It was just a shortcut so that we wouldn't have to change all the calls of X into X_sect (and do the section lookup in many places instead of one).