summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-23 10:20:01 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-23 10:20:01 +0000
commitea1e63527fa3f6262ee10eafc92f1e01fa70fdc1 (patch)
treeac95219a03635d6a5b7c622bcd2f14c557f798f6
parent3f25492eee158ad801f510de3a44e6d19824c8a7 (diff)
downloadgcc-ea1e63527fa3f6262ee10eafc92f1e01fa70fdc1.tar.gz
* gcov.c (create_file_names): If no object directory is specified,
keep the directory of the file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174062 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gcov.c17
2 files changed, 14 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e7398cbd1c9..70c97e03f8d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-23 Tristan Gingold <gingold@adacore.com>
+ Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcov.c (create_file_names): If no object directory is specified,
+ keep the directory of the file.
+
2011-05-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (enable_threads): Remove irix; add lynx, tpf; sort list.
diff --git a/gcc/gcov.c b/gcc/gcov.c
index dcbadce4b14..94a1c350c80 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -652,13 +652,12 @@ release_structures (void)
}
}
-/* Generate the names of the graph and data files. If OBJECT_DIRECTORY
- is not specified, these are looked for in the current directory,
- and named from the basename of the FILE_NAME sans extension. If
- OBJECT_DIRECTORY is specified and is a directory, the files are in
- that directory, but named from the basename of the FILE_NAME, sans
- extension. Otherwise OBJECT_DIRECTORY is taken to be the name of
- the object *file*, and the data files are named from that. */
+/* Generate the names of the graph and data files. If OBJECT_DIRECTORY
+ is not specified, these are named from FILE_NAME sans extension. If
+ OBJECT_DIRECTORY is specified and is a directory, the files are in that
+ directory, but named from the basename of the FILE_NAME, sans extension.
+ Otherwise OBJECT_DIRECTORY is taken to be the name of the object *file*
+ and the data files are named from that. */
static void
create_file_names (const char *file_name)
@@ -691,8 +690,8 @@ create_file_names (const char *file_name)
else
{
name = XNEWVEC (char, length + 1);
- name[0] = 0;
- base = 1;
+ strcpy (name, file_name);
+ base = 0;
}
if (base)