public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/PR97193-mangled-gcno-files)] GCOV: do not mangle .gcno files. Date: Fri, 25 Sep 2020 08:54:23 +0000 (GMT) [thread overview] Message-ID: <20200925085423.87061385780A@sourceware.org> (raw) https://gcc.gnu.org/g:a457b0faeaaa2e08ecab4ef9768b54c0de008094 commit a457b0faeaaa2e08ecab4ef9768b54c0de008094 Author: Martin Liska <mliska@suse.cz> Date: Fri Sep 25 10:53:26 2020 +0200 GCOV: do not mangle .gcno files. gcc/ChangeLog: PR gcov-profile/97193 * coverage.c (coverage_init): GCDA note files should not be mangled and should end in output directory. Diff: --- gcc/coverage.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gcc/coverage.c b/gcc/coverage.c index f353c9c5022..7711412c3be 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -1206,6 +1206,8 @@ coverage_obj_finish (vec<constructor_elt, va_gc> *ctor) void coverage_init (const char *filename) { + const char *original_filename = filename; + int original_len = strlen (original_filename); #if HAVE_DOS_BASED_FILE_SYSTEM const char *separator = "\\"; #else @@ -1277,9 +1279,9 @@ coverage_init (const char *filename) bbg_file_name = xstrdup (profile_note_location); else { - bbg_file_name = XNEWVEC (char, len + strlen (GCOV_NOTE_SUFFIX) + 1); - memcpy (bbg_file_name, filename, len); - strcpy (bbg_file_name + len, GCOV_NOTE_SUFFIX); + bbg_file_name = XNEWVEC (char, original_len + strlen (GCOV_NOTE_SUFFIX) + 1); + memcpy (bbg_file_name, original_filename, original_len); + strcpy (bbg_file_name + original_len, GCOV_NOTE_SUFFIX); } if (!gcov_open (bbg_file_name, -1))
reply other threads:[~2020-09-25 8:54 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200925085423.87061385780A@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).