summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Bradford <rob@openedhand.com>2007-01-17 15:59:58 (GMT)
committerRobert Bradford <rob@openedhand.com>2007-01-17 15:59:58 (GMT)
commite1140fb8f9c4c4c29917bab48af25095e0205348 (patch)
tree60f18de6a6d3c1df7d680828edcc675d3bfcdc05
parentb26da611c8e883819f3d13b30190ae27116c4da4 (diff)
downloadpoky-e1140fb8f9c4c4c29917bab48af25095e0205348.tar.gz
Add patch that fixes a bug in oparchive that resulted in the the debug data
overwriting the executables themselves. The patch fixes this by always putting the debug data into a .debug subdirectory. This will then be picked up by opreport when reading the archive in. The oprofile_cvs.bb recipe was updated to use this patch. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1158 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/oprofile/oprofile/oparchive-debug-dir.patch24
-rw-r--r--meta/packages/oprofile/oprofile_cvs.bb1
2 files changed, 25 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 0000000..b87cd64
--- /dev/null
+++ b/meta/packages/oprofile/oprofile/oparchive-debug-dir.patch
@@ -0,0 +1,24 @@
1Index: 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 }
diff --git a/meta/packages/oprofile/oprofile_cvs.bb b/meta/packages/oprofile/oprofile_cvs.bb
index d6de526..71cf31a 100644
--- a/meta/packages/oprofile/oprofile_cvs.bb
+++ b/meta/packages/oprofile/oprofile_cvs.bb
@@ -8,6 +8,7 @@ DEPENDS = "popt binutils"
8 8
9SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=oprofile \ 9SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=oprofile \
10 file://oprofile_eabi.patch;patch=1 \ 10 file://oprofile_eabi.patch;patch=1 \
11 file://oparchive-debug-dir.patch;patch=1 \
11 file://acinclude.m4" 12 file://acinclude.m4"
12S = "${WORKDIR}/oprofile" 13S = "${WORKDIR}/oprofile"
13 14