Do not open .gcda/.gcno files in write mode unnecessarily.
Ben Elliston
bje@au1.ibm.com
Fri Sep 18 01:26:00 GMT 2009
On Thu, 2009-09-17 at 11:23 -0700, Neil Vachharajani wrote:
> GCC currently always opens .gcda/.gcno files in write mode. This
> leads to permission denied errors when opening these files if the
> files are read-only. Having read-only .gcda files is useful to ensure
> that one does not unintentionally modify profile data (by default, an
> instrumented binary will append to .gcda files).
I agree with the need to allow users to protect profile data in this
way. I just wonder if the runtime code should produce a warning so that
users don't have to spend debugging time trying to work out why their
profile data isn't being updated?
Cheers,
Ben
More information about the Gcc-patches
mailing list