Apply upstream patch to get usable backtraces on PPC. Research by illusion <morgoth6...
authorTony Vroon <chainsaw@gentoo.org>
Sun, 18 Jun 2006 23:38:16 +0000 (23:38 +0000)
committerTony Vroon <chainsaw@gentoo.org>
Sun, 18 Jun 2006 23:38:16 +0000 (23:38 +0000)
Package-Manager: portage-2.1.1_pre1-r1

sys-devel/gdb/ChangeLog
sys-devel/gdb/Manifest
sys-devel/gdb/files/digest-gdb-6.4-r5 [new file with mode: 0644]
sys-devel/gdb/files/gdb-6.4-ppc-stack.patch [new file with mode: 0644]
sys-devel/gdb/gdb-6.4-r5.ebuild [new file with mode: 0644]

index 7aebb4425f94fe4a5d23a7ecc95c2789528c45c1..b9aac9b7c4860ad578b9545477ba873df9a060a3 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for sys-devel/gdb
 # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.90 2006/05/03 14:32:39 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.91 2006/06/18 23:38:16 chainsaw Exp $
+
+*gdb-6.4-r5 (18 Jun 2006)
+
+  18 Jun 2006; Tony Vroon <chainsaw@gentoo.org>
+  +files/gdb-6.4-ppc-stack.patch, +gdb-6.4-r5.ebuild:
+  Apply upstream patch to get usable backtraces on PPC. Research by illusion
+  <morgoth6@box43.pl> in bug #137125.
 
   03 May 2006; Diego Pettenò <flameeyes@gentoo.org> gdb-6.4-r4.ebuild:
   Add ~x86-fbsd keyword.
index 540eac8d47e3a05b2e34a2c39996ae8912aa01d5..3a3dca68eeb691a7656bb6146373d660767af8fa 100644 (file)
@@ -77,6 +77,10 @@ AUX gdb-6.4-avr-eclipse.patch 972 RMD160 ed66f0c0fd1c36123dd6de0b487384a50da0fa6
 MD5 90ae3812714d1ca0d3e1edc73868d5ac files/gdb-6.4-avr-eclipse.patch 972
 RMD160 ed66f0c0fd1c36123dd6de0b487384a50da0fa6a files/gdb-6.4-avr-eclipse.patch 972
 SHA256 1ca138a5c1047e479c615fec19ad17daf4759124f4c9aec5051d393ad55a5390 files/gdb-6.4-avr-eclipse.patch 972
+AUX gdb-6.4-ppc-stack.patch 926 RMD160 4d5a06684704371c13b6c82abfaba1bf8cf6cf64 SHA1 e69e866b8f1f069ed7c824284be9c3df5ba62e0b SHA256 38d8c1def3bd0a525ebb762590ee41ec507d7382edbc337dc7ba3741b2bae33a
+MD5 46fcb143e973b1f72f561aceefdc17c5 files/gdb-6.4-ppc-stack.patch 926
+RMD160 4d5a06684704371c13b6c82abfaba1bf8cf6cf64 files/gdb-6.4-ppc-stack.patch 926
+SHA256 38d8c1def3bd0a525ebb762590ee41ec507d7382edbc337dc7ba3741b2bae33a files/gdb-6.4-ppc-stack.patch 926
 AUX gdb-6.4-relative-paths.patch 3147 RMD160 f53af62cdcaaa66614d4a2c87b85698507f904ed SHA1 b58e4832b19f1454e5a44a86fcbf247e0b375e40 SHA256 0b39f8ac1f6c03257a0ab1cbfff3eac7af13d38026d0cc7e11f266df48d5a540
 MD5 8323dafe6749f0da44b8e11ebbbc96c4 files/gdb-6.4-relative-paths.patch 3147
 RMD160 f53af62cdcaaa66614d4a2c87b85698507f904ed files/gdb-6.4-relative-paths.patch 3147
@@ -106,9 +110,9 @@ DIST gdb-6.1.tar.bz2 12571495 RMD160 9e3317383991364f7fbdc5b93b94ad9daefd8d50 SH
 DIST gdb-6.2.1.tar.bz2 12820148 RMD160 6fe9f3bbef076c55cbcdf05143e7d5f98f61f889 SHA256 edff7475c907af5f08e4b09605e460d52981b039af1f168532caa01ff2dbcd31
 DIST gdb-6.3-pie-patches.tar.bz2 25195 RMD160 40b27c1901a8a82ebe3f625ff47f792cf7057c35 SHA256 e369daaee6b32b7e1d2912b1af0f861907f06544da86d1083dd210458d8cffc6
 DIST gdb-6.3.tar.bz2 13446729 RMD160 a5c1b018a930ef28cc52a394fe60b30e1ea458b3 SHA256 0cb862012392ee7ab94fac33920730f8c85814cf310a6a036efe940d7bee0acb
