This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Regression on qsort_cmp [Re: status of Darwin support]
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: Tristan Gingold <gingold at adacore dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb at sourceware dot org
- Date: Tue, 8 Sep 2009 09:04:24 -0400
- Subject: Re: Regression on qsort_cmp [Re: status of Darwin support]
- References: <200908041804.30240.thiago.bauermann@gmail.com> <20090805044504.GJ4370@adacore.com> <4A7ABAF0.7010004@Sun.COM> <C11EE4DE-A0A0-4A9E-A86E-9153A7AC81C8@adacore.com> <4A7FFAB3.7080903@Sun.COM> <m33a7z8qq5.fsf@fleche.redhat.com> <8ac60eac0908101320k6cc20e9age92656cba254a5d4@mail.gmail.com> <4A812B8B.8040202@Sun.COM> <20090825084613.GA22242@host0.dyn.jankratochvil.net> <D75C035C-62BE-4782-9B96-C50725FC7B40@adacore.com>
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