This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs build report



>   > >I don't want to suddenly get lots of mail from folks who can't debug
>   > >their code (because someone installed a libstdc++ with no debug symbols).

>   > Actually, this is a good point.  Although I don't know why c++ debugging
>   > requires library symbols (I can debug my C code even though I can't step
>   > into strcpy (why would I want to?)).

> For example, you can't look at the internals of any classes defined in 
> the library.

It's not only that!  You can't look at class objects themselves: the
debugger won't know what an ostream is.

The reason for this is that debug information in C++ is massive.
Therefore the compiler saves space by emitting the debug information for
a class only in the .o file that implements the class.  If you compile
that one without debugging, there is no debug information anywhere.

This is a feature: the alternative is that every .o file anywhere that
references iostreams classes has duplicate debug info for the iostreams
classes.  It wastes far less disk to store it once with the library.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]