-DIST gdb-6.4.tar.bz2 13917226 RMD160 17e020f34628a004c9ff4539b23e630719d8c34c SHA256 af6777836ab72b563a9e55467f990250e07e56c292cfac98762745c1512167ef
+DIST gdb-6.4.tar.bz2 13917226 RMD160 17e020f34628a004c9ff4539b23e630719d8c34c SHA1 d1b0d6ed0238345290d0036cacc6eaef9eec6fe7 SHA256 af6777836ab72b563a9e55467f990250e07e56c292cfac98762745c1512167ef
 DIST gdb_6.3-6.diff.gz 201861 RMD160 9b55f1925a84002e25b4e82aa41abc55d79ac771 SHA256 9ef1f8a7f0b8c9d539ac93d997901ef34cdad7a5af9594463f51f3cb934b17e9
-DIST gdb_init.txt.bz2 6247 RMD160 877e32656cd77f0083cc2506795979884671b7d4 SHA256 dbd88def6a317eba947a7c37af471d9deb447c4a9906322c1afccd6537f1c724
+DIST gdb_init.txt.bz2 6247 RMD160 877e32656cd77f0083cc2506795979884671b7d4 SHA1 5fab02365c535e9c7df3cb541e3e61cf7ff58b01 SHA256 dbd88def6a317eba947a7c37af471d9deb447c4a9906322c1afccd6537f1c724
 EBUILD gdb-6.1.ebuild 1807 RMD160 a35473e122f379fdad4b00968056c7093c729cab SHA1 2c38e02266fbd6f11313fe6813bdb0332a7ba9c9 SHA256 10857fc8273383db950cbcfbcb31a3703caae54689d5b9c8c57c75eec7603e57
 MD5 2a52c4cd9bf5e2667c6bc7312e179fa0 gdb-6.1.ebuild 1807
 RMD160 a35473e122f379fdad4b00968056c7093c729cab gdb-6.1.ebuild 1807
@@ -141,14 +145,18 @@ EBUILD gdb-6.4-r4.ebuild 3138 RMD160 48bf0f419a06d56cca32894e1a7fe3b005d5343e SH
 MD5 1a449586af40c509b6e9bbcb965ff572 gdb-6.4-r4.ebuild 3138
 RMD160 48bf0f419a06d56cca32894e1a7fe3b005d5343e gdb-6.4-r4.ebuild 3138
 SHA256 8d00cf9452a3303da03635d7bc485ef9c60e2fa54aeff59decb9291adc209abd gdb-6.4-r4.ebuild 3138
+EBUILD gdb-6.4-r5.ebuild 3187 RMD160 cc5539b8c1148c7ad2b2a2835c58909729710d74 SHA1 0d4a1983a746e98448f92e90a084099b1815c03c SHA256 5f9a952cb180962c92ee0b01fc0423acb9646b2fef6cc825c950d6227b95ef8e
+MD5 171c1a8a368bddee66674faabfe2549a gdb-6.4-r5.ebuild 3187
+RMD160 cc5539b8c1148c7ad2b2a2835c58909729710d74 gdb-6.4-r5.ebuild 3187
+SHA256 5f9a952cb180962c92ee0b01fc0423acb9646b2fef6cc825c950d6227b95ef8e gdb-6.4-r5.ebuild 3187
 EBUILD gdb-6.4.ebuild 2995 RMD160 64d7c67013e9029c9387cf26d5c70275d6ae39c9 SHA1 ba3250defe7a203b47896e6af3dbb2c3a244ce87 SHA256 b83ed62def04ae3fd8812868c77fa7eb961a8475e57be5d4f9e407c926d6c575
 MD5 64854d9e61c5f0c03dae7184dafa4f08 gdb-6.4.ebuild 2995
 RMD160 64d7c67013e9029c9387cf26d5c70275d6ae39c9 gdb-6.4.ebuild 2995
 SHA256 b83ed62def04ae3fd8812868c77fa7eb961a8475e57be5d4f9e407c926d6c575 gdb-6.4.ebuild 2995
