This is the mail archive of the gcc-help@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]
Other format: [Raw text]

How to generate line number debug information only?


Hi,

I would like to improve the build speed of a large project. The opt build is compiled with -O2 -g. I noticed that without -g, compilation becomes faster, about 10-20%. The resulting binary has enough information to analyze crashes, except for the line numbers. Is there a way to include line number information but nothing else?

According to [1], line numbers are produced only at level 2 (i.e. -g2 or the default of -g) or above. But according to [2], line numbers are only a fraction of the debug information (1%). So for me it would be best to have -g0 or -g1 but with line numbers. Is this possible?

[1] http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html
[2] http://gcc.gnu.org/wiki/DebugFission

Best regards,
Martin Richtarsky


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