This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: Sun compiler, value field in stab is zero


Hi Gabriel,

> The code in _bfd_stab_section_find_nearest_line() expects to find
> the absolute start address of routines in the value field of the
> stab's N_FUN entries.  Sun compiler does not generate these values,
> hence these fields are always zero in binaries compiled with the Sun
> compiler.

> 2003-04-15  Gabriel Marin <mgabi at rice dot edu>
> 
>     * syms.c (_bfd_stab_section_find_nearest_line): Sun compiler
>     does not set the 'value' field for the N_FUN entries of the stab.
>     Compute the values of these entries using the symbol table
>     information.

Thanks very much for submitting this patch.  Do you have a binutils
copyright assignment on file with the FSF ?  We will need such an
assignment before we can accept the patch.

The patch itself looks OK, although the formatting will need sprucing
up to conform to GNU coding standards.  The linear search of the symbol
table for each zero valued NFUN entry does look rather worrying
however.  For a large executable I suspect that this could generate a
significant delay the first time a source line is looked up.

Would it be possible to change the code to use a hash table ?  Or
maybe a lazy evaluation scheme, such that zero valued NFUN stabs are
only looked up as needed ?

Cheers
        Nick



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