[Dwarf-Discuss] How best to represent multiple programs in a single file...

David Gross dgross at cup.hp.com
Tue Jan 4 11:40:15 PST 2011


Ralph wrote:

> > >> DWARF doesn't depend on any particular program structure.  There is
> > >> no requirement to have a main() function or a single entry point.
> > > Understood. But is there an implied requirement that a given
> > > instruction location map to no more than one 'source line'?
> > 
> > I'm not sure what DWARF says about this, but it sure doesn't make any
> > sense to me to have a given instruction location map to more than one
> > source line, block, or subroutine.

> Agreed. Hence my sense that I need to split the DWARF information
> for each kernel somehow, so that the DWARF for one kernel doesn't
> get confused with the DWARF for other kernels. I was thinking of
> simply appending the kernel name to each of the standard DWARF
> section names to create a set of kernel-specific DWARF sections, but
> that would obvious 'break' tools like libdwarf, dwarfdump, etc. So I
> came to the list to see if there was something I'm missing...

Is it sufficient to put each kernel in its own DW_TAG_compile_unit?

David



More information about the Dwarf-Discuss mailing list