-MISC ChangeLog 13453 RMD160 3c2c34528d161a6a74ea4c0807312e4608cc21b6 SHA1 a4022c0d2dec7916948bae225508c5cd1196492e SHA256 2f77b39abf582de3667d017f2c47a12471f860b1578a61200af340174329cada
-MD5 685d3d3089cfa88572693d9734d70fb6 ChangeLog 13453
-RMD160 3c2c34528d161a6a74ea4c0807312e4608cc21b6 ChangeLog 13453
-SHA256 2f77b39abf582de3667d017f2c47a12471f860b1578a61200af340174329cada ChangeLog 13453
+MISC ChangeLog 13697 RMD160 75684355cee718f855e0d47c61ccbb39a0d7e9a8 SHA1 88fc9ebc3c3eefdad0ee2fe9cac35bcd253d165e SHA256 211095065cad5bac1adab41ee5717c57f9e4e2d712db4406ac0686f44f9cea12
+MD5 9570246802ba5fbb0d10f0b2fd20fc11 ChangeLog 13697
+RMD160 75684355cee718f855e0d47c61ccbb39a0d7e9a8 ChangeLog 13697
+SHA256 211095065cad5bac1adab41ee5717c57f9e4e2d712db4406ac0686f44f9cea12 ChangeLog 13697
 MISC metadata.xml 162 RMD160 d002486a43522f2116b1d9d59828c484956d66e2 SHA1 d6b4923897f6ae673b4f93646f5b4ba61d5a2c3c SHA256 65a915d44de1f01d4b7f72d313b4192c38374a9835d24988c00c1e73dca5805a
 MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
 RMD160 d002486a43522f2116b1d9d59828c484956d66e2 metadata.xml 162
@@ -180,10 +188,13 @@ SHA256 4d4002b4f56c521a4c1a52e1faa05689242bbc7bb5b6b63b1e2e3ffbcadef0ce files/di
 MD5 b0d757dab60638c1b6cf01e955240bf4 files/digest-gdb-6.4-r4 455
 RMD160 6ef6ab467b9ded2fc9c9580b61274cb4ffd28a53 files/digest-gdb-6.4-r4 455
 SHA256 4d4002b4f56c521a4c1a52e1faa05689242bbc7bb5b6b63b1e2e3ffbcadef0ce files/digest-gdb-6.4-r4 455
+MD5 b0d757dab60638c1b6cf01e955240bf4 files/digest-gdb-6.4-r5 455
+RMD160 6ef6ab467b9ded2fc9c9580b61274cb4ffd28a53 files/digest-gdb-6.4-r5 455
+SHA256 4d4002b4f56c521a4c1a52e1faa05689242bbc7bb5b6b63b1e2e3ffbcadef0ce files/digest-gdb-6.4-r5 455
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.3 (GNU/Linux)
+Version: GnuPG v1.4.3-ecc0.1.6 (GNU/Linux)
 
-iD8DBQFEiyEL2+ySkm8kpY0RApJ5AKCGAbaO+pgAgS4Y+LwQv7866UpG8gCfSFhU
-0FNpCc/bMhyMiOSya3OpM4Q=
-=2aDY
+iD8DBQFEleQEp5vW4rUFj5oRAphIAJ9mTCIeiL3E81nXcsC4N8eDLxrZJgCgwjAF
+zi8rvQeKQQYR+zrugU8j8yw=
+=6s8o
 -----END PGP SIGNATURE-----
