%define _default_patch_fuzz 2 Summary: The GNU gdb debugger Name: gdb Version: 13.1 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}.ppc.aix #Patch number 1, 2, 15, 16, 17, 18, 19, 20 are Accepted by community. #These patches mentioned above need to be eliminated from gdb 14. Patch1: gdb-13.1-SharedLib_fix.patch Patch2: gdb-13.1-Thread_private_data_set.patch Patch3: gdb-13.1-aix-gcore-libgen.patch Patch4: gdb-13.1-aix-gcore.patch Patch5: gdb-13.1-backtrace.patch Patch6: gdb-13.1-dwarf_abbrev_type.patch Patch7: gdb-13.1-gcc_stabs_lowaddr.patch Patch8: gdb-13.1-mmap.patch Patch9: gdb-13.1-p10-prefix_inst.patch Patch10: gdb-13.1-renamed_wcstod.patch Patch11: gdb-13.1-stack_size.patch Patch12: gdb-13.1-temporary-fix-python_exp_path_v1.patch Patch13: gdb-13.1-thread_buildsym_assertion_and_psymtab_warn_tmp_fix.patch Patch14: gdb-13.1-undef_array_stabs.patch Patch15: gdb-13.1-vector_register_in_bfd.patch Patch16: gdb-13.1-vector_registers_in_core.patch Patch17: gdb-13.1-vector_support.patch Patch18: gdb-13.1-vector_support_part2.patch Patch19: gdb-13.1-thread_exit_pid_assertion_fix.patch Patch20: gdb-13.1-thread_exit_pid_assertion_fix_part2.patch Patch21: gdb-13.1-init_mmap.patch Prefix: %{_prefix} Prereq: /sbin/install-info BuildRequires: expat-devel >= 2.5.0 BuildRequires: gettext-devel >= 0.21-2 BuildRequires: libiconv >= 1.17 BuildRequires: ncurses-devel >= 6.3 BuildRequires: python3.9-devel >= 3.9.16 BuildRequires: m4 >= 1.4.18 BuildRequires: bison >= 3.8.2 BuildRequires: texinfo >= 6.7 BuildRequires: flex >= 2.6.4 #If you run test cases you will need Dejagnu BuildRequires: dejagnu >= 1.6.3 Requires: AIX-rpm >= 7.1.0.0 Requires: gettext >= 0.21-2 Requires: libiconv >= 1.17-1 Requires: expat >= 2.5.0 Requires: ncurses >= 6.3 Requires: python3.9 >= 3.9.16 %define DEFCC cc %description GNU gdb is the standard GNU program debugger. %prep %setup -q export patch=/opt/freeware/bin/patch %patch1 -p0 %patch2 -p0 # This is required as the gnulib conftest.c fails without the optimization # and gives the error 'error: cannot be used with this compiler'. %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p0 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 %patch19 -p1 %patch20 -p1 %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 -g -gdwarf" 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 -g -gdwarf" 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-aix7.1.0.0 \ --build=powerpc64-ibm-aix7.1.0.0 \ --disable-binutils \ --disable-ld \ --with-expat \ --disable-binutils \ --disable-ld \ --disable-gold \ --disable-gas \ --disable-sim \ --disable-gprof \ --disable-werror \ --with-mpfr=no \ --with-mpc=no \ --with-python=/opt/freeware/bin/python3.9 ulimit -d unlimited ulimit -m unlimited gmake V=1 # This will need fix in future versions. This was done to initialise the command /opt/freeware/bin/patch -p1 < /home/buildusr/rpmbuild/SOURCES/gdb-%{version}-init_mmap.patch gmake V=1 cp ${RPM_SOURCE_DIR}/README-gdb-%{version}.ppc.aix README-gdb-%{version}.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 %preun 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-gdb-%{version}.ppc.aix %{_mandir}/man1/* %{_mandir}/man5/* %{prefix}/bin/* %{_infodir}/annotate.info.gz %{_infodir}/gdb* %{_infodir}/stabs.info.gz %{_datadir}/gdb/* %changelog * Mon May 22 2023 Aditya Kamath 13.1-1 - Upgrade to GDB-13.1. - Has the fix for call feature for running process which led to assertion failures. - Has the fix for unwanted warnings that used to appear during call feature. - Vector registers in the core will appear only for programs using vector registers. - info threads now will show main thread as thread 1 instead of a extra process. - shared libraries are loaded for new inferior as well in a fork call. * Tue Mar 28 2023 Aditya Kamath 10.2-4 - Link python to python3.9 in GDB 10.2 * Mon Nov 14 2022 Sangamesh Mallayya 10.2-3 - Included fixes for. - 1. Identify the inferior pid using new object current_inferior(). - 2. Enable Enable Multi process debugging - 3. Fix call functions command bug in 64-bit mode. - 4. Enable python3 support in gdb. * Fri Jun 17 2022 Sangamesh Mallayya 10.2-2 - Include vector changes. * 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).