[PATCH] add option to eliminate unused types in dwarf2 output (v2)

Daniel Jacobowitz drow@mvista.com
Thu Jul 4 18:19:00 GMT 2002


On Thu, Jul 04, 2002 at 09:00:22PM -0400, Daniel Jacobowitz wrote:
> I've got a couple of comments about your choices here.

And one more...

> These, on the other hand, are very different.  If you describe the type
> of a class, you need to describe it correctly.  GDB has no business
> assuming that different definitions should be "merged".  It should
> instead assume that they represent two different classes, which is
> obviously untrue.  I believe that any referenced class should have all
> of its debugging information included, and any called function should
> also have its debugging information present even if the function
> definition is in another CU - say, off in a stripped libc!
> 
> There's no point in including incorrect debug information; its affect
> on the GDB testsuite is the important ruler for this.

I should add that the correct way to implement this space savings is to
support creating inter-CU references properly and eliminating them at
link time.  Dan Berlin has and/or committed most of the appropriate
code to make GCC generate these things, probably on a branch.  GDB
doesn't yet read them and I'm not sure of the state of linker support.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gcc-patches mailing list