
2 Dec
2009
2 Dec
'09
8:40 a.m.
Mikael Olenfalk wrote:
Just a quick note regarding debug compilation:
On Wed, Dec 2, 2009 at 8:06 AM, Vladimir Prus <vladimir@codesourcery.com> wrote:
- a 387K object file
Let me check this. I am using -O2
That's not debug build, for sure.
The -O2 setting only controls optimization, the -g flag is for enabling debug. You can have debug builds and turn on optimization at the same time, check for the presence of the -g flag (presence = debug)
I know fairly well what -O2 and -g do, and I stand by my earlier statement. -O2 makes debugging experience sufficiently painful that nobody will ever want to use that in debug builds, except in very unusual circumstances -- like tracking down a bug that only occurs at -O2 in the first place. - Volodya