Someone please correct me if I'm wrong, but in a common
debugging situation optimizing is often turned off in order to
have the generated code match original code a little better,
i.e. stepping through the generated code makes more sense.
But turning off all optimizing slows the code down.
Adding the -g introduces additional information to link
variables/location back to the original code which makes
the resultant code larger.
I have a quick question: does adding debugging information (with -g
and/or friends) make the generated code slower? Thank you.
No.
The -g options do not affect the generated code.
Ian