This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Symbol Separation - Debugging
On Wed, Jul 02, 2003 at 12:05:26PM -0400, Jason Merrill wrote:
> On Wed, 2 Jul 2003 11:57:00 -0400, Daniel Jacobowitz <drow@mvista.com> wrote:
>
> > On Wed, Jul 02, 2003 at 08:44:26AM -0700, Devang Patel wrote:
> >> True DWARF2 is not used by compiler tool chain on my platform. I think,
> >> this can
> >> be used for DWARF2 also.
> >
> > It can probably be used by DWARF2, but in order to give some of the
> > more expressive information that DWARF2 is capable of it's going to
> > need to be a whole lot more complicated. For instance, if a header
> > contains an inline function then the generated debug info could
> > reference that inline function, but generating the reference is tricky.
> > Might require both compiler work to read in the debug info and a linker
> > or DWARF2 extension to specify the references.
>
> The -feliminate-dwarf2-dups code separates out debug info for a particular
> header into a separate compilation unit, and uses symbolic references to
> get at it. Duplicates are eliminated using .linkonce.
Right; the difference between that code and this is that the references
are in the same object file, so we can use DW_FORM_ref. That won't
work into a different object file. And we'd need to parse the object
file to get DIE numbers, too. Ugh!
Devang, how does this work for stabs - if the header declares a type,
how does the rest of the generated object file get the type number if
we don't emit symbols for the header? Or do we avoid it somehow (named
crossrefs?)?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer