diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-03-24 21:59:21 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-04-28 20:46:49 +0200 |
commit | d170ecc9fcb386bd5f62eb86dd6e411e6fcb4cef (patch) | |
tree | 126711b71773887b2d6093a1d0330504d3a62163 /libgcc | |
parent | 336ea18ad7f48d675fce8c97bf3b7a0ee3a5a450 (diff) |
gcov: Add mode to all gcov_open()
gcc/
* gcov-io.cc (gcov_open): Always use the mode parameter.
* gcov-io.h (gcov_open): Declare it unconditionally.
libgcc/
* libgcov-driver-system.c (gcov_exit_open_gcda_file): Open file for
reading and writing.
* libgcov-util.c (read_gcda_file): Open file for reading.
* libgcov.h (gcov_open): Delete declaration.
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/libgcov-driver-system.c | 4 | ||||
-rw-r--r-- | libgcc/libgcov-util.c | 2 | ||||
-rw-r--r-- | libgcc/libgcov.h | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/libgcc/libgcov-driver-system.c b/libgcc/libgcov-driver-system.c index eef6e3cbda1..9abb2fe7f74 100644 --- a/libgcc/libgcov-driver-system.c +++ b/libgcc/libgcov-driver-system.c @@ -309,7 +309,7 @@ gcov_exit_open_gcda_file (struct gcov_info *gi_ptr, gf->filename = replace_filename_variables (gf->filename); - if (!gcov_open (gf->filename)) + if (!gcov_open (gf->filename, 0)) { /* Open failed likely due to missed directory. Create directory and retry to open file. */ @@ -318,7 +318,7 @@ gcov_exit_open_gcda_file (struct gcov_info *gi_ptr, fprintf (stderr, "profiling:%s:Skip\n", gf->filename); return -1; } - if (!gcov_open (gf->filename)) + if (!gcov_open (gf->filename, 0)) { fprintf (stderr, "profiling:%s:Cannot open\n", gf->filename); return -1; diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index 100f1b19f1a..db157220c9d 100644 --- a/libgcc/libgcov-util.c +++ b/libgcc/libgcov-util.c @@ -268,7 +268,7 @@ read_gcda_file (const char *filename) k_ctrs_mask[i] = 0; k_ctrs_types = 0; - if (!gcov_open (filename)) + if (!gcov_open (filename, 1)) { fnotice (stderr, "%s:cannot open\n", filename); return NULL; diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h index 40e845ce3ea..f190547e819 100644 --- a/libgcc/libgcov.h +++ b/libgcc/libgcov.h @@ -343,7 +343,6 @@ extern int __gcov_execve (const char *, char *const [], char *const []) ATTRIBUTE_HIDDEN; /* Functions that only available in libgcov. */ -GCOV_LINKAGE int gcov_open (const char */*name*/) ATTRIBUTE_HIDDEN; GCOV_LINKAGE void gcov_write_summary (gcov_unsigned_t /*tag*/, const struct gcov_summary *) ATTRIBUTE_HIDDEN; |