diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-01-23 23:29:42 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-01-23 23:29:42 +0000 |
commit | b9c37da52f6bd2c09d5f9316fa0588ac6fbcf18b (patch) | |
tree | 30094fe45144b2a5d04940ff8e6518020b6e5059 /sys-devel/gdb | |
parent | Stable on hppa (bug #108262). (diff) | |
download | historical-b9c37da52f6bd2c09d5f9316fa0588ac6fbcf18b.tar.gz historical-b9c37da52f6bd2c09d5f9316fa0588ac6fbcf18b.tar.bz2 historical-b9c37da52f6bd2c09d5f9316fa0588ac6fbcf18b.zip |
Add patch from Fedora to fix #120091 by Ed Catmur.
Package-Manager: portage-2.1_pre3-r1
Diffstat (limited to 'sys-devel/gdb')
-rw-r--r-- | sys-devel/gdb/ChangeLog | 8 | ||||
-rw-r--r-- | sys-devel/gdb/Manifest | 15 | ||||
-rw-r--r-- | sys-devel/gdb/files/digest-gdb-6.4-r2 | 2 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-6.3-partial-die-20050503.patch | 175 | ||||
-rw-r--r-- | sys-devel/gdb/gdb-6.4-r2.ebuild | 115 |
5 files changed, 313 insertions, 2 deletions
diff --git a/sys-devel/gdb/ChangeLog b/sys-devel/gdb/ChangeLog index f2fd34cc1638..3ac1b4f2e5c7 100644 --- a/sys-devel/gdb/ChangeLog +++ b/sys-devel/gdb/ChangeLog @@ -1,6 +1,12 @@ # 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.83 2006/01/16 15:19:32 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.84 2006/01/23 23:29:42 vapier Exp $ + +*gdb-6.4-r2 (23 Jan 2006) + + 23 Jan 2006; Mike Frysinger <vapier@gentoo.org> + +files/gdb-6.3-partial-die-20050503.patch, +gdb-6.4-r2.ebuild: + Add patch from Fedora to fix #120091 by Ed Catmur. 16 Jan 2006; <solar@gentoo.org> files/gdb-6.4-scanmem.patch: - scanmem patch updates from the PaX Team. Fixed compilation warnings and diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest index 89645a35ac24..a0d7a0981b60 100644 --- a/sys-devel/gdb/Manifest +++ b/sys-devel/gdb/Manifest @@ -1,10 +1,14 @@ -MD5 2dfdd3bce446534f7ff349e23fa07463 ChangeLog 12240 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 a5cac68f1a4fea019c72500ce6ecb6be ChangeLog 12437 MD5 d3ab2683d88b3cbecb8a9faa439703a1 files/bfd-malloc-wrap.patch 782 MD5 460629563df21e6a68b8941c07d4f30b files/digest-gdb-6.1 131 MD5 b3790be989db97b22c599572afbce109 files/digest-gdb-6.2.1 133 MD5 1bf79e32094a4c2c7cde754dd12e4d90 files/digest-gdb-6.3-r4 183 MD5 944b2661cbb8d3308ce71d31e66533ac files/digest-gdb-6.4 121 MD5 944b2661cbb8d3308ce71d31e66533ac files/digest-gdb-6.4-r1 121 +MD5 944b2661cbb8d3308ce71d31e66533ac files/digest-gdb-6.4-r2 121 MD5 1de0e1b91ac150426719e904f0e1a5cd files/gdb-5.3-sparc-nat-asm.patch 521 MD5 e497ab2f05d847bde74f4e3441e2c7a2 files/gdb-6.0-coreutils.patch 1964 MD5 c6dfff1373e52fef5872c1bdca4cb706 files/gdb-6.0-info.patch 1108 @@ -18,6 +22,7 @@ MD5 31dd65bca08d42b0b7cdb61c53fd647f files/gdb-6.2.1-libiberty-pic.patch 370 MD5 37007f485c9f93564f99675e59b65e7f files/gdb-6.2.1-pass-libdir.patch 300 MD5 374352fdf0b1516a88eeaf0a921a2208 files/gdb-6.2.1-relative-paths.patch 3499 MD5 0ddba28928cd6fa87537312ddfa9d5ee files/gdb-6.3-gdbinit-stat.patch 431 +MD5 b8b609aab60ddcd9c66b9f0792efb585 files/gdb-6.3-partial-die-20050503.patch 6376 MD5 2657b597618d0c35b48f47e3f808d171 files/gdb-6.3-relative-paths.patch 3286 MD5 a4610ec65e88f73e0b00b525467a5372 files/gdb-6.3-scanmem.patch 6652 MD5 8b7f5c46b8dabbc9239c37f52278b971 files/gdb-6.3-uclibc.patch 8221 @@ -30,5 +35,13 @@ MD5 2a52c4cd9bf5e2667c6bc7312e179fa0 gdb-6.1.ebuild 1807 MD5 fb4ab4aaccb90b523c650a5f30d02281 gdb-6.2.1.ebuild 1784 MD5 20334b11833489b3bcc13c0fea645a1d gdb-6.3-r4.ebuild 2983 MD5 abe5b46c3552ca8670ffb68c048d4ffd gdb-6.4-r1.ebuild 3009 +MD5 65d8f7193ad67820fe247c98322db72a gdb-6.4-r2.ebuild 3076 MD5 f5428a658b66b60aeaa511d39cc450b3 gdb-6.4.ebuild 2996 MD5 567094e03359ffc1c95af7356395228d metadata.xml 162 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.2 (GNU/Linux) + +iD8DBQFD1Wd+2+ySkm8kpY0RAhkrAJ0fmIIHmPtJmFiwILiwYLNIO2QskwCgkNpL +fBLEWA/TSMoaRRJeq7Bi3DE= +=KEsn +-----END PGP SIGNATURE----- diff --git a/sys-devel/gdb/files/digest-gdb-6.4-r2 b/sys-devel/gdb/files/digest-gdb-6.4-r2 new file mode 100644 index 000000000000..701f64eee627 --- /dev/null +++ b/sys-devel/gdb/files/digest-gdb-6.4-r2 @@ -0,0 +1,2 @@ +MD5 f62c14ba0316bc88e1b4b32a4e901ffb gdb-6.4.tar.bz2 13917226 +MD5 35e70c29e393433b3847527d808f59c2 gdb_init.txt.bz2 6247 diff --git a/sys-devel/gdb/files/gdb-6.3-partial-die-20050503.patch b/sys-devel/gdb/files/gdb-6.3-partial-die-20050503.patch new file mode 100644 index 000000000000..0ece139785e2 --- /dev/null +++ b/sys-devel/gdb/files/gdb-6.3-partial-die-20050503.patch @@ -0,0 +1,175 @@ +http://bugs.gentoo.org/120091 + +2005-04-07 Daniel Jacobowitz <dan@codesourcery.com> + + * dwarf2read.c (struct dwarf2_per_cu_data): Reduce length to + 30 bits. Add load_all_dies flag. + (load_partial_dies): Load all DIEs if per_cu->load_all_dies is set. + Load DW_TAG_member by default. Remove internal_error call. + (find_partial_die): Reload the compilation unit if we can not find + a DIE in the cache. Call internal_error here if we still can not + find the DIE. + +--- gdb-6.3/gdb/dwarf2read.c.fix 2005-05-03 13:39:18.000000000 -0400 ++++ gdb-6.3/gdb/dwarf2read.c 2005-05-03 13:45:54.000000000 -0400 +@@ -362,16 +362,22 @@ struct dwarf2_cu + + struct dwarf2_per_cu_data + { +- /* The start offset and length of this compilation unit. 2**31-1 ++ /* The start offset and length of this compilation unit. 2**30-1 + bytes should suffice to store the length of any compilation unit + - if it doesn't, GDB will fall over anyway. */ + unsigned long offset; +- unsigned long length : 31; ++ unsigned long length : 30; + + /* Flag indicating this compilation unit will be read in before + any of the current compilation units are processed. */ + unsigned long queued : 1; + ++ /* This flag will be set if we need to load absolutely all DIEs ++ for this compilation unit, instead of just the ones we think ++ are interesting. It gets set if we look for a DIE in the ++ hash table and don't find it. */ ++ unsigned int load_all_dies : 1; ++ + /* Set iff currently read in. */ + struct dwarf2_cu *cu; + +@@ -5122,12 +5128,16 @@ load_partial_dies (bfd *abfd, char *info + struct partial_die_info *parent_die, *last_die, *first_die = NULL; + struct abbrev_info *abbrev; + unsigned int bytes_read; ++ unsigned int load_all = 0; + + int nesting_level = 1; + + parent_die = NULL; + last_die = NULL; + ++ if (cu->per_cu && cu->per_cu->load_all_dies) ++ load_all = 1; ++ + cu->partial_dies + = htab_create_alloc_ex (cu->header.length / 12, + partial_die_hash, +@@ -5163,12 +5173,17 @@ load_partial_dies (bfd *abfd, char *info + continue; + } + +- /* Check whether this DIE is interesting enough to save. */ +- if (!is_type_tag_for_partial (abbrev->tag) ++ /* Check whether this DIE is interesting enough to save. Normally ++ we would not be interested in members here, but there may be ++ later variables referencing them via DW_AT_specification (for ++ static members). */ ++ if (!load_all ++ && !is_type_tag_for_partial (abbrev->tag) + && abbrev->tag != DW_TAG_enumerator + && abbrev->tag != DW_TAG_subprogram + && abbrev->tag != DW_TAG_variable +- && abbrev->tag != DW_TAG_namespace) ++ && abbrev->tag != DW_TAG_namespace ++ && abbrev->tag != DW_TAG_member) + { + /* Otherwise we skip to the next sibling, if any. */ + info_ptr = skip_one_die (info_ptr + bytes_read, abbrev, cu); +@@ -5268,9 +5283,11 @@ load_partial_dies (bfd *abfd, char *info + + Adding more things than necessary to the hash table is harmless + except for the performance cost. Adding too few will result in +- internal errors in find_partial_die. */ ++ wasted time in find_partial_die, when we reread the compilation ++ unit with load_all_dies set. */ + +- if (abbrev->tag == DW_TAG_subprogram ++ if (load_all ++ || abbrev->tag == DW_TAG_subprogram + || abbrev->tag == DW_TAG_variable + || abbrev->tag == DW_TAG_namespace + || part_die->is_declaration) +@@ -5290,7 +5307,8 @@ load_partial_dies (bfd *abfd, char *info + languages we have to, both so that we can get at method physnames + to infer fully qualified class names, and for DW_AT_specification. */ + if (last_die->has_children +- && (last_die->tag == DW_TAG_namespace ++ && (load_all ++ || last_die->tag == DW_TAG_namespace + || last_die->tag == DW_TAG_enumeration_type + || (cu->language != language_c + && (last_die->tag == DW_TAG_class_type +@@ -5442,10 +5460,6 @@ find_partial_die_in_comp_unit (unsigned + part_die.offset = offset; + lookup_die = htab_find_with_hash (cu->partial_dies, &part_die, offset); + +- if (lookup_die == NULL) +- internal_error (__FILE__, __LINE__, +- _("could not find partial DIE in cache\n")); +- + return lookup_die; + } + +@@ -5454,11 +5468,16 @@ find_partial_die_in_comp_unit (unsigned + static struct partial_die_info * + find_partial_die (unsigned long offset, struct dwarf2_cu *cu) + { +- struct dwarf2_per_cu_data *per_cu; ++ struct dwarf2_per_cu_data *per_cu = NULL; ++ struct partial_die_info *pd = NULL; + + if (offset >= cu->header.offset + && offset < cu->header.offset + cu->header.length) +- return find_partial_die_in_comp_unit (offset, cu); ++ { ++ pd = find_partial_die_in_comp_unit (offset, cu); ++ if (pd != NULL) ++ return pd; ++ } + + per_cu = dwarf2_find_containing_comp_unit (offset, cu->objfile); + +@@ -5470,7 +5489,42 @@ find_partial_die (unsigned long offset, + } + + per_cu->cu->last_used = 0; +- return find_partial_die_in_comp_unit (offset, per_cu->cu); ++ pd = find_partial_die_in_comp_unit (offset, per_cu->cu); ++ ++ if (pd == NULL && per_cu->load_all_dies == 0) ++ { ++ struct cleanup *back_to; ++ struct partial_die_info comp_unit_die; ++ struct abbrev_info *abbrev; ++ unsigned int bytes_read; ++ char *info_ptr; ++ ++ per_cu->load_all_dies = 1; ++ ++ /* Re-read the DIEs. */ ++ back_to = make_cleanup (null_cleanup, 0); ++ if (per_cu->cu->dwarf2_abbrevs == NULL) ++ { ++ dwarf2_read_abbrevs (per_cu->cu->objfile->obfd, per_cu->cu); ++ back_to = make_cleanup (dwarf2_free_abbrev_table, per_cu->cu); ++ } ++ info_ptr = per_cu->cu->header.first_die_ptr; ++ abbrev = peek_die_abbrev (info_ptr, &bytes_read, per_cu->cu); ++ info_ptr = read_partial_die (&comp_unit_die, abbrev, bytes_read, ++ per_cu->cu->objfile->obfd, info_ptr, ++ per_cu->cu); ++ if (comp_unit_die.has_children) ++ load_partial_dies (per_cu->cu->objfile->obfd, info_ptr, 0, per_cu->cu); ++ do_cleanups (back_to); ++ ++ pd = find_partial_die_in_comp_unit (offset, per_cu->cu); ++ } ++ ++ if (pd == NULL) ++ internal_error (__FILE__, __LINE__, ++ "could not find partial DIE 0x%lx in cache [from module %s]\n", ++ offset, bfd_get_filename (cu->objfile->obfd)); ++ return pd; + } + + /* Adjust PART_DIE before generating a symbol for it. This function diff --git a/sys-devel/gdb/gdb-6.4-r2.ebuild b/sys-devel/gdb/gdb-6.4-r2.ebuild new file mode 100644 index 000000000000..0eed4f905067 --- /dev/null +++ b/sys-devel/gdb/gdb-6.4-r2.ebuild @@ -0,0 +1,115 @@ +# 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-r2.ebuild,v 1.1 2006/01/23 23:29:42 vapier 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=6 +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" +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.4-relative-paths.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.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 + fi + + 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 +} |