diff --git a/sys-devel/gdb/files/digest-gdb-6.4-r5 b/sys-devel/gdb/files/digest-gdb-6.4-r5
new file mode 100644 (file)
index 0000000..fe4f605
--- /dev/null
@@ -0,0 +1,6 @@
+MD5 f62c14ba0316bc88e1b4b32a4e901ffb gdb-6.4.tar.bz2 13917226
+RMD160 17e020f34628a004c9ff4539b23e630719d8c34c gdb-6.4.tar.bz2 13917226
+SHA256 af6777836ab72b563a9e55467f990250e07e56c292cfac98762745c1512167ef gdb-6.4.tar.bz2 13917226
+MD5 35e70c29e393433b3847527d808f59c2 gdb_init.txt.bz2 6247
+RMD160 877e32656cd77f0083cc2506795979884671b7d4 gdb_init.txt.bz2 6247
+SHA256 dbd88def6a317eba947a7c37af471d9deb447c4a9906322c1afccd6537f1c724 gdb_init.txt.bz2 6247
diff --git a/sys-devel/gdb/files/gdb-6.4-ppc-stack.patch b/sys-devel/gdb/files/gdb-6.4-ppc-stack.patch
new file mode 100644 (file)
index 0000000..3c95cd2
--- /dev/null
@@ -0,0 +1,27 @@
+Index: gdb-6.4/gdb/rs6000-tdep.c
+===================================================================
+--- gdb-6.4.orig/gdb/rs6000-tdep.c     2005-11-01 14:32:36.000000000 -0500
++++ gdb-6.4/gdb/rs6000-tdep.c  2005-12-10 00:22:15.000000000 -0500
+@@ -911,7 +911,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR l
+            remember just the first one, but skip over additional
+            ones.  */
+-        if (lr_reg < 0)
++        if (lr_reg == -1)
+           lr_reg = (op & 0x03e00000);
+           if (lr_reg == 0)
+             r0_contains_arg = 0;
+@@ -1024,6 +1024,13 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR l
+         continue;
+       }
++      else if ((op & 0xfe80ffff) == 0x42800005 && lr_reg != -1)
++      {
++        /* bcl 20,xx,.+4 is used to get the current PC, with or without
++           prediction bits.  If the LR has already been saved, we can
++           skip it.  */
++        continue;
++      }
+       else if (op == 0x48000005)
+       {                       /* bl .+4 used in 
+                                  -mrelocatable */
diff --git a/sys-devel/gdb/gdb-6.4-r5.ebuild b/sys-devel/gdb/gdb-6.4-r5.ebuild
new file mode 100644 (file)
index 0000000..de701ba
--- /dev/null
@@ -0,0 +1,117 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-6.4-r5.ebuild,v 1.1 2006/06/18 23:38:16 chainsaw Exp $
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+       if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+               export CTARGET=${CATEGORY/cross-}
+       fi
+fi
+
+#DEB_VER=1
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sources.redhat.com/gdb/"
+SRC_URI="http://ftp.gnu.org/gnu/gdb/${P}.tar.bz2
+       ftp://sources.redhat.com/pub/gdb/releases/${P}.tar.bz2
+       mirror://gentoo/gdb_init.txt.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+[[ ${CTARGET} != ${CHOST} ]] \
+       && SLOT="${CTARGET}" \
+       || SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd"
+IUSE="nls test vanilla"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2"
+DEPEND="${RDEPEND}
+       test? ( dev-util/dejagnu )
+       nls? ( sys-devel/gettext )"
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       mv "${WORKDIR}"/gdb_init.txt . || die
+
+       if ! use vanilla ; then
+               if [[ -n ${DEB_VER} ]] ; then
+                       epatch "${WORKDIR}"/gdb_${PV}-${DEB_VER}.diff
+                       for f in $(<debian/patches/series) ; do
+                               EPATCH_SINGLE_MSG="Applying Debian's ${f}" \
+                               epatch debian/patches/${f}
+                       done
+               fi
+               epatch "${FILESDIR}"/gdb-6.4-uclibc.patch
+               #epatch "${FILESDIR}"/gdb-6.x-crash.patch
+               epatch "${FILESDIR}"/gdb-6.2.1-pass-libdir.patch
+               epatch "${FILESDIR}"/gdb-6.4-scanmem.patch
+               epatch "${FILESDIR}"/gdb-6.3-gdbinit-stat.patch
+               epatch "${FILESDIR}"/bfd-malloc-wrap.patch #91398
+               epatch "${FILESDIR}"/gdb-6.3-partial-die-20050503.patch #120091
+               epatch "${FILESDIR}"/gdb-6.4-avr-eclipse.patch #126288
+
+               epatch "${FILESDIR}"/gdb-6.2.1-200-uclibc-readline-conf.patch
+               epatch "${FILESDIR}"/gdb-6.2.1-400-mips-coredump.patch
+               epatch "${FILESDIR}"/gdb-6.2.1-libiberty-pic.patch
+               epatch "${FILESDIR}"/gdb-6.4-ppc-stack.patch
+       fi
+
+       epatch "${FILESDIR}"/gdb-configure-LANG.patch
+       strip-linguas -u bfd/po opcodes/po
+}
+
+src_compile() {
+       replace-flags -O? -O2
+       econf \
+               --disable-werror \
+               $(use_enable nls) \
+               || die
+       emake -j1 || die
+}
+
+src_test() {
+       make check || ewarn "tests failed"
+}
+
+src_install() {
+       make \
+               prefix="${D}"/usr \
+               mandir="${D}"/usr/share/man \
+               infodir="${D}"/usr/share/info \
+               libdir="${D}"/nukeme includedir="${D}"/nukeme \
+               install || die "install"
+       # The includes and libs are in binutils already
+       rm -r "${D}"/nukeme
+
+       # Don't install docs when building a cross-gdb
+       if [[ ${CTARGET} != ${CHOST} ]] ; then
+               rm -r "${D}"/usr/share
+               return 0
+       fi
+
+       dodoc README
+       docinto gdb
+       dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+               gdb/NEWS gdb/ChangeLog* gdb/TODO
+       docinto sim
+       dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+       docinto mmalloc
+       dodoc mmalloc/MAINTAINERS mmalloc/ChangeLog mmalloc/TODO
+
+       if use x86 ; then
+               dodir /etc/skel/
+               cp "${S}"/gdb_init.txt "${D}"/etc/skel/.gdbinit \
+                       || die "install ${D}/etc/skel/.gdbinit"
+       fi
+
+       if ! has noinfo ${FEATURES} ; then
+               make \
+                       infodir="${D}"/usr/share/info \
+                       install-info \
+                       || die "install doc info"
+               # Remove shared info pages
+               rm -f "${D}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+       fi
+}