blob: 43a4bbd8c7f6bb03c468dd6ecf2464cb9c37edb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
Index: oprofile/pp/oparchive.cpp
===================================================================
--- oprofile.orig/pp/oparchive.cpp
+++ oprofile/pp/oparchive.cpp
@@ -97,8 +97,17 @@ int oparchive(options::spec const & spec
if (find_separate_debug_file(ibfd, dirname, global,
debug_filename)) {
/* found something copy it over */
- string dest_debug = options::outdirectory +
- dirname + "/" +
+ string dest_debug_dir = options::outdirectory +
+ dirname + "/.debug/";
+ if (mkdir(dest_debug_dir.c_str(),0755) < 0) {
+ if (errno!=EEXIST) {
+ cerr << "Unable to create directory: "
+ << dest_debug_dir << "." << endl;
+ exit (EXIT_FAILURE);
+ }
+ }
+
+ string dest_debug = dest_debug_dir +
op_basename(debug_filename);
copy_one_file(image_ok, debug_filename, dest_debug);
}
|