This is the mail archive of the gcc-patches@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]

Re: Do not open .gcda/.gcno files in write mode unnecessarily.


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



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