Version: 6.6.50 Release: 28 Name: ppu-gdb Summary: Combined debugger for Linux on Cell BE License: GPL Group: Cell Development Tools Source: gdb-6.6.50-20070623.tar.bz2 # These are shared between spu-gdb and ppu-gdb # 1: in mainline Patch1: diff-spu-gdb-regformatfix # 2..3: under discussion Patch2: diff-spu-gdb-fix-fortran_registers Patch3: diff-spu-ext-mi # Combined debugger patches start at 100 # 100..102: ppc-only changes Patch100: diff-gdb-ppc-fptrfix Patch101: diff-gdb-ppc-msymfix Patch102: diff-gdb-ppc-longdoublefix # 103: in mainline Patch103: diff-gdb-corewrite # 104..132: t.b.d. Patch104: diff-gdb-ppcorigr3 Patch105: diff-gdb-ppc-morefixes Patch106: diff-gdb-prepareproceed Patch107: diff-gdb-stepthread Patch108: diff-gdb-preferredlwp Patch109: diff-gdb-preferredlwp-gdbserver Patch110: diff-gdb-switchtothread Patch111: diff-gdb-solib-alignfix Patch112: diff-gdb-solib-multiple Patch113: diff-gdb-solib-openbfd Patch114: diff-gdb-solib-auxv Patch115: diff-combined-gdb Patch116: diff-combined-gdb-address Patch117: diff-combined-gdb-linuxfix Patch118: diff-combined-gdb-infrunfix Patch119: diff-combined-gdb-skipprologue Patch120: diff-combined-gdb-gdbserver Patch121: diff-combined-gdb-core Patch122: diff-combined-gdb-core-bfd Patch123: diff-combined-gdb-overlay Patch124: diff-combined-gdb-ea-ptr Patch125: diff-combined-gdb-currarch Patch126: diff-combined-gdb-frame Patch127: diff-combined-gdb-ea-cache Patch128: diff-combined-testsuite Patch129: diff-dejagnu-config Patch130: diff-combined-gdb-pr36764 Patch131: diff-wrap-spu-addr Patch132: diff-combined-gdb-pr37807 Patch133: diff-combined-gdb-pr38374 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext BuildRequires: flex bison %define _unpackaged_files_terminate_build 1 %description GNU debugger for Cell Broadband Engine PPU/SPU. # Don't strip as the host binutils may be unable to handle SPU objects. %define __os_install_post /usr/lib/rpm/brp-compress # When building the cross-toolchain, reset prefix directory and use sysroot %ifnarch ppc ppc64 %define _prefix /opt/cell/toolchain %define _mandir %{_prefix}/man %define _infodir %{_prefix}/info %define with_sysroot --with-sysroot=/opt/cell/sysroot %endif %package testsuite Summary: DejaGnu testsuite for ppu-gdb Group: Cell Development Tools Requires: ppu-gdb = %{version}-%{release}, dejagnu %description testsuite DejaGnu testsuite for ppu-gdb. %prep %setup -c -q %patch1 -p0 %patch2 -p0 %patch3 -p0 %patch100 -p0 %patch101 -p0 %patch102 -p0 %patch103 -p0 %patch104 -p0 %patch105 -p0 %patch106 -p0 %patch107 -p0 %patch108 -p0 %patch109 -p0 %patch110 -p0 %patch111 -p0 %patch112 -p0 %patch113 -p0 %patch114 -p0 %patch115 -p0 %patch116 -p0 %patch117 -p0 %patch118 -p0 %patch119 -p0 %patch120 -p0 %patch121 -p0 %patch122 -p0 %patch123 -p0 %patch124 -p0 %patch125 -p0 %patch126 -p0 %patch127 -p0 %patch128 -p0 %patch129 -p0 %patch130 -p0 %patch131 -p0 %patch132 -p0 %patch133 -p0 %build %define ppu_prefix ppu- %define ppu32_prefix ppu32- rm -fr obj-ppu mkdir obj-ppu cd obj-ppu CC=gcc CFLAGS="$RPM_OPT_FLAGS" %ifarch ppc ppc64 CC='gcc -m64' CFLAGS=`echo $CFLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'` %endif CC="$CC" CFLAGS="$CFLAGS" ../src/configure \ --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ %{?with_sysroot} \ %ifarch ppc ppc64 --host=powerpc64-linux \ %endif --disable-nls --disable-sim --disable-install-libbfd --disable-werror \ --program-prefix=%{ppu_prefix} \ --target=powerpc64-linux --enable-targets=spu make %{?_smp_mflags} cd .. # Do a second build of gdbserver only, using --target=powerpc-linux. # This is so we get a gdbserver suited for 32-bit programs. %ifarch ppc ppc64 rm -rf obj-ppu32 mkdir obj-ppu32 cd obj-ppu32 CC='gcc -m32' CFLAGS="$CFLAGS" ../src/configure \ --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ %{?with_sysroot} \ --program-prefix=%{ppu32_prefix} \ --build=powerpc-linux --host=powerpc-linux \ --target=powerpc-linux --enable-targets=spu make configure-gdb make -C gdb/gdbserver %{?_smp_mflags} cd .. %endif %install rm -fr $RPM_BUILD_ROOT cd obj-ppu make DESTDIR=$RPM_BUILD_ROOT install cd .. # Install the extra gdbserver builds (just the binaries) %ifarch ppc ppc64 cd obj-ppu32 make DESTDIR=$RPM_BUILD_ROOT -C gdb/gdbserver install rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/%{ppu32_prefix}* cd .. %endif # Install the testsuite and helper scripts mkdir -p $RPM_BUILD_ROOT%{_prefix}/share cp -R $RPM_BUILD_DIR/ppu-gdb-%{version}/src/gdb/testsuite $RPM_BUILD_ROOT%{_prefix}/share/ppu-gdb-testsuite install -D -m 644 $RPM_BUILD_DIR/ppu-gdb-%{version}/src/ppu-gdb-remote.exp $RPM_BUILD_ROOT/usr/share/dejagnu/baseboards/ppu-gdb-remote.exp install -m 755 $RPM_BUILD_DIR/ppu-gdb-%{version}/src/test-installed-ppu-gdb $RPM_BUILD_ROOT%{_prefix}/share/ppu-gdb-testsuite # Create script to run ppu-gdb testsuite cat > $RPM_BUILD_ROOT%{_prefix}/bin/ppu-gdb-runtests <<"EOF" #!/bin/sh %ifarch ppc ppc64 function usage { echo "Usage: $0 native | remote "; exit 1; } %else function usage { echo "Usage: $0 "; exit 1; } %endif test $# -eq 0 && usage %ifarch ppc ppc64 test $1 = native -o \( $1 = remote -a $# = 2 \) || usage test $1 = remote && export GDB_TARGET_HOSTNAME=$2 if [ $1 = native ] ; then board=unix/-m32; else board=ppu-gdb-remote; fi %else test $1 = native -o $1 = localhost && usage export GDB_TARGET_HOSTNAME=$1 board=ppu-gdb-remote %endif bin=%{_prefix}/bin pushd %{_prefix}/share/ppu-gdb-testsuite subdirs=`find -type d -name 'gdb*'` popd for I in $subdirs do mkdir -p $I done %{_prefix}/share/ppu-gdb-testsuite/test-installed-ppu-gdb --with-testsuite=%{_prefix}/share/ppu-gdb-testsuite --with-gcc=%{_prefix}/bin/ppu-gcc --with-g++=%{_prefix}/bin/ppu-g++ --with-gdb=%{_prefix}/bin/ppu-gdb --target_board $board test $1 != native && unset GDB_TARGET_HOSTNAME EOF chmod 755 $RPM_BUILD_ROOT%{_prefix}/bin/ppu-gdb-runtests # Info and man7 files conflict with host toolchain files, # just remove them for now. rm -rf $RPM_BUILD_ROOT%{_infodir} rm -rf $RPM_BUILD_ROOT%{_mandir}/man7 # These come with the binutils package. rm -rf $RPM_BUILD_ROOT/%{_prefix}/lib{,64}/lib{bfd*,opcodes*,iberty*,mmalloc*} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/bin %dir %{_mandir} %dir %{_mandir}/man1 %{_prefix}/bin/%{ppu_prefix}gdb %{_prefix}/bin/%{ppu_prefix}gdbtui %ifarch ppc ppc64 %{_prefix}/bin/%{ppu_prefix}gdbserver %{_prefix}/bin/%{ppu32_prefix}gdb* %endif %{_mandir}/man1/%{ppu_prefix}gdb* %files testsuite %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/bin %dir %{_prefix}/share %{_prefix}/bin/ppu-gdb-runtests %{_prefix}/share/ppu-gdb-testsuite %dir /usr/share/dejagnu/baseboards /usr/share/dejagnu/baseboards/ppu-gdb-remote.exp %changelog * Wed Sep 05 2007 Ulrich Weigand 6.6.50-28 - Prefer initial LWP for event reporting - gdbserver (#29390). * Tue Sep 04 2007 Markus Deuling 6.6.50-27 - Fix #38372 (break at wrong line number). * Sun Sep 02 2007 Ulrich Weigand 6.6.50-26 - Prefer initial LWP for event reporting (#29390). * Fri Aug 31 2007 Ulrich Weigand 6.6.50-25 - Switch back to stepped thread after solib events (#29390). - Fix remote backtrace problems (#38374). - Do not LSLR-wrap __ea pointers. * Tue Aug 21 2007 Markus Deuling 6.6.50-24 - Handle multilib flags in combined testsuite. - Remove diff-fix-gdbsrv-dejagnu. - Disable testsuite running cross native. * Mon Aug 20 2007 Ulrich Weigand 6.6.50-23 - Re-set architecture temporarily in regcache_raw_read/write (#37807). * Mon Aug 20 2007 Markus Deuling 6.6.50-22 - Fix running testsuite remotely. * Wed Aug 15 2007 Markus Deuling 6.6.50-21 - Configure Unix board to use 32-bit binaries for runtests. * Thu Aug 09 2007 Markus Deuling 6.6.50-20 - Fix reading LSLR register. * Wed Aug 08 2007 Markus Deuling 6.6.50-19 - Use LSLR Register to detect LS size. - Truncate SPU addresses > LS size (#29632). * Fri Aug 03 2007 Ulrich Weigand 6.6.50-18 - Fix multi-threaded stepping-over-breakpoints (#29390). * Fri Aug 03 2007 Markus Deuling 6.6.50-17 - Fix i686 build. * Thu Aug 02 2007 Markus Deuling 6.6.50-16 - Explicitly select files in /bin. * Wed Aug 01 2007 Markus Deuling 6.6.50-15 - Rename start script for testsuite package. * Mon Jul 30 2007 Markus Deuling 6.6.50-14 - Add testcase for cross-architecture backtrace. * Tue Jul 24 2007 Ulrich Weigand 6.6.50-13 - Switch to PPU during spu_bfd_iovec_pread (#36764). * Tue Jul 24 2007 Ulrich Weigand 6.6.50-12 - Fix register order mismatch in SPU gdbserver protocol. * Fri Jul 13 2007 Ulrich Weigand 6.6.50-11 - Enhance cross-architecture call frame display format. * Wed Jul 04 2007 Markus Deuling 6.6.50-10 - Rework combined debugger testsuite. * Wed Jul 04 2007 Markus Deuling 6.6.50-9 - Rework and cleanup support for ea software managed cache. * Wed Jul 04 2007 Markus Deuling 6.6.50-8 - Add testcase for ea software managed cache to combined testsuite. * Tue Jul 03 2007 Markus Deuling 6.6.50-7 - Add Michael Pfaff's fix for i686 build. * Mon Jul 02 2007 Markus Deuling 6.6.50-6 - Add support for ea software managed cache. * Fri Jun 29 2007 Ulrich Weigand 6.6.50-5 - Add per-frame architecture support. * Fri Jun 29 2007 Markus Deuling 6.6.50-4 - Add dejagnu board file for cell (diff-dejagnu-config). - Add new package ppu-gdb-testsuite. * Fri Jun 29 2007 Markus Deuling 6.6.50-3 - Add testsuite for combined debugger. * Tue Jun 26 2007 Ulrich Weigand 6.6.50-2 - Fix 32-bit gdbserver build break. * Mon Jun 25 2007 Ulrich Weigand 6.6.50-1 - Port to 20070623 mainline snapshot. * Wed Jun 20 2007 Markus Deuling 6.6-30 - Add support for __ea pointer. * Tue Jun 12 2007 Ulrich Weigand 6.6-29 - Update SPU enhancement / overlay patches to mainline versions. - Backport mainline SPU changes. - Refresh and merge some patches. * Tue Jun 05 2007 Markus Deuling 6.6-28 - Change register handling in fortran. Call C-language routines. * Mon Jun 04 2007 Markus Deuling 6.6-27 - Add 'diff-spu-gdb-fix-fortran_registers'. Fortran handles SPU side vector register union as array double[2] (real*8). * Fri May 18 2007 Ulrich Weigand 6.6-26 - Change cross-prefix to /opt/cell/toolchain. Do not change sysroot. - Change group tag to "Cell Development Tools". * Tue May 15 2007 Markus Deuling 6.6-25 - Add fix 'diff-fix-tls-separate-debuginfo'. Fix access of TLS variables in shared libraries with extern debug info. * Wed May 9 2007 Ulrich Weigand 6.6-24 - Include "gdb_stat.h" in solib-spu.c. * Thu Apr 26 2007 Markus Deuling 6.6-23 - Add support for multiply-defined global symbol disambiguation problem (TCN3014). - Rebase diff-gdb-solib-openbfd to apply cleanly. * Tue Apr 10 2007 Ulrich Weigand 6.6-22 - Fix #33671 (debugging binary statically linked against libspe). * Wed Mar 28 2007 Markus Deuling 6.6-21 - Replace qxfer_partial with qxfer_spu in combined gdbserver. - Rework of qXfer:read/write handling. - Add qSupported support for spu:qXfer.ยท * Fri Mar 23 2007 Ulrich Weigand 6.6-20 - Split combined debugger into multiple patches. * Thu Mar 22 2007 Markus Deuling 6.6-19 - Cleanup diff-gdb-qxfer-spu. * Fri Mar 16 2007 Ulrich Weigand 6.6-18 - Backport mainline bugfixes. * Wed Mar 14 2007 Ulrich Weigand 6.6-17 - Re-order and merge some patches. * Fri Mar 09 2007 Ulrich Weigand 6.6-16 - Fix qXfer:spu:write regression (#32859). - Fix spu-gdbserver qXfer:spu:read regression. * Thu Mar 08 2007 Ulrich Weigand 6.6-15 - Update diff-spu-gdb-callfuncs-fix to mainline backport. * Sat Mar 03 2007 Ulrich Weigand 6.6-14 - Fix breakpoint removal corrupting wrong overlay (TC #34). - Fix overlay event handling in combined debugger. * Thu Mar 01 2007 Alan Modra 6.6-13 - Allow writing of 32-bit core files from 64-bit gdb. #28949 * Wed Feb 28 2007 Ulrich Weigand 6.6-12 - Fix SPE inferior function calls in the combined debugger. - Fix spu stop-on-load mangling the SPE "main" symbol. * Wed Feb 28 2007 Markus Deuling 6.6-11 - Add fix for #32180 to diff-combined-gdb. * Mon Feb 26 2007 Ulrich Weigand 6.6-10 - Fix handling of interrupt enable bit in NPC (#32247). * Mon Feb 26 2007 Ulrich Weigand 6.6-9 - Fix callfuncs.exp and dump.exp testcase problems. * Tue Feb 20 2007 Markus Deuling 6.6-8 - Fix unary * handling of TYPE_CODE_INT (#31960). * Thu Feb 15 2007 Markus Deuling 6.6-7 - Fix handling for 'q' packets in gdbserver (#31980). * Tue Jan 30 2007 Alan Modra 6.6-6 - Provide iovec stat function. #26697 * Mon Jan 22 2007 Ben Elliston 6.6-5 - Change the cross-prefix to /opt/cell. * Thu Jan 18 2007 Ulrich Weigand 6.6-4 - Rename SOMA patch to avoid name collision (#31122). * Fri Jan 12 2007 Ulrich Weigand 6.6-3 - Add SOMA disassembler support. * Thu Jan 11 2007 Ulrich Weigand 6.6-2 - Re-add lost fix for #29298 (backtrace at entry function). * Tue Jan 9 2007 Ulrich Weigand 6.6-1 - Initial version of standalone ppu-gdb package.