This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: When to emit C++ debug info?
Daniel Jacobowitz <drow@mvista.com> writes:
> On Sun, Jan 04, 2004 at 03:12:11AM -0800, Geoff Keating wrote:
> > > Date: Sun, 4 Jan 2004 02:36:06 -0600 (CST)
> > > From: Chris Lattner <sabre@nondot.org>
> >
> > > On Sun, 4 Jan 2004, Geoff Keating wrote:
> > > > > 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.
> > > >
> > > > The design you quoted at the top was directed at the first alternative.
> > >
> > > Ah, I see: Sorry! But isn't this basically what already exists?
> >
> > I think so; but this thread is proposing to change what's there now,
> > isn't it?
>
> I think that my point is, in the absence of something like symbol
> separation implemented for dwarf2, the current status quo is not
> adequate.
No, *my* point is that you don't need symbol separation if you have
something like the design I proposed.
I really think that symbol separation is not the best answer. We've
tried it at Apple, and although it's quite clear that it works, it's
also clear that it's difficult to use. A solution that works nearly
as well, but doesn't require any effort to use, will be much better,
because then people will actually use it.
> It sounds like Ben agrees with me and you don't - you said a dozen
> messages back that you thought distributors should provide debug
> information for libraries. I can tell you for a fact that that will
> never happen. A lot of vendors provide binary-only C++ libraries with
> a C++ interface. People in the business of providing code without its
> source generally don't want to include debugging information, so GCC
> needs to be able to provide useful results for this case.
You can always generate debugging information from the headers, if
you're a user who has been given a library without debugging
information---or just ask for full debugging information from the
compiler for one file in your project that uses the library. I think
that full information shouldn't be the default, though, because the
circumstance of using a binary-only C++ library which has no debugging
information is fairly rare and the problems caused are minor and
easily fixed if encountered.
By 'distributors', I meant system distributors, who provide an OS and
a compiler; like Red Hat, Debian, Apple, MontaVista.
--
- Geoffrey Keating <geoffk@geoffk.org>