summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/debugedit')
-rw-r--r--dev-util/debugedit/ChangeLog10
-rw-r--r--dev-util/debugedit/debugedit-5.3.5-r1.ebuild39
-rw-r--r--dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch129
3 files changed, 176 insertions, 2 deletions
diff --git a/dev-util/debugedit/ChangeLog b/dev-util/debugedit/ChangeLog
index 3576450f0a67..d8b5906a3290 100644
--- a/dev-util/debugedit/ChangeLog
+++ b/dev-util/debugedit/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-util/debugedit
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/debugedit/ChangeLog,v 1.23 2011/10/11 03:53:15 vapier Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/debugedit/ChangeLog,v 1.24 2012/01/25 19:28:35 vapier Exp $
+
+*debugedit-5.3.5-r1 (25 Jan 2012)
+
+ 25 Jan 2012; Mike Frysinger <vapier@gentoo.org> +debugedit-5.3.5-r1.ebuild,
+ +files/debugedit-5.3.5-DWARF-4.patch:
+ Add DWARF 4 support #400663 by Francesco Riosa.
*debugedit-5.3.5 (11 Oct 2011)
diff --git a/dev-util/debugedit/debugedit-5.3.5-r1.ebuild b/dev-util/debugedit/debugedit-5.3.5-r1.ebuild
new file mode 100644
index 000000000000..97ea375dad3c
--- /dev/null
+++ b/dev-util/debugedit/debugedit-5.3.5-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/debugedit/debugedit-5.3.5-r1.ebuild,v 1.1 2012/01/25 19:28:35 vapier Exp $
+
+# To recreate this tarball, just grab latest rpm5 release:
+# http://rpm5.org/files/rpm/
+# The files are in tools/
+# Or see $FILESDIR/update.sh
+
+EAPI="2"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="standalone debugedit taken from rpm"
+HOMEPAGE="http://www.rpm5.org/"
+SRC_URI="http://dev.gentoo.org/~swegener/distfiles/${P}.tar.bz2
+ http://dev.gentoo.org/~vapier/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+DEPEND="dev-libs/popt
+ dev-libs/elfutils
+ dev-libs/beecrypt"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.3.5-DWARF-4.patch #400663
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ dobin debugedit || die
+}
diff --git a/dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch b/dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch
new file mode 100644
index 000000000000..3e1406196e9b
--- /dev/null
+++ b/dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch
@@ -0,0 +1,129 @@
+add DWARF 4 support
+
+https://bugs.gentoo.org/400663
+https://bugzilla.redhat.com/show_bug.cgi?id=707677
+
+--- debugedit-5.3.5/debugedit.c 2011-10-11 05:37:49.000000000 +0200
++++ debugedit-5.3.5/debugedit.c 2012-01-25 01:27:23.487999039 +0100
+@@ -70,6 +70,10 @@
+ #include <rpmtag.h>
+
+ #define DW_TAG_partial_unit 0x3c
++#define DW_FORM_sec_offset 0x17
++#define DW_FORM_exprloc 0x18
++#define DW_FORM_flag_present 0x19
++#define DW_FORM_ref_sig8 0x20
+
+ char *base_dir = NULL;
+ char *dest_dir = NULL;
+@@ -246,6 +250,7 @@
+ #define DEBUG_STR 8
+ #define DEBUG_FRAME 9
+ #define DEBUG_RANGES 10
++#define DEBUG_TYPES 11
+ { ".debug_info", NULL, NULL, 0, 0, 0 },
+ { ".debug_abbrev", NULL, NULL, 0, 0, 0 },
+ { ".debug_line", NULL, NULL, 0, 0, 0 },
+@@ -257,6 +262,7 @@
+ { ".debug_str", NULL, NULL, 0, 0, 0 },
+ { ".debug_frame", NULL, NULL, 0, 0, 0 },
+ { ".debug_ranges", NULL, NULL, 0, 0, 0 },
++ { ".debug_types", NULL, NULL, 0, 0, 0 },
+ { NULL, NULL, NULL, 0, 0, 0 }
+ };
+
+@@ -349,7 +355,8 @@
+ goto no_memory;
+ }
+ form = read_uleb128 (ptr);
+- if (form == 2 || form > DW_FORM_indirect)
++ if (form == 2
++ || (form > DW_FORM_flag_present && form != DW_FORM_ref_sig8))
+ {
+ error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, form);
+ htab_delete (h);
+@@ -378,7 +385,6 @@
+ canonicalize_path (const char *s, char *d)
+ {
+ char *rv = d;
+- const char *sroot;
+ char *droot;
+
+ if (IS_DIR_SEPARATOR (*s))
+@@ -394,7 +400,6 @@
+ s++;
+ }
+ droot = d;
+- sroot = s;
+
+ while (*s)
+ {
+@@ -513,7 +518,7 @@
+ }
+
+ value = read_16 (ptr);
+- if (value != 2 && value != 3)
++ if (value != 2 && value != 3 && value != 4)
+ {
+ error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
+ value);
+@@ -529,8 +534,8 @@
+ return 1;
+ }
+
+- opcode_base = ptr[4];
+- ptr = dir = ptr + 4 + opcode_base;
++ opcode_base = ptr[4 + (value >= 4)];
++ ptr = dir = ptr + 4 + (value >= 4) + opcode_base;
+
+ /* dir table: */
+ value = 1;
+@@ -758,7 +763,8 @@
+ {
+ if (t->attr[i].attr == DW_AT_stmt_list)
+ {
+- if (form == DW_FORM_data4)
++ if (form == DW_FORM_data4
++ || form == DW_FORM_sec_offset)
+ {
+ list_offs = do_read_32_relocated (ptr);
+ found_list_offs = 1;
+@@ -864,6 +870,8 @@
+ else
+ ptr += 4;
+ break;
++ case DW_FORM_flag_present:
++ break;
+ case DW_FORM_addr:
+ ptr += ptr_size;
+ break;
+@@ -878,10 +886,12 @@
+ break;
+ case DW_FORM_ref4:
+ case DW_FORM_data4:
++ case DW_FORM_sec_offset:
+ ptr += 4;
+ break;
+ case DW_FORM_ref8:
+ case DW_FORM_data8:
++ case DW_FORM_ref_sig8:
+ ptr += 8;
+ break;
+ case DW_FORM_sdata:
+@@ -910,6 +920,7 @@
+ form = DW_FORM_block1;
+ break;
+ case DW_FORM_block:
++ case DW_FORM_exprloc:
+ len = read_uleb128 (ptr);
+ form = DW_FORM_block1;
+ assert (len < UINT_MAX);
+@@ -1213,7 +1224,7 @@
+ }
+
+ cu_version = read_16 (ptr);
+- if (cu_version != 2 && cu_version != 3)
++ if (cu_version != 2 && cu_version != 3 && cu_version != 4)
+ {
+ error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
+ cu_version);