[patch] Discontiguous PSYMTABs

Jan Kratochvil jan.kratochvil@redhat.com
Mon Dec 17 02:41:00 GMT 2007


On Mon, 17 Dec 2007 02:02:17 +0100, Daniel Jacobowitz wrote:
> On Sun, Dec 16, 2007 at 07:56:41PM -0500, Daniel Jacobowitz wrote:
> > On Sun, Dec 09, 2007 at 09:31:38PM +0100, Jan Kratochvil wrote:
> > > Attaching the fix for discontiguous psymtabs based on the addrmap framework.
> > > 
> > > This one is a conservative one - it tries to just fix it with minimal changes.
> > > It is bidirectionally compatible:
> > >  * Producer (dwarf2read.c) still tries to set the bounds TEXTLOW and TEXTHIGH.
> > >  * Consumer (symtab.c) deals with both set and unset PSYMTABS_ADDRMAP.
> > 
> > This looks OK to me.  Thanks for doing it!
> 
> Oops, maybe not.  I've just thought of another case where we might
> have trouble.  What if one file contains DW_AT_ranges and another file
> only contains stabs?

"file" here is OBJFILE?  In such case the patch behaves right - it search each
OBJFILE by ALL_OBJFILES separately.

If "file" is CU it is IMO not possible to combine multiple debug formats inside
one OBJFILE, right?


> If we trust the addrmap, will we still find the file with stabs?  We
> may need to fall through.

Existing PSYMTABS_ADDRMAP will catch only the really present addresses, it has
no false positives.  In other cases it should be IMO backward compatible as it
will fallback to the code emulating the old one.


Could you please give a more specific counterexample?



Thanks,
Jan



More information about the Gdb-patches mailing list