From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9362 invoked by alias); 8 Sep 2009 09:31:31 -0000 Received: (qmail 9253 invoked by uid 22791); 8 Sep 2009 09:31:29 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SARE_SUB_OBFU_Q1 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Sep 2009 09:31:20 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id BA86129003A; Tue, 8 Sep 2009 11:31:16 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3ECIRa+1vQnC; Tue, 8 Sep 2009 11:31:16 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id EDE13290035; Tue, 8 Sep 2009 11:31:15 +0200 (CEST) Cc: gdb@sourceware.org Message-Id: From: Tristan Gingold To: Jan Kratochvil In-Reply-To: <20090825084613.GA22242@host0.dyn.jankratochvil.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: Regression on qsort_cmp [Re: status of Darwin support] Date: Tue, 08 Sep 2009 09:31:00 -0000 References: <4A5F8D9E.1060307@Sun.COM> <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> 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/msg00130.txt.bz2 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.