From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1838 invoked by alias); 17 Oct 2006 20:32:19 -0000 Received: (qmail 1762 invoked by uid 22791); 17 Oct 2006 20:32:18 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 17 Oct 2006 20:32:15 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GZvbi-00039e-67 for gdb-patches@sourceware.org; Tue, 17 Oct 2006 16:32:14 -0400 Date: Tue, 17 Oct 2006 20:32:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: Improve separate debug file support for elfutils Message-ID: <20061017203214.GA11728@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20061006202550.GA16735@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061006202550.GA16735@nevyn.them.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00189.txt.bz2 On Fri, Oct 06, 2006 at 04:25:50PM -0400, Daniel Jacobowitz wrote: > It turns out that elfutils's eu-strip differs from objcopy --only-keep-debug > in one important respect: elfutils tends to leave .symtab in the original > file and put a NOBITS copy in the separate debug file, but objcopy moves the > whole symtab. This difference shows up a problem in GDB. > > We search for the section containing the PC in a bunch of places, mostly for > overlay support (does this even still work? no idea). When we look up the > section for the PC, we might find either the copy in the separate debug file > or the original; they cover the same PC ranges. So we need to allow the > two sections to be treated as equal. That's what this patch implements. > I'm not sure how well it would work with overlays - but I don't see a way, > even in theory, to do better. > > The change to "info sym" is a cosmetic improvement, which I made while > trying to find a way to test this portably. The original test was on ARM > with Thumb; we would try to look up the minsym to figure out whether to > set a 2-byte or 4-byte breakpoint, and by failing to find the minsym, > we set the wrong type. I've checked this in; it's separate from the issue Jan reported for relocatable files. -- Daniel Jacobowitz CodeSourcery