This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: When to emit C++ debug info?
- From: Geoff Keating <geoffk at desire dot geoffk dot org>
- To: sabre at nondot dot org
- Cc: dberlin at dberlin dot org, snyder at fnal dot gov, drow at mvista dot com, gcc at gcc dot gnu dot org
- Date: Sun, 4 Jan 2004 00:15:32 -0800
- Subject: Re: When to emit C++ debug info?
- References: <Pine.LNX.4.44.0401040214420.16194-100000@nondot.org>
> Date: Sun, 4 Jan 2004 02:15:59 -0600 (CST)
> From: Chris Lattner <sabre@nondot.org>
> On Sat, 3 Jan 2004, Geoff Keating wrote:
>
> > we decide that because 'bar' is alphabetically before 'foo',
> > everything to do with 'bar' will already be output in its .o file, so
> > we don't have to output any of it here (including the definition of
> > 'struct x'). For C++, you would decide that vtable definitions come
> > "before" everything else, so debug information gets output with the
> > vtable if there is one.
>
> This is precisely the kind of thing that caused the original problem: lack
> of debug information being emitted when you just _use_ libraries. ie, you
> don't recompile them, so you only have debug information for part of the
> program.
Yes. In my original message,
<http://gcc.gnu.org/ml/gcc/2004-01/msg00142.html>, not quoted above, I
said:
> I think we'll want to be able to do it these ways:
>
> - One way where the minimal debugging information is emitted so that
> when put together, the whole program has complete debugging
> information; and
> - Another way where complete information is emitted for a single file.
>
> I'm not sure why you'd want something between these two extremes. I
> don't think it's unreasonable to ask distributors to provide debugging
> information for libraries; chances are, someone debugging a program is
> going to want some debugging information for libraries anyway.
The design you quoted at the top was directed at the first alternative.
--
- Geoffrey Keating <geoffk@geoffk.org>