diff options
Diffstat (limited to 'meta/packages/oprofile/oprofile/oparchive-debug-dir.patch')
-rw-r--r-- | meta/packages/oprofile/oprofile/oparchive-debug-dir.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/packages/oprofile/oprofile/oparchive-debug-dir.patch b/meta/packages/oprofile/oprofile/oparchive-debug-dir.patch new file mode 100644 index 0000000000..b87cd6422e --- /dev/null +++ b/meta/packages/oprofile/oprofile/oparchive-debug-dir.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Index: oprofile/pp/oparchive.cpp | ||
2 | =================================================================== | ||
3 | --- oprofile.orig/pp/oparchive.cpp 2007-01-17 15:55:12.000000000 +0000 | ||
4 | +++ oprofile/pp/oparchive.cpp 2007-01-17 15:55:39.000000000 +0000 | ||
5 | @@ -97,8 +97,17 @@ | ||
6 | if (find_separate_debug_file(ibfd, dirname, global, | ||
7 | debug_filename)) { | ||
8 | /* found something copy it over */ | ||
9 | - string dest_debug = options::outdirectory + | ||
10 | - dirname + "/" + | ||
11 | + string dest_debug_dir = options::outdirectory + | ||
12 | + dirname + "/.debug/"; | ||
13 | + if (mkdir(dest_debug_dir.c_str(),0755) < 0) { | ||
14 | + if (errno!=EEXIST) { | ||
15 | + cerr << "Unable to create directory: " | ||
16 | + << dest_debug_dir << "." << endl; | ||
17 | + exit (EXIT_FAILURE); | ||
18 | + } | ||
19 | + } | ||
20 | + | ||
21 | + string dest_debug = dest_debug_dir + | ||
22 | op_basename(debug_filename); | ||
23 | copy_one_file(image_ok, debug_filename, dest_debug); | ||
24 | } | ||