This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: .debug_info in gas
On Thu, Oct 31, 2002 at 09:00:21AM -0800, Richard Henderson wrote:
> On Thu, Oct 31, 2002 at 04:23:00PM +0200, Elias Athanasopoulos wrote:
> > At the moment, gas contibutes only the first source file it assembles
> > in .debug_info. When I proposed to make the change, in order to have
> > mulitple records in .debug_info for every compilation unit, Richard
> > told me that this isn't right. Why?
>
> One object file _is_ one unit of compilation, by definition.
> C headers do not result in multiple translation units, which
> is exactly the same situation.
>
They can, however (It's generally not worth it to split out pieces of
headers into multiple CU's. Other than opaque types, i can't think of
anything that would be duplicated in a compilation of a single file.)
CU's are not supposed to directly map onto any compiler concept.
So please don't try to enforce such a mapping.
IN fact, the Dwarf document specifically says "An object file may
contain one or more compilation units, ..."
See page 35 of the dwarf3 draft 7.
>
> r~