From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20811 invoked by alias); 24 Mar 2010 20:18:40 -0000 Received: (qmail 20802 invoked by uid 22791); 24 Mar 2010 20:18:38 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 24 Mar 2010 20:18:35 +0000 Received: (qmail 14349 invoked from network); 24 Mar 2010 20:18:33 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 Mar 2010 20:18:33 -0000 Date: Wed, 24 Mar 2010 20:18:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [patch] Fix separate-debug with non-unique section names (PR 11409) Message-ID: <20100324201825.GA31992@caradoc.them.org> Mail-Followup-To: Jan Kratochvil , Tom Tromey , gdb-patches@sourceware.org References: <20100323205655.GA12124@host0.dyn.jankratochvil.net> <20100324200943.GA12225@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100324200943.GA12225@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.20 (2009-06-14) 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-03/txt/msg00817.txt.bz2 On Wed, Mar 24, 2010 at 09:09:43PM +0100, Jan Kratochvil wrote: > While the algorithm could be much more clever - if we ever need to resync at > the point of non-unique section names the files are too different it makes no > sence to try to match them by addr_info_make_relative at all. What if we assume that in a valid separate debug file, the only sections that will be different will have been totally stripped from either the before or after file? IOW: i = 0 // index in main file j = 0 // index in separate file for each section in main file: if (section names match) good else if (section i's name is not present in separate file) i++, continue else if (section j's name is not present in separate file) j++, continue else complain that the two files do not match ? -- Daniel Jacobowitz CodeSourcery