From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13255 invoked by alias); 8 Sep 2009 13:04:41 -0000 Received: (qmail 13149 invoked by uid 22791); 8 Sep 2009 13:04:41 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SARE_SUB_OBFU_Q1 X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Tue, 08 Sep 2009 13:04:26 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id 18294B005D; Tue, 8 Sep 2009 09:04:25 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id n88D4OJb015357; Tue, 8 Sep 2009 09:04:24 -0400 Date: Tue, 08 Sep 2009 13:04:00 -0000 From: Jack Howarth To: Tristan Gingold Cc: Jan Kratochvil , gdb@sourceware.org Subject: Re: Regression on qsort_cmp [Re: status of Darwin support] Message-ID: <20090908130424.GA15336@bromo.med.uc.edu> References: <200908041804.30240.thiago.bauermann@gmail.com> <20090805044504.GJ4370@adacore.com> <4A7ABAF0.7010004@Sun.COM> <4A7FFAB3.7080903@Sun.COM> <8ac60eac0908101320k6cc20e9age92656cba254a5d4@mail.gmail.com> <4A812B8B.8040202@Sun.COM> <20090825084613.GA22242@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00134.txt.bz2 On Tue, Sep 08, 2009 at 11:31:16AM +0200, Tristan Gingold wrote: > > On Aug 25, 2009, at 10:46 AM, Jan Kratochvil wrote: > >> On Tue, 11 Aug 2009 10:27:55 +0200, Christian Thalinger wrote: >>> objfiles.c:793: internal-error: qsort_cmp: Assertion >>> `obj_section_endaddr (sect1) <= sect2_addr' failed. >> >> Getting randomly this error or: >> objfiles.c:817: internal-error: preferred_obj_section: Assertion `(a- >> >objfile->separate_debug_objfile == b->objfile) || (b->objfile- >> >separate_debug_objfile == a->objfile)' failed. >> >> which have both the same reason that solibs overlap in VMAs. >> >> IMO these assertions are right and GDB should rather refuse to load >> overlapping sections. Still they may(?) be required for overlays, >> actively in >> use for IBM Cell (as I was considering overlays as obsolete before >> myself). > > Still late in the game, but I think I now understand the issue: > > On Darwin, debug info are kept in object files. To make gdb work, we > load the executable but also the > symbols from its object files. In update_section map we don't make the > difference between these two. > > IMHO we should slightly extend the notion of separate_debug_objfile so > that Darwin could use it and > then modify update_section_map to correctly deals with that. > > Instead of allowing one separate debug file per objfile, we should allow > many debug files (using a linked > list) (The question of allowing one level or several levels is still > open). > > The section map would flatten the tree and maybe fill the holes in > separate debug files using the father. > > Well, that's the design I have in my mind... > > Tristan. Tristan, When you have any test patches for this, I would be happy to try them on x86_64-apple-darwin10 and i686-apple-darwin10 if you don't have Snow Leopard installed yet. Jack