%define _default_patch_fuzz 2 Summary: The GNU gdb debugger Name: gdb Version: 10.2 Release: 1 License: GPL Group: Development/Tools URL: http://www.gnu.org/software/gdb/ Source0: http://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.gz Source1: README-gdb%{version}-%{release}.ppc.aix Patch1: gdb-%{version}-current_inferior.patch Patch2: gdb-%{version}-p10-prefix_inst.patch Patch3: gdb-%{version}-undef_array_stabs.patch Patch4: gdb-%{version}-dwarf_abbrev_type.patch Patch5: gdb-%{version}-gcc_stabs_lowaddr.patch Patch6: gdb-%{version}-aix-gcore.patch Patch7: gdb-%{version}-mmap.patch Patch8: gdb-%{version}-renamed_wcstod.patch Patch9: gdb-8.1.1-backtrace.patch Patch10: gdb-8.1.1-stack_size.patch Patch11: gdb-8.1.1-aix-gcore-libgen.patch %ifos aix6.1 Patch12: gdb-8.1.1-mkdtemp.patch %endif #Patch6: gdb-8.1.1-texinfo.patch #Patch9: gdb-%{version}-vector.patch #Patch3: gdb-8.1.1-large_binary_size_limit.patch #Patch18: gdb-8.1.1-pst_symtab_assertion_failure.patch #Patch3: gdb-%{version}-hang_on_binary_sym.patch #Patch4: gdb-%{version}-internal-error.patch #Patch7: gdb-%{version}-qfuncsect_psymtab.patch #Patch8: gdb-%{version}-sighandler-corrupt-stack.patch #Patch10: gdb-%{version}-traceback_table.patch #Patch12: gdb-%{version}-xlC-stabs.patch #Patch13: gdb-%{version}-xlc_cpp-demagle.patch #Patch14: gdb-%{version}-disable_dwtype.patch Prefix: %{_prefix} BuildRoot: %{_tmppath}/%{name}-root Prereq: /sbin/install-info BuildRequires: expat-devel >= 2.2.9 BuildRequires: gettext-devel >= 0.20.2 BuildRequires: libiconv >= 1.16 BuildRequires: ncurses-devel >= 6.2 Requires: AIX-rpm >= 6.1.0.0 Requires: gettext >= 0.20.2 Requires: libiconv >= 1.16-1 Requires: expat >= 2.2.9 Requires: ncurses >= 6.2 %define DEFCC cc %description GNU gdb is the standard GNU program debugger. %prep %setup -q export patch=/opt/freeware/bin/patch %patch1 -p1 -b .current_inferior %patch2 -p1 -b .prefix_inst %patch3 -p1 -b .undef_array_stabs %patch4 -p1 -b .dwarf_abbrev_type %patch5 -p1 -b .gcc_stabs_lowaddr %patch6 -p1 -b .gcore %patch7 -p1 -b .mmap %patch8 -p1 -b .renamed_wcstod %patch9 -p1 -b .backtrace %patch10 -p1 -b .stack_size # This is required as the gnulib conftest.c fails without the optimization # and gives the error 'error: cannot be used with this compiler'. %patch11 -p1 -b .gcore-libgen %ifos aix6.1 %patch12 -p1 -b .mkdtemp %endif #%patch6 -p1 -b .texinfo #%patch9 -p1 -b .vector %build export CC=gcc export CXX=g++ export AR="/usr/bin/ar" export AS="/usr/bin/as" export OBJECT_MODE=64 export CFLAGS="-maix64 -D_LARGE_FILES -D_ALL_SOURCE -static-libgcc -static-libstdc++ -DTUI=1 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -std=c++11 -pthread" export CXXFLAGS="-maix64 -D_LARGE_FILES -D_ALL_SOURCE -static-libgcc -static-libstdc++ -DTUI=1 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -fpermissive -std=c++11 -pthread" export LIBPATH=/opt/freeware/lib:/usr/lib:$LIBPATH export LDFLAGS="-lexpat -lncurses -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" ./configure --prefix=/opt/freeware \ --infodir=/opt/freeware/info \ --mandir=/opt/freeware/man \ --disable-werror \ --enable-sim \ --target=powerpc64-ibm-aix6.1.0.0 \ --build=powerpc64-ibm-aix6.1.0.0 \ --disable-binutils \ --disable-ld \ --with-expat \ --disable-binutils \ --disable-ld \ --disable-gold \ --disable-gas \ --disable-sim \ --disable-gprof \ --disable-werror \ --with-python=no \ --with-mpfr=no \ --with-mpc=no ulimit -d unlimited ulimit -m unlimited gmake V=1 cp ${RPM_SOURCE_DIR}/README-gdb%{version}-%{release}.ppc.aix README-gdb%{version}-%{release}.ppc.aix %install rm -rf $RPM_BUILD_ROOT gmake DESTDIR=${RPM_BUILD_ROOT} install mkdir -p ${RPM_BUILD_ROOT}/usr/linux/lib # Strip all of the executables /usr/bin/strip ${RPM_BUILD_ROOT}%{prefix}/bin/* 2>/dev/null || : # compress the info files gzip -9fn ${RPM_BUILD_ROOT}%{_infodir}/* %clean rm -rf $RPM_BUILD_ROOT %post /sbin/install-info %{_infodir}/annotate.info.gz %{_infodir}/dir /sbin/install-info %{_infodir}/gdb.info.gz %{_prefix}/dir /sbin/install-info %{_infodir}/stabs.info.gz %{_prefix}/dir %postun if [ $1 = 0 ] ; then /sbin/install-info --delete %{_infodir}/annotate.info.gz %{_infodir}/dir /sbin/install-info --delete %{_infodir}/gdb.info.gz %{_prefix}/dir /sbin/install-info --delete %{_infodir}/stabs.info.gz %{_prefix}/dir fi %files %defattr(-,bin,bin) %doc COPYING COPYING.LIB README README-gdb%{version}-%{release}.ppc.aix %{_mandir}/man1/* %{_mandir}/man5/* %{prefix}/bin/* %{_infodir}/annotate.info.gz %{_infodir}/gdb* %{_infodir}/stabs.info.gz %changelog * Mon Nov 22 2021 Sangamesh Mallayya 10.2 -1 - Update to newer version 10.2 - Fix to read current inferior pid. - Fix to support debugging P10 prefix instructions. - Fix to properly read xlc dwarf abbrev types. - Fix to support debugging gcc stabs. - fix to avoid range_type error for undefined array type ar0 for stabs. - Don't ship files in /usr path. * Fri May 03 2019 Nitish K Mishra 8.1.1-3 - Rebuild to correct dependency after fix in find-requires - in rpm * Fri Nov 09 2018 Nitish K Mishra 8.1.1-2 - Rebuild to remove temporary disable lang check patch - Include assertion failure patch * Sun Oct 07 2018 Nitish K Mishra 8.1.1-1 - Initial Port to version 8.1.1-1 * Thu Jun 28 2018 Nitish K Mishra 7.12.1-2 - Fix for dwarf support * Wed May 17 2017 Nitish K Mishra 7.12.1-1 - Update to 7.12.1-1 * Wed May 3 2017 Sangamesh Mallayya 7.9.1-7 - Add changes to signal handler patch to display register contents - if stack address is corrupted. * Thu Feb 6 2017 Sangamesh Mallayya 7.9.1-6 - Add gcore support. - Add vector support. * Thu Apr 09 2016 Sangamesh Mallayya 7.9.1-4 - Add fix to read stack size larger than int limit. - Add fix to read signal hanlder frame during core analysis. - Add temporary fix for hang when gdb tries to look for binary_function symbol. * Thu Feb 11 2016 Sangamesh Mallayya 7.9.1-3 - Add multiple fixes. - Prevent core dumping in case of unrecognized xlc++ stab symbols V & m. - Do not skip the xlc++ symbols which start with $_. - Add a support to read the very large binary of size around 5GB. - Use xlc++ demangling API for C++ functions. - Displaying the entire stack traces for the binaries where stwu instruction to update - the stack frame wasn't being read by gdb. - Prevent GDB internal error. * Thu Dec 18 2015 Sangamesh Mallayya 7.9.1-2 - Rewrite a sysroot path to recognise .so files. * Thu Nov 26 2015 Sangamesh Mallayya 7.9.1-2 - Add a fix to recognise sysroot path. * Thu Oct 29 2015 Sangamesh Mallayya 7.9.1-1 - Update to 7.9.1. Apply the patches which didn't make it to the community yet. * Fri Dec 6 2013 Raunaq Bathija 7.5-7 - Add support for debugging core files generated by binaries in Large Memory model. * Mon Oct 28 2013 Raunaq Bathija 7.5-6 - Improve xlC++ stabstring support. - Add Fix to correctly read psymtab in case of xlc -qfuncsecct compiled binaries. - Include README file specific to AIX related changes in the doc section. * Wed Aug 14 2013 Raunaq Bathija 7.5-5 - Add partial xlC++ stabstring support to recognize c++ data types better. * Wed Jul 3 2013 Raunaq Bathija 7.5-4 - Modify aix-thread and inf-ptrace patch to remove multiple #ifdef - Add mmap command to gdb * Wed Apr 3 2013 Raunaq Bathija 7.5-3 - Remove changes from generic files and make equivalent changes in AIX specific files. * Mon Feb 18 2013 Raunaq Bathija 7.5-2 - Modify the fix for setting breakpoints (mentioned initially in 7.5-1) - Add fix for proper listing of functions in an xlc compiled object. * Wed Jan 16 2013 Raunaq Bathija 7.5-1 - Update gdb version to 7.5 - Modify the fix for stopping at first executable statement of functions. - Add a fix for setting breakpoints properly instead of multiple entries. * Tue Jun 26 2012 Sangamesh Mallayya 7.3-5 - Skip reading @FIX entries * Wed Mar 14 2012 Sangamesh Mallayya 7.3-4 - Add a fix for filename issue. If -qfuncsect compiler option is - used then gdb is displays filename as _start_. - Add a fix for proper address relocation for core dump. * Mon Feb 06 2012 Sangamesh Mallayya 7.3-3 - Add fix for stopping at first executable statement of a functions. * Thu Dec 01 2011 Sangamesh Mallayya 7.3-2 - Add fix for Internal Error issue in case of -qfuncsect xlc option. * Fri Nov 11 2011 Sangamesh Mallayya 7.3-1 - Build 64-bit version (alpha) * Thu Sep 23 2004 David Clissold 6.0-1 - Initial version, adopted from old GNUPro.spec (which included an older gdb).