This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regression on qsort_cmp [Re: status of Darwin support]



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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]