]> code.ossystems Code Review - openembedded-core.git/commitdiff
Add patch that fixes a bug in oparchive that resulted in the the debug data
authorRobert Bradford <rob@openedhand.com>
Wed, 17 Jan 2007 15:59:58 +0000 (15:59 +0000)
committerRobert Bradford <rob@openedhand.com>
Wed, 17 Jan 2007 15:59:58 +0000 (15:59 +0000)
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

meta/packages/oprofile/oprofile/oparchive-debug-dir.patch [new file with mode: 0644]
meta/packages/oprofile/oprofile_cvs.bb

diff --git a/meta/packages/oprofile/oprofile/oparchive-debug-dir.patch b/meta/packages/oprofile/oprofile/oparchive-debug-dir.patch
new file mode 100644 (file)
index 0000000..b87cd64
--- /dev/null
@@ -0,0 +1,24 @@
+Index: oprofile/pp/oparchive.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive.cpp     2007-01-17 15:55:12.000000000 +0000
++++ oprofile/pp/oparchive.cpp  2007-01-17 15:55:39.000000000 +0000
+@@ -97,8 +97,17 @@
+                       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);
+                       }
index d6de526b0701b14e1ae85374878878310a0fb766..71cf31ae22673a4ee81a5f0ae1255d4ec26ff515 100644 (file)
@@ -8,6 +8,7 @@ DEPENDS = "popt binutils"
 
 SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=oprofile \
           file://oprofile_eabi.patch;patch=1 \
+          file://oparchive-debug-dir.patch;patch=1 \
           file://acinclude.m4"
 S = "${WORKDIR}/oprofile"