From f469e8ce11672e26feb5ba6f9a134275fcfd5b4f Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior
Date: Fri, 21 Aug 2015 18:13:46 -0400
Subject: [PATCH 1/4] Improve error reporting when handling SystemTap SDT
Hello community,
here is the log from the commit of package gdb for openSUSE:Factory checked in at 2016-02-03 10:18:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gdb (Old)
and /work/SRC/openSUSE:Factory/.gdb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gdb"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gdb/gdb.changes 2015-11-11 10:29:17.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gdb.new/gdb.changes 2016-02-03 10:18:54.000000000 +0100
@@ -1,0 +2,52 @@
+Thu Jan 14 16:46:43 UTC 2016 - matz@suse.de
+
+- Rebase to gdb version 7.10.1 as of version in Fedora 23:
+ * reverse debugging on aarch64
+ * new commands or subcommands:
+ - info os cpu, set/show serial parity, info dll
+ - maint print symbol-cache/symbol-cache-statistics,
+ maint flush-symbol-cache
+ - record btrace bts, record bts
+ - compile print
+ - show/set mpx bound
+ - tui enable/disable
+ - record btrace pt, record pt
+ - maint info btrace,
+ maint btrace packet-history/clear-packet-history/clear
+ * s390 support for vector ABI
+ * "set sysroot" improvements related to remote targets
+ * better support for debugging containerized programs
+ (without "set sysroot")
+ * HISTSIZE environment variable is replaced by GDBHISTSIZE
+ * python scripting:
+ - it's possible to write frame unwinders
+ - several new methods in Objfile, Type and Value classes
+ - gdb can auto-load scripts contained in special sections
+ named '.debug_gdb_scripts'.
+ * extensions for the MI interface, new remote packet types
+- Removed obsolete patches:
+ 0001-S390-Add-target-descriptions-for-vector-register-set.patch
+ 0001-S390-Fix-compiler-invocation-with-compile-command.patch
+ 0001-S390-Support-new-vector-register-sections.patch
+ 0002-S390-Add-vector-register-support-to-gdb.patch
+ 0003-S390-Add-vector-register-support-to-gdbserver.patch
+ 0004-S390-Vector-register-test-case.patch
+ 0005-S390-Name-invisible-registers-with-the-empty-string-.patch
+ gdb-6.5-bz190810-gdbserver-arch-advice.patch
+ gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
+ gdb-6.8-bz457187-largefile-test.patch
+ gdb-enable-count-crash.patch
+ gdb-libstdc++-v3-python-r155978.tar.bz2
+ gdb-no-dg-extract-results-py.patch
+ gdb-python3-py_hash_t-32bit.patch
+ gdb-python3-testsuite.patch
+ gdb-s390-reorder-arch.diff
+ gdb-upstream.patch
+- Added new patches from Fedora:
+ gdb-pahole-python2.patch
+ gdb-probes-based-interface-robust-1of2.patch
+ gdb-probes-based-interface-robust-2of2.patch
+ gdb-rhbz1260558-ppc64le-skip_trampoline_code.patch
+ gdb-rhbz1270564-invalid-dwarf-regno.patch
+
+-------------------------------------------------------------------
Old:
----
0001-S390-Add-target-descriptions-for-vector-register-set.patch
0001-S390-Fix-compiler-invocation-with-compile-command.patch
0001-S390-Support-new-vector-register-sections.patch
0002-S390-Add-vector-register-support-to-gdb.patch
0003-S390-Add-vector-register-support-to-gdbserver.patch
0004-S390-Vector-register-test-case.patch
0005-S390-Name-invisible-registers-with-the-empty-string-.patch
gdb-6.5-bz190810-gdbserver-arch-advice.patch
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
gdb-6.8-bz457187-largefile-test.patch
gdb-7.9.1.tar.bz2
gdb-enable-count-crash.patch
gdb-libstdc++-v3-python-r155978.tar.bz2
gdb-no-dg-extract-results-py.patch
gdb-python3-py_hash_t-32bit.patch
gdb-python3-testsuite.patch
gdb-s390-reorder-arch.diff
gdb-upstream.patch
New:
----
gdb-7.10.1.tar.bz2
gdb-libstdc++-v3-python-r225521.tar.bz2
gdb-pahole-python2.patch
gdb-probes-based-interface-robust-1of2.patch
gdb-probes-based-interface-robust-2of2.patch
gdb-rhbz1260558-ppc64le-skip_trampoline_code.patch
gdb-rhbz1270564-invalid-dwarf-regno.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gdb.spec ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:18:59.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package gdb
#
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2012 RedHat
#
# All modifications and additions to the file contributed by third parties
@@ -27,7 +27,7 @@
%global snap 20130731
# See timestamp of source gnulib installed into gdb/gnulib/ .
%global snapgnulib 20121213
-Version: 7.9.1
+Version: 7.10.1
Release: 0
# The release always contains a leading reserved number, start it at 1.
@@ -78,7 +78,7 @@
Source4: gdbinit
# libstdc++ pretty printers from GCC SVN HEAD (4.5 experimental).
-%global libstdcxxpython gdb-libstdc++-v3-python-r155978
+%global libstdcxxpython gdb-libstdc++-v3-python-r225521
Source5: %{libstdcxxpython}.tar.bz2
# Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664).
@@ -92,136 +92,123 @@
#Fedora Packages begin
Patch1: gdb-6.3-rh-testversion-20041202.patch
-Patch2: gdb-upstream.patch
-Patch3: gdb-archer.patch
-Patch4: gdb-vla-intel.patch
-Patch5: gdb-vla-intel-logical-not.patch
-Patch6: gdb-vla-intel-stringbt-fix.patch
-Patch7: gdb-vla-intel-04of23-fix.patch
-Patch8: gdb-6.3-rh-dummykfail-20041202.patch
-Patch9: gdb-6.3-ppc64syscall-20040622.patch
-Patch10: gdb-6.3-ppc64displaysymbol-20041124.patch
-Patch11: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
-Patch12: gdb-6.3-gstack-20050411.patch
-Patch13: gdb-6.3-test-pie-20050107.patch
-Patch14: gdb-6.3-test-self-20050110.patch
-Patch15: gdb-6.3-test-dtorfix-20050121.patch
-Patch16: gdb-6.3-test-movedir-20050125.patch
-Patch17: gdb-6.3-threaded-watchpoints2-20050225.patch
-Patch18: gdb-6.3-inferior-notification-20050721.patch
-Patch19: gdb-6.3-inheritancetest-20050726.patch
-Patch20: gdb-6.3-readnever-20050907.patch
-Patch21: gdb-6.5-bz203661-emit-relocs.patch
-Patch22: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
-Patch23: gdb-6.5-sharedlibrary-path.patch
-Patch24: gdb-6.5-bz190810-gdbserver-arch-advice.patch
-Patch25: gdb-6.5-BEA-testsuite.patch
-Patch26: gdb-6.5-last-address-space-byte-test.patch
-Patch27: gdb-6.5-readline-long-line-crash-test.patch
-Patch28: gdb-6.5-bz216711-clone-is-outermost.patch
-Patch29: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
-Patch30: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
-Patch31: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
-Patch32: gdb-6.3-bz140532-ppc-unwinding-test.patch
-Patch33: gdb-6.3-bz202689-exec-from-pthread-test.patch
-Patch34: gdb-6.6-bz230000-power6-disassembly-test.patch
-Patch35: gdb-6.3-bz231832-obstack-2gb.patch
-Patch36: gdb-6.6-bz229517-gcore-without-terminal.patch
-Patch37: gdb-6.6-bz235197-fork-detach-info.patch
-Patch38: gdb-6.6-testsuite-timeouts.patch
-Patch39: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
-Patch40: gdb-6.6-scheduler_locking-step-is-default.patch
-Patch41: gdb-6.3-attach-see-vdso-test.patch
-Patch42: gdb-6.5-bz243845-stale-testing-zombie-test.patch
-Patch43: gdb-6.6-buildid-locate.patch
-Patch44: gdb-6.6-buildid-locate-solib-missing-ids.patch
-Patch45: gdb-6.6-buildid-locate-rpm.patch
-Patch46: gdb-6.7-charsign-test.patch
-Patch47: gdb-6.7-ppc-clobbered-registers-O2-test.patch
-Patch48: gdb-6.5-ia64-libunwind-leak-test.patch
-Patch49: gdb-6.5-missed-trap-on-step-test.patch
-Patch50: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
-Patch51: gdb-6.5-gcore-buffer-limit-test.patch
-Patch52: gdb-6.6-threads-static-test.patch
-Patch53: gdb-6.3-mapping-zero-inode-test.patch
-Patch54: gdb-6.3-focus-cmd-prev-test.patch
-Patch55: gdb-6.8-bz442765-threaded-exec-test.patch
-Patch56: gdb-6.8-sparc64-silence-memcpy-check.patch
-Patch57: gdb-6.5-section-num-fixup-test.patch
-Patch58: gdb-6.8-bz436037-reg-no-longer-active.patch
-Patch59: gdb-6.8-watchpoint-conditionals-test.patch
-Patch60: gdb-6.8-bz466901-backtrace-full-prelinked.patch
-Patch61: gdb-6.8-bz457187-largefile-test.patch
-Patch62: gdb-simultaneous-step-resume-breakpoint-test.patch
-Patch63: gdb-core-open-vdso-warning.patch
-Patch64: gdb-x86_64-i386-syscall-restart.patch
-Patch65: gdb-bz533176-fortran-omp-step.patch
-Patch66: gdb-follow-child-stale-parent.patch
-Patch67: gdb-ccache-workaround.patch
-Patch68: gdb-archer-pie-addons.patch
-Patch69: gdb-archer-pie-addons-keep-disabled.patch
-Patch70: gdb-lineno-makeup-test.patch
-Patch71: gdb-ppc-power7-test.patch
-Patch72: gdb-bz541866-rwatch-before-run.patch
-Patch73: gdb-moribund-utrace-workaround.patch
-Patch74: gdb-archer-next-over-throw-cxx-exec.patch
-Patch75: gdb-bz601887-dwarf4-rh-test.patch
-Patch76: gdb-6.6-buildid-locate-core-as-arg.patch
-Patch77: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
-Patch78: gdb-test-bt-cfi-without-die.patch
-Patch79: gdb-gdb-add-index-script.patch
-Patch80: gdb-bz568248-oom-is-error.patch
-Patch81: gdb-bz634108-solib_address.patch
-Patch82: gdb-test-pid0-core.patch
-Patch83: gdb-test-dw2-aranges.patch
-Patch84: gdb-test-expr-cumulative-archer.patch
-Patch85: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
-Patch86: gdb-glibc-vdso-workaround.patch
-Patch87: gdb-runtest-pie-override.patch
-Patch88: gdb-attach-fail-reasons-5of5.patch
-Patch89: gdb-stale-frame_info.patch
-Patch90: gdb-glibc-strstr-workaround.patch
-Patch91: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
-Patch92: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
-Patch93: gdb-rhbz795424-bitpos-20of25.patch
-Patch94: gdb-rhbz795424-bitpos-21of25.patch
-Patch95: gdb-rhbz795424-bitpos-22of25.patch
-Patch96: gdb-rhbz795424-bitpos-23of25.patch
-Patch97: gdb-rhbz795424-bitpos-25of25.patch
-Patch98: gdb-rhbz795424-bitpos-25of25-test.patch
-Patch99: gdb-rhbz795424-bitpos-lazyvalue.patch
-Patch100: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
-Patch101: gdb-enable-count-crash.patch
-Patch102: gdb-gnat-dwarf-crash-3of3.patch
-Patch103: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
-Patch104: gdb-archer-vla-tests.patch
-Patch105: gdb-btrobust.patch
-Patch106: gdb-fortran-frame-string.patch
-Patch107: gdb-python-gil.patch
-Patch108: gdb-jit-reader-multilib.patch
-Patch109: gdb-no-dg-extract-results-py.patch
-Patch110: gdb-python3-py_hash_t-32bit.patch
-Patch111: gdb-python3-testsuite.patch
-Patch112: gdb-dts-rhel6-python-compat.patch
-Patch113: gdb-6.6-buildid-locate-rpm-scl.patch
-Patch114: gdb-readline62-ask-more-rh.patch
-Patch115: gdb-6.8-attach-signalled-detach-stopped.patch
-Patch116: gdb-6.8-quit-never-aborts.patch
-Patch117: gdb-rhel5-compat.patch
+Patch2: gdb-archer.patch
+Patch3: gdb-vla-intel.patch
+Patch4: gdb-vla-intel-logical-not.patch
+Patch5: gdb-vla-intel-stringbt-fix.patch
+Patch6: gdb-vla-intel-04of23-fix.patch
+Patch7: gdb-6.3-rh-dummykfail-20041202.patch
+Patch8: gdb-6.3-ppc64syscall-20040622.patch
+Patch9: gdb-6.3-ppc64displaysymbol-20041124.patch
+Patch10: gdb-6.3-gstack-20050411.patch
+Patch11: gdb-6.3-test-pie-20050107.patch
+Patch12: gdb-6.3-test-self-20050110.patch
+Patch13: gdb-6.3-test-dtorfix-20050121.patch
+Patch14: gdb-6.3-test-movedir-20050125.patch
+Patch15: gdb-6.3-threaded-watchpoints2-20050225.patch
+Patch16: gdb-6.3-inferior-notification-20050721.patch
+Patch17: gdb-6.3-inheritancetest-20050726.patch
+Patch18: gdb-6.3-readnever-20050907.patch
+Patch19: gdb-6.5-bz203661-emit-relocs.patch
+Patch20: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
+Patch21: gdb-6.5-sharedlibrary-path.patch
+Patch22: gdb-6.5-BEA-testsuite.patch
+Patch23: gdb-6.5-last-address-space-byte-test.patch
+Patch24: gdb-6.5-readline-long-line-crash-test.patch
+Patch25: gdb-6.5-bz216711-clone-is-outermost.patch
+Patch26: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
+Patch27: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
+Patch28: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
+Patch29: gdb-6.3-bz140532-ppc-unwinding-test.patch
+Patch30: gdb-6.3-bz202689-exec-from-pthread-test.patch
+Patch31: gdb-6.6-bz230000-power6-disassembly-test.patch
+Patch32: gdb-6.3-bz231832-obstack-2gb.patch
+Patch33: gdb-6.6-bz229517-gcore-without-terminal.patch
+Patch34: gdb-6.6-bz235197-fork-detach-info.patch
+Patch35: gdb-6.6-testsuite-timeouts.patch
+Patch36: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
+Patch37: gdb-6.6-scheduler_locking-step-is-default.patch
+Patch38: gdb-6.3-attach-see-vdso-test.patch
+Patch39: gdb-6.5-bz243845-stale-testing-zombie-test.patch
+Patch40: gdb-6.6-buildid-locate.patch
+Patch41: gdb-6.6-buildid-locate-solib-missing-ids.patch
+Patch42: gdb-6.6-buildid-locate-rpm.patch
+Patch43: gdb-6.7-charsign-test.patch
+Patch44: gdb-6.7-ppc-clobbered-registers-O2-test.patch
+Patch45: gdb-6.5-ia64-libunwind-leak-test.patch
+Patch46: gdb-6.5-missed-trap-on-step-test.patch
+Patch47: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
+Patch48: gdb-6.5-gcore-buffer-limit-test.patch
+Patch49: gdb-6.6-threads-static-test.patch
+Patch50: gdb-6.3-mapping-zero-inode-test.patch
+Patch51: gdb-6.3-focus-cmd-prev-test.patch
+Patch52: gdb-6.8-bz442765-threaded-exec-test.patch
+Patch53: gdb-6.8-sparc64-silence-memcpy-check.patch
+Patch54: gdb-6.5-section-num-fixup-test.patch
+Patch55: gdb-6.8-bz436037-reg-no-longer-active.patch
+Patch56: gdb-6.8-watchpoint-conditionals-test.patch
+Patch57: gdb-6.8-bz466901-backtrace-full-prelinked.patch
+Patch58: gdb-simultaneous-step-resume-breakpoint-test.patch
+Patch59: gdb-core-open-vdso-warning.patch
+Patch60: gdb-x86_64-i386-syscall-restart.patch
+Patch61: gdb-bz533176-fortran-omp-step.patch
+Patch62: gdb-follow-child-stale-parent.patch
+Patch63: gdb-ccache-workaround.patch
+Patch64: gdb-archer-pie-addons.patch
+Patch65: gdb-archer-pie-addons-keep-disabled.patch
+Patch66: gdb-lineno-makeup-test.patch
+Patch67: gdb-ppc-power7-test.patch
+Patch68: gdb-bz541866-rwatch-before-run.patch
+Patch69: gdb-moribund-utrace-workaround.patch
+Patch70: gdb-archer-next-over-throw-cxx-exec.patch
+Patch71: gdb-bz601887-dwarf4-rh-test.patch
+Patch72: gdb-6.6-buildid-locate-core-as-arg.patch
+Patch73: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
+Patch74: gdb-test-bt-cfi-without-die.patch
+Patch75: gdb-gdb-add-index-script.patch
+Patch76: gdb-bz568248-oom-is-error.patch
+Patch77: gdb-bz634108-solib_address.patch
+Patch78: gdb-test-pid0-core.patch
+Patch79: gdb-test-dw2-aranges.patch
+Patch80: gdb-test-expr-cumulative-archer.patch
+Patch81: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
+Patch82: gdb-glibc-vdso-workaround.patch
+Patch83: gdb-runtest-pie-override.patch
+Patch84: gdb-attach-fail-reasons-5of5.patch
+Patch85: gdb-stale-frame_info.patch
+Patch86: gdb-glibc-strstr-workaround.patch
+Patch87: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
+Patch88: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
+Patch89: gdb-rhbz795424-bitpos-20of25.patch
+Patch90: gdb-rhbz795424-bitpos-21of25.patch
+Patch91: gdb-rhbz795424-bitpos-22of25.patch
+Patch92: gdb-rhbz795424-bitpos-23of25.patch
+Patch93: gdb-rhbz795424-bitpos-25of25.patch
+Patch94: gdb-rhbz795424-bitpos-25of25-test.patch
+Patch95: gdb-rhbz795424-bitpos-lazyvalue.patch
+Patch96: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
+Patch97: gdb-gnat-dwarf-crash-3of3.patch
+Patch98: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
+Patch99: gdb-archer-vla-tests.patch
+Patch100: gdb-btrobust.patch
+Patch101: gdb-fortran-frame-string.patch
+Patch102: gdb-python-gil.patch
+Patch103: gdb-jit-reader-multilib.patch
+Patch104: gdb-probes-based-interface-robust-1of2.patch
+Patch105: gdb-probes-based-interface-robust-2of2.patch
+Patch106: gdb-rhbz1260558-ppc64le-skip_trampoline_code.patch
+Patch107: gdb-rhbz1270564-invalid-dwarf-regno.patch
+Patch108: gdb-dts-rhel6-python-compat.patch
+Patch109: gdb-6.6-buildid-locate-rpm-scl.patch
+Patch110: gdb-readline62-ask-more-rh.patch
+Patch111: gdb-6.8-attach-signalled-detach-stopped.patch
+Patch112: gdb-6.8-quit-never-aborts.patch
+Patch113: gdb-rhel5-compat.patch
+Patch114: gdb-pahole-python2.patch
#Fedora Packages end
# Upstream patch to fix gcc -Werror
Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch
-# Upstream patch for reordering "s390:31-bit" (bnc#936050)
-Patch1003: gdb-s390-reorder-arch.diff
-# fate#318039
-Patch1004: 0001-S390-Fix-compiler-invocation-with-compile-command.patch
-Patch1005: 0001-S390-Support-new-vector-register-sections.patch
-Patch1006: 0001-S390-Add-target-descriptions-for-vector-register-set.patch
-Patch1007: 0002-S390-Add-vector-register-support-to-gdb.patch
-Patch1008: 0003-S390-Add-vector-register-support-to-gdbserver.patch
-Patch1009: 0004-S390-Vector-register-test-case.patch
-Patch1010: 0005-S390-Name-invisible-registers-with-the-empty-string-.patch
BuildRequires: bison
BuildRequires: flex
@@ -284,6 +271,11 @@
%endif
%if 0%{suse_version} > 1110
%ifarch x86_64 ppc64 s390x
+%if 0%{suse_version} >= 1330
+# Older distros miss this pseudo package, the Ada
+# testsuite won't work completely
+BuildRequires: gcc-ada-32bit
+%endif
BuildRequires: gcc-c++-32bit
%endif
%endif
@@ -465,32 +457,21 @@
%patch106 -p1
%patch107 -p1
%patch108 -p1
+%patch108 -p1 -R
%patch109 -p1
+%patch109 -p1 -R
%patch110 -p1
+%patch110 -p1 -R
%patch111 -p1
%patch112 -p1
-%patch112 -p1 -R
%patch113 -p1
%patch113 -p1 -R
+%patch112 -p1 -R
+%patch111 -p1 -R
%patch114 -p1
-%patch114 -p1 -R
-%patch115 -p1
-%patch116 -p1
-%patch117 -p1
-%patch117 -p1 -R
-%patch116 -p1 -R
-%patch115 -p1 -R
#Fedora patching end
%patch1002 -p1
-%patch1003 -p1
-%patch1004 -p1
-%patch1005 -p1
-%patch1006 -p1
-%patch1007 -p1
-%patch1008 -p1
-%patch1009 -p1
-%patch1010 -p1
find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen.
@@ -566,6 +547,7 @@
--with-separate-debug-dir=/usr/lib/debug \
--disable-sim \
--disable-rpath \
+ --with-system-zlib \
%if %{suse_version} > 1110
--with-system-readline \
%else
@@ -671,8 +653,6 @@
#make %{?_smp_mflags} -C gdb/doc {gdb,annotate}{.info,/index.html,.pdf} MAKEHTMLFLAGS=--no-split
-grep '#define HAVE_ZLIB_H 1' gdb/config.h
-
# Copy the <sourcetree>/gdb/NEWS file to the directory above it.
cp $RPM_BUILD_DIR/%{gdb_src}/gdb/NEWS $RPM_BUILD_DIR/%{gdb_src}
++++++ gdb-6.3-gstack-20050411.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:18:59.000000000 +0100
@@ -97,7 +97,7 @@
+ fi
+fi
+
-+GDB=${GDB:-/usr/bin/gdb}
++GDB=${GDB:-gdb}
+
+# Run GDB, strip out unwanted noise.
+# --readnever is no longer used since .gdb_index is now in use.
++++++ gdb-6.3-readnever-20050907.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:18:59.000000000 +0100
@@ -11,10 +11,10 @@
* gdb.texinfo (File Options): Document --readnever.
-Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo
+Index: gdb-7.9.50.20150520/gdb/doc/gdb.texinfo
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/doc/gdb.texinfo 2015-01-01 17:01:08.308881292 +0100
-+++ gdb-7.8.50.20141228/gdb/doc/gdb.texinfo 2015-01-01 17:01:10.302880126 +0100
+--- gdb-7.9.50.20150520.orig/gdb/doc/gdb.texinfo 2015-05-31 16:34:58.436379663 +0200
++++ gdb-7.9.50.20150520/gdb/doc/gdb.texinfo 2015-05-31 16:35:03.452416381 +0200
@@ -1032,6 +1032,12 @@ Read each symbol file's entire symbol ta
the default, which is to read it incrementally as it is needed.
This makes startup slower, but makes future operations faster.
@@ -28,19 +28,19 @@
@end table
@node Mode Options
-Index: gdb-7.8.50.20141228/gdb/main.c
+Index: gdb-7.9.50.20150520/gdb/main.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/main.c 2015-01-01 17:01:08.312881290 +0100
-+++ gdb-7.8.50.20141228/gdb/main.c 2015-01-01 17:01:10.303880125 +0100
-@@ -590,6 +590,7 @@ captured_main (void *data)
- {"xdb", no_argument, &xdb_commands, 1},
+--- gdb-7.9.50.20150520.orig/gdb/main.c 2015-05-31 16:34:58.439379685 +0200
++++ gdb-7.9.50.20150520/gdb/main.c 2015-05-31 16:35:20.547541518 +0200
+@@ -604,6 +604,7 @@ captured_main (void *data)
+ {"tui", no_argument, 0, OPT_TUI},
{"dbx", no_argument, &dbx_commands, 1},
{"readnow", no_argument, &readnow_symbol_files, 1},
+ {"readnever", no_argument, &readnever_symbol_files, 1},
{"r", no_argument, &readnow_symbol_files, 1},
{"quiet", no_argument, &quiet, 1},
{"q", no_argument, &quiet, 1},
-@@ -1245,6 +1246,7 @@ Selection of debuggee and its files:\n\n
+@@ -1253,6 +1254,7 @@ Selection of debuggee and its files:\n\n
--se=FILE Use FILE as symbol file and executable file.\n\
--symbols=SYMFILE Read symbols from SYMFILE.\n\
--readnow Fully read symbol files on first access.\n\
@@ -48,10 +48,10 @@
--write Set writing into executable and core files.\n\n\
"), stream);
fputs_unfiltered (_("\
-Index: gdb-7.8.50.20141228/gdb/symfile.c
+Index: gdb-7.9.50.20150520/gdb/symfile.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/symfile.c 2015-01-01 17:01:08.313881289 +0100
-+++ gdb-7.8.50.20141228/gdb/symfile.c 2015-01-01 17:01:10.304880125 +0100
+--- gdb-7.9.50.20150520.orig/gdb/symfile.c 2015-05-31 16:34:58.440379692 +0200
++++ gdb-7.9.50.20150520/gdb/symfile.c 2015-05-31 16:35:03.454416395 +0200
@@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup (
/* Global variables owned by this file. */
@@ -60,10 +60,10 @@
/* Functions this file defines. */
-Index: gdb-7.8.50.20141228/gdb/dwarf2read.c
+Index: gdb-7.9.50.20150520/gdb/dwarf2read.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/dwarf2read.c 2015-01-01 17:01:08.319881285 +0100
-+++ gdb-7.8.50.20141228/gdb/dwarf2read.c 2015-01-01 17:01:26.888870511 +0100
+--- gdb-7.9.50.20150520.orig/gdb/dwarf2read.c 2015-05-31 16:34:58.446379736 +0200
++++ gdb-7.9.50.20150520/gdb/dwarf2read.c 2015-05-31 16:35:03.459416432 +0200
@@ -69,6 +69,7 @@
#include "source.h"
#include "filestuff.h"
@@ -72,7 +72,7 @@
#include
#include
-@@ -1989,7 +1990,8 @@ dwarf2_has_info (struct objfile *objfile
+@@ -2050,7 +2051,8 @@ dwarf2_has_info (struct objfile *objfile
(void *) names);
dwarf2_per_objfile->objfile = objfile;
}
@@ -82,10 +82,10 @@
&& dwarf2_per_objfile->info.s.asection != NULL
&& !dwarf2_per_objfile->abbrev.is_virtual
&& dwarf2_per_objfile->abbrev.s.asection != NULL);
-Index: gdb-7.8.50.20141228/gdb/top.h
+Index: gdb-7.9.50.20150520/gdb/top.h
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/top.h 2015-01-01 17:01:08.320881284 +0100
-+++ gdb-7.8.50.20141228/gdb/top.h 2015-01-01 17:01:10.310880121 +0100
+--- gdb-7.9.50.20150520.orig/gdb/top.h 2015-05-31 16:34:58.448379751 +0200
++++ gdb-7.9.50.20150520/gdb/top.h 2015-05-31 16:35:03.459416432 +0200
@@ -67,6 +67,7 @@ extern void set_prompt (const char *s);
/* From random places. */
++++++ gdb-6.3-test-pie-20050107.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:18:59.000000000 +0100
@@ -1,40 +1,39 @@
-Index: gdb-7.8.50.20141228/gdb/testsuite/configure.ac
+Index: gdb-7.9.50.20150520/gdb/testsuite/configure.ac
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/testsuite/configure.ac 2015-01-01 17:00:26.123908948 +0100
-+++ gdb-7.8.50.20141228/gdb/testsuite/configure.ac 2015-01-01 17:00:43.168897773 +0100
-@@ -106,6 +106,6 @@ AC_OUTPUT([Makefile \
- gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \
- gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile \
+--- gdb-7.9.50.20150520.orig/gdb/testsuite/configure.ac 2015-05-31 16:34:02.396969450 +0200
++++ gdb-7.9.50.20150520/gdb/testsuite/configure.ac 2015-05-31 16:34:33.443196711 +0200
+@@ -114,5 +114,5 @@ AC_OUTPUT([Makefile \
+ gdb.guile/Makefile gdb.linespec/Makefile \
gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
-- gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
-+ gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
- gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
+ gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
+- gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
++ gdb.perf/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
-Index: gdb-7.8.50.20141228/gdb/testsuite/configure
+Index: gdb-7.9.50.20150520/gdb/testsuite/configure
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/testsuite/configure 2015-01-01 17:00:26.124908947 +0100
-+++ gdb-7.8.50.20141228/gdb/testsuite/configure 2015-01-01 17:00:59.467887088 +0100
-@@ -3458,7 +3458,7 @@ if test "${build}" = "${host}" -a "${hos
- fi
+--- gdb-7.9.50.20150520.orig/gdb/testsuite/configure 2015-05-31 16:33:53.154901798 +0200
++++ gdb-7.9.50.20150520/gdb/testsuite/configure 2015-05-31 16:34:48.654308057 +0200
+@@ -3514,7 +3514,7 @@ program_transform_name=`$as_echo "$progr
+ ac_config_files="$ac_config_files lib/pdtrace"
--ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
-+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
++ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
-@@ -4190,6 +4190,7 @@ do
- "gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;;
+@@ -4242,6 +4242,7 @@ do
"gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
"gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
-+ "gdb.pie/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pie/Makefile" ;;
"gdb.perf/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.perf/Makefile" ;;
++ "gdb.pie/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pie/Makefile" ;;
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.c
+ "gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;;
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.c 2015-01-01 17:00:43.169897773 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.c 2015-05-31 16:34:02.398969465 +0200
@@ -0,0 +1,20 @@
+/* This program is intended to be started outside of gdb, and then
+ attached to by gdb. Thus, it simply spins in a loop. The loop
@@ -56,10 +55,10 @@
+ }
+ return 0;
+}
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach2.c
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach2.c 2015-01-01 17:00:43.170897772 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach2.c 2015-05-31 16:34:02.398969465 +0200
@@ -0,0 +1,24 @@
+/* This program is intended to be started outside of gdb, and then
+ attached to by gdb. Thus, it simply spins in a loop. The loop
@@ -85,10 +84,10 @@
+ }
+ return (0);
+}
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.c
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.c 2015-01-01 17:00:43.170897772 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.c 2015-05-31 16:34:02.399969472 +0200
@@ -0,0 +1,146 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@@ -236,10 +235,10 @@
+ }
+ return 0;
+}
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break1.c
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break1.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break1.c 2015-01-01 17:00:43.170897772 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break1.c 2015-05-31 16:34:02.399969472 +0200
@@ -0,0 +1,44 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@@ -285,10 +284,10 @@
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
+void marker4 (d) long d; {} /* set breakpoint 13 here */
+#endif
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/coremaker.c
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/coremaker.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/coremaker.c 2015-01-01 17:00:43.170897772 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/coremaker.c 2015-05-31 16:34:02.399969472 +0200
@@ -0,0 +1,142 @@
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
+ Free Software Foundation, Inc.
@@ -432,10 +431,10 @@
+ return 0;
+}
+
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.exp
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.exp 2015-01-01 17:00:43.171897771 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp 2015-05-31 16:34:02.400969480 +0200
@@ -0,0 +1,417 @@
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
+
@@ -854,10 +853,10 @@
+do_call_attach_tests
+
+return 0
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.exp
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.exp 2015-01-01 17:00:43.172897771 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp 2015-05-31 16:34:02.401969487 +0200
@@ -0,0 +1,962 @@
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2002, 2003, 2004
@@ -1821,10 +1820,10 @@
+ send_gdb "set args main\n"
+ gdb_expect -re ".*$gdb_prompt $" {}
+}
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/corefile.exp
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/corefile.exp 2015-01-01 17:00:43.172897771 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp 2015-05-31 16:34:02.401969487 +0200
@@ -0,0 +1,233 @@
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc.
@@ -2059,10 +2058,10 @@
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
+
+gdb_test "core" "No core file now."
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/Makefile.in
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/Makefile.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/Makefile.in 2015-01-01 17:00:43.172897771 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/Makefile.in 2015-05-31 16:34:02.401969487 +0200
@@ -0,0 +1,19 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
++++++ gdb-6.6-buildid-locate-core-as-arg.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:18:59.000000000 +0100
@@ -58,10 +58,10 @@
* exec.c (exec_file_attach): Print a more useful error message if the
user did "gdb core".
-Index: gdb-7.8.50.20141228/gdb/exec.c
+Index: gdb-7.9.50.20150531/gdb/exec.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/exec.c 2015-01-03 23:18:38.097427908 +0100
-+++ gdb-7.8.50.20141228/gdb/exec.c 2015-01-03 23:19:02.448556391 +0100
+--- gdb-7.9.50.20150531.orig/gdb/exec.c 2015-05-31 03:48:29.000000000 +0200
++++ gdb-7.9.50.20150531/gdb/exec.c 2015-05-31 20:07:35.092878685 +0200
@@ -35,6 +35,7 @@
#include "progspace.h"
#include "gdb_bfd.h"
@@ -70,7 +70,7 @@
#include
#include "readline/readline.h"
-@@ -222,12 +223,27 @@ exec_file_attach (const char *filename,
+@@ -298,12 +299,27 @@ exec_file_attach (const char *filename,
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
{
@@ -101,11 +101,11 @@
}
if (build_section_table (exec_bfd, §ions, §ions_end))
-Index: gdb-7.8.50.20141228/gdb/main.c
+Index: gdb-7.9.50.20150531/gdb/main.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/main.c 2015-01-03 23:18:38.098427913 +0100
-+++ gdb-7.8.50.20141228/gdb/main.c 2015-01-03 23:22:10.157546792 +0100
-@@ -426,6 +426,36 @@ typedef struct cmdarg {
+--- gdb-7.9.50.20150531.orig/gdb/main.c 2015-05-31 20:07:34.183872824 +0200
++++ gdb-7.9.50.20150531/gdb/main.c 2015-05-31 20:10:05.095845935 +0200
+@@ -435,6 +435,37 @@ typedef struct cmdarg {
/* Define type VEC (cmdarg_s). */
DEF_VEC_O (cmdarg_s);
@@ -120,11 +120,11 @@
+
+ gdb_assert (exec_bfd == NULL);
+
-+ TRY_CATCH (e, RETURN_MASK_ALL)
++ TRY
+ {
+ exec_file_attach (filename, from_tty);
+ }
-+ if (e.reason < 0)
++ CATCH (e, RETURN_MASK_ALL)
+ {
+ if (e.error == IS_CORE_ERROR)
+ {
@@ -137,12 +137,13 @@
+ }
+ throw_exception (e);
+ }
++ END_CATCH
+}
+
static int
captured_main (void *data)
{
-@@ -910,6 +940,8 @@ captured_main (void *data)
+@@ -923,6 +954,8 @@ captured_main (void *data)
{
symarg = argv[optind];
execarg = argv[optind];
@@ -151,7 +152,7 @@
optind++;
}
-@@ -1069,11 +1101,26 @@ captured_main (void *data)
+@@ -1080,11 +1113,25 @@ captured_main (void *data)
&& symarg != NULL
&& strcmp (execarg, symarg) == 0)
{
@@ -171,23 +172,22 @@
open it, better only print one error message.
- catch_command_errors returns non-zero on success! */
- if (catch_command_errors_const (exec_file_attach, execarg,
-- !batch_flag, RETURN_MASK_ALL))
+- !batch_flag))
+ catch_command_errors returns non-zero on success!
+ Do not load EXECARG as a symbol file if it has been already processed
+ as a core file. */
-+ if (catch_command_errors_const (func, execarg, !batch_flag,
-+ RETURN_MASK_ALL)
++ if (catch_command_errors_const (func, execarg, !batch_flag)
+ && core_bfd == NULL)
catch_command_errors_const (symbol_file_add_main, symarg,
- !batch_flag, RETURN_MASK_ALL);
+ !batch_flag);
}
-Index: gdb-7.8.50.20141228/gdb/common/common-exceptions.h
+Index: gdb-7.9.50.20150531/gdb/common/common-exceptions.h
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/common/common-exceptions.h 2015-01-03 23:18:38.097427908 +0100
-+++ gdb-7.8.50.20141228/gdb/common/common-exceptions.h 2015-01-03 23:19:02.449556396 +0100
-@@ -99,6 +99,9 @@ enum errors {
- /* Requested feature, method, mechanism, etc. is not supported. */
- NOT_SUPPORTED_ERROR,
+--- gdb-7.9.50.20150531.orig/gdb/common/common-exceptions.h 2015-05-31 03:48:29.000000000 +0200
++++ gdb-7.9.50.20150531/gdb/common/common-exceptions.h 2015-05-31 20:07:35.093878692 +0200
+@@ -105,6 +105,9 @@ enum errors {
+ "_ERROR" is appended to the name. */
+ MAX_COMPLETIONS_REACHED_ERROR,
+ /* Attempt to load a core file as executable. */
+ IS_CORE_ERROR,
++++++ gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:18:59.000000000 +0100
@@ -15,10 +15,10 @@
NULL after it is free'd, otherwise the code below thinks that it is still
valid and doesn't print the necessary warning ("Try: yum install ...").
-Index: gdb-7.7/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
+Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
===================================================================
---- /dev/null
-+++ gdb-7.7/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp 2015-07-09 22:22:26.278304653 +0200
@@ -0,0 +1,97 @@
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
@@ -75,7 +75,7 @@
+# Move the binfile to a temporary name
+remote_exec build "mv $binfile ${binfile}.old"
+
-+# Reinitialize GDB and see if we get a yum warning
++# Reinitialize GDB and see if we get a yum/dnf warning
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
@@ -88,8 +88,8 @@
+ "set debug-file-directory"
+
+ gdb_test "core-file ${objdir}/${subdir}/gcore.test" \
-+ "Missing separate debuginfo for the main executable file\r\nTry: yum --enablerepo='\\*debug\\*' install $objdir/$subdir/$build_id_without_debug\r\n.*" \
-+ "test first yum warning"
++ "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install $objdir/$subdir/$build_id_without_debug\r\n.*" \
++ "test first yum/dnf warning"
+}
+
+# Now we define and create our .build-id
@@ -98,7 +98,7 @@
+# exist.
+remote_exec build "ln -s $binfile ${objdir}/${subdir}/${build_id_without_debug}"
+
-+# Reinitialize GDB to get the second yum warning
++# Reinitialize GDB to get the second yum/dnf warning
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
@@ -111,21 +111,25 @@
+ "set debug-file-directory"
+
+ gdb_test "core-file ${objdir}/${subdir}/gcore.test" \
-+ "Missing separate debuginfo for the main executable file\r\nTry: yum --enablerepo='\\*debug\\*' install $binfile\r\n.*" \
-+ "test second yum warning"
++ "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install $binfile\r\n.*" \
++ "test second yum/dnf warning"
+}
+
+# Leaving the link there will cause breakage in the next run.
+remote_exec build "rm -f ${objdir}/${subdir}/${build_id_without_debug}"
-Index: gdb-7.7/gdb/build-id.c
+Index: gdb-7.9.90.20150709/gdb/build-id.c
===================================================================
---- gdb-7.7.orig/gdb/build-id.c
-+++ gdb-7.7/gdb/build-id.c
-@@ -588,6 +588,7 @@ build_id_to_debug_bfd (size_t build_id_l
+--- gdb-7.9.90.20150709.orig/gdb/build-id.c 2015-07-09 22:22:26.278304653 +0200
++++ gdb-7.9.90.20150709/gdb/build-id.c 2015-07-09 22:22:51.398502329 +0200
+@@ -589,7 +589,10 @@ build_id_to_debug_bfd (size_t build_id_l
+ do_cleanups (inner);
+
if (abfd == NULL)
- {
- xfree (filename);
+- continue;
++ {
+ filename = NULL;
- continue;
- }
++ continue;
++ }
+ if (build_id_verify (abfd, build_id_len, build_id))
+ break;
++++++ gdb-6.6-buildid-locate-rpm-suse.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:18:59.000000000 +0100
@@ -1,8 +1,8 @@
-Index: gdb-7.9.1/gdb/build-id.c
+Index: gdb-7.10.1/gdb/build-id.c
===================================================================
---- gdb-7.9.1.orig/gdb/build-id.c 2015-07-10 15:24:05.000000000 +0200
-+++ gdb-7.9.1/gdb/build-id.c 2015-07-10 15:24:51.000000000 +0200
-@@ -827,9 +827,9 @@ missing_rpm_enlist (const char *filename
+--- gdb-7.10.1.orig/gdb/build-id.c 2016-01-14 16:19:02.000000000 +0100
++++ gdb-7.10.1/gdb/build-id.c 2016-01-14 16:21:43.000000000 +0100
+@@ -830,9 +830,9 @@ missing_rpm_enlist (const char *filename
if (h == NULL)
break;
@@ -15,7 +15,7 @@
&err);
if (!debuginfo)
{
-@@ -837,60 +837,19 @@ missing_rpm_enlist (const char *filename
+@@ -840,60 +840,19 @@ missing_rpm_enlist (const char *filename
err);
continue;
}
@@ -78,7 +78,7 @@
/* Base package name for `debuginfo-install'. We do not use the
`yum' command directly as the line
yum --enablerepo='*debug*' install NAME-debuginfo.ARCH
-@@ -975,10 +934,7 @@ missing_rpm_list_print (void)
+@@ -978,10 +937,7 @@ missing_rpm_list_print (void)
(int (*) (const void *, const void *)) missing_rpm_list_compar);
printf_unfiltered (_("Missing separate debuginfos, use: %s"),
@@ -90,12 +90,17 @@
for (array_iter = array; array_iter < array + missing_rpm_list_entries;
array_iter++)
{
-@@ -1191,8 +1147,12 @@ debug_print_missing (const char *binary,
+@@ -1194,13 +1150,12 @@ debug_print_missing (const char *binary,
fprintf_unfiltered (gdb_stdlog,
_("Missing separate debuginfo for %s\n"), binary);
if (debug != NULL)
- fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
-- "yum --enablerepo='*debug*' install", debug);
+-#ifdef DNF_DEBUGINFO_INSTALL
+- "dnf"
+-#else
+- "yum"
+-#endif
+- " --enablerepo='*debug*' install", debug);
+ {
+ const char *p = strrchr (debug, '/');
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s%.2s%.38s\"\n"),
++++++ gdb-6.6-buildid-locate-rpm.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:18:59.000000000 +0100
@@ -1,7 +1,7 @@
-Index: gdb-7.8.50.20141228/gdb/event-top.c
+Index: gdb-7.9.90.20150717/gdb/event-top.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/event-top.c 2015-01-01 17:12:24.881489087 +0100
-+++ gdb-7.8.50.20141228/gdb/event-top.c 2015-01-01 17:12:28.821486803 +0100
+--- gdb-7.9.90.20150717.orig/gdb/event-top.c 2015-07-17 03:59:12.000000000 +0200
++++ gdb-7.9.90.20150717/gdb/event-top.c 2015-08-01 20:07:15.822993674 +0200
@@ -37,6 +37,7 @@
#include "gdbcmd.h" /* for dont_repeat() */
#include "annotate.h"
@@ -28,24 +28,24 @@
old_chain = make_cleanup (free_current_contents, &actual_gdb_prompt);
/* Do not call the python hook on an explicit prompt change as
-Index: gdb-7.8.50.20141228/gdb/symfile.h
+Index: gdb-7.9.90.20150717/gdb/symfile.h
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/symfile.h 2015-01-01 17:12:24.881489087 +0100
-+++ gdb-7.8.50.20141228/gdb/symfile.h 2015-01-01 17:12:28.822486802 +0100
-@@ -577,6 +577,8 @@ void map_symbol_filenames (symbol_filena
+--- gdb-7.9.90.20150717.orig/gdb/symfile.h 2015-08-01 20:07:15.787993404 +0200
++++ gdb-7.9.90.20150717/gdb/symfile.h 2015-08-01 20:07:15.822993674 +0200
+@@ -587,6 +587,8 @@ void map_symbol_filenames (symbol_filena
/* build-id support. */
- extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr);
+ extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr);
extern void debug_print_missing (const char *binary, const char *debug);
+extern void debug_flush_missing (void);
+#define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file")
/* From dwarf2read.c */
-Index: gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.9.90.20150717/gdb/testsuite/lib/gdb.exp
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/gdb.exp 2015-01-01 17:12:24.883489085 +0100
-+++ gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp 2015-01-01 17:12:28.823486801 +0100
-@@ -1522,7 +1522,7 @@ proc default_gdb_start { } {
+--- gdb-7.9.90.20150717.orig/gdb/testsuite/lib/gdb.exp 2015-08-01 20:07:15.789993420 +0200
++++ gdb-7.9.90.20150717/gdb/testsuite/lib/gdb.exp 2015-08-01 20:07:15.824993689 +0200
+@@ -1573,7 +1573,7 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
}
@@ -54,10 +54,10 @@
send_gdb "set build-id-verbose 0\n"
gdb_expect 10 {
-re "$gdb_prompt $" {
-Index: gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.9.90.20150717/gdb/testsuite/lib/mi-support.exp
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/mi-support.exp 2015-01-01 17:12:24.884489085 +0100
-+++ gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp 2015-01-01 17:12:28.823486801 +0100
+--- gdb-7.9.90.20150717.orig/gdb/testsuite/lib/mi-support.exp 2015-08-01 20:07:15.789993420 +0200
++++ gdb-7.9.90.20150717/gdb/testsuite/lib/mi-support.exp 2015-08-01 20:07:15.824993689 +0200
@@ -214,7 +214,7 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0."
}
@@ -67,10 +67,10 @@
send_gdb "190-gdb-set build-id-verbose 0\n"
gdb_expect 10 {
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
-Index: gdb-7.8.50.20141228/gdb/tui/tui-interp.c
+Index: gdb-7.9.90.20150717/gdb/tui/tui-interp.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/tui/tui-interp.c 2015-01-01 17:12:28.824486801 +0100
-+++ gdb-7.8.50.20141228/gdb/tui/tui-interp.c 2015-01-01 17:12:43.240478444 +0100
+--- gdb-7.9.90.20150717.orig/gdb/tui/tui-interp.c 2015-07-17 03:59:13.000000000 +0200
++++ gdb-7.9.90.20150717/gdb/tui/tui-interp.c 2015-08-01 20:07:15.825993697 +0200
@@ -31,6 +31,7 @@
#include "tui/tui-io.h"
#include "infrun.h"
@@ -79,10 +79,10 @@
static struct ui_out *tui_ui_out (struct interp *self);
-Index: gdb-7.8.50.20141228/gdb/aclocal.m4
+Index: gdb-7.9.90.20150717/gdb/aclocal.m4
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/aclocal.m4 2015-01-01 17:12:24.885489084 +0100
-+++ gdb-7.8.50.20141228/gdb/aclocal.m4 2015-01-01 17:12:28.824486801 +0100
+--- gdb-7.9.90.20150717.orig/gdb/aclocal.m4 2015-07-17 03:59:12.000000000 +0200
++++ gdb-7.9.90.20150717/gdb/aclocal.m4 2015-08-01 20:07:15.825993697 +0200
@@ -11,6 +11,221 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@@ -305,10 +305,10 @@
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-Index: gdb-7.8.50.20141228/gdb/config.in
+Index: gdb-7.9.90.20150717/gdb/config.in
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/config.in 2015-01-01 17:12:24.885489084 +0100
-+++ gdb-7.8.50.20141228/gdb/config.in 2015-01-01 17:12:28.824486801 +0100
+--- gdb-7.9.90.20150717.orig/gdb/config.in 2015-07-17 03:59:12.000000000 +0200
++++ gdb-7.9.90.20150717/gdb/config.in 2015-08-01 20:07:15.826993704 +0200
@@ -33,6 +33,9 @@
/* Define to BFD's default target vector. */
#undef DEFAULT_BFD_VEC
@@ -319,7 +319,7 @@
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
-@@ -207,6 +210,9 @@
+@@ -258,6 +261,9 @@
/* Define if Python 2.7 is being used. */
#undef HAVE_LIBPYTHON2_7
@@ -329,11 +329,11 @@
/* Define to 1 if you have the header file. */
#undef HAVE_LIBUNWIND_IA64_H
-Index: gdb-7.8.50.20141228/gdb/configure
+Index: gdb-7.9.90.20150717/gdb/configure
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/configure 2015-01-01 17:12:24.891489081 +0100
-+++ gdb-7.8.50.20141228/gdb/configure 2015-01-01 17:12:28.828486798 +0100
-@@ -698,6 +698,11 @@ PKGVERSION
+--- gdb-7.9.90.20150717.orig/gdb/configure 2015-07-17 03:59:12.000000000 +0200
++++ gdb-7.9.90.20150717/gdb/configure 2015-08-01 20:07:15.830993735 +0200
+@@ -703,6 +703,11 @@ PKGVERSION
HAVE_NATIVE_GCORE_TARGET
TARGET_OBS
subdirs
@@ -345,7 +345,7 @@
GDB_DATADIR
DEBUGDIR
MAKEINFO_EXTRA_FLAGS
-@@ -801,6 +806,7 @@ with_gdb_datadir
+@@ -811,6 +816,7 @@ with_gdb_datadir
with_relocated_sources
with_auto_load_dir
with_auto_load_safe_path
@@ -353,7 +353,7 @@
enable_targets
enable_64_bit_bfd
enable_gdbcli
-@@ -852,6 +858,11 @@ CPPFLAGS
+@@ -867,6 +873,11 @@ CCC
CPP
MAKEINFO
MAKEINFOFLAGS
@@ -365,7 +365,7 @@
YACC
YFLAGS
XMKMF'
-@@ -1522,6 +1533,8 @@ Optional Packages:
+@@ -1538,6 +1549,8 @@ Optional Packages:
[--with-auto-load-dir]
--without-auto-load-safe-path
do not restrict auto-loaded files locations
@@ -374,7 +374,7 @@
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
--with-curses use the curses library instead of the termcap
library
-@@ -1571,6 +1584,13 @@ Some influential environment variables:
+@@ -1592,6 +1605,13 @@ Some influential environment variables:
MAKEINFO Parent configure detects if it is of sufficient version.
MAKEINFOFLAGS
Parameters for MAKEINFO.
@@ -388,7 +388,7 @@
YACC The `Yet Another C Compiler' implementation to use. Defaults to
the first program found out of: `bison -y', `byacc', `yacc'.
YFLAGS The list of arguments that will be passed by default to $YACC.
-@@ -5267,6 +5287,491 @@ _ACEOF
+@@ -5608,6 +5628,491 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; }
@@ -880,11 +880,11 @@
subdirs="$subdirs testsuite"
-Index: gdb-7.8.50.20141228/gdb/configure.ac
+Index: gdb-7.9.90.20150717/gdb/configure.ac
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/configure.ac 2015-01-01 17:12:24.893489079 +0100
-+++ gdb-7.8.50.20141228/gdb/configure.ac 2015-01-01 17:12:28.829486798 +0100
-@@ -172,6 +172,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
+--- gdb-7.9.90.20150717.orig/gdb/configure.ac 2015-07-17 03:59:12.000000000 +0200
++++ gdb-7.9.90.20150717/gdb/configure.ac 2015-08-01 20:07:15.831993743 +0200
+@@ -177,6 +177,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
[Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path])
@@ -1084,10 +1084,10 @@
AC_CONFIG_SUBDIRS(testsuite)
# Check whether to support alternative target configurations
-Index: gdb-7.8.50.20141228/gdb/corelow.c
+Index: gdb-7.9.90.20150717/gdb/corelow.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/corelow.c 2015-01-01 17:12:24.894489079 +0100
-+++ gdb-7.8.50.20141228/gdb/corelow.c 2015-01-01 17:12:28.829486798 +0100
+--- gdb-7.9.90.20150717.orig/gdb/corelow.c 2015-08-01 20:07:15.775993312 +0200
++++ gdb-7.9.90.20150717/gdb/corelow.c 2015-08-01 20:07:15.831993743 +0200
@@ -310,7 +310,7 @@ build_id_locate_exec (int from_tty)
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
}
@@ -1097,19 +1097,19 @@
do_cleanups (back_to);
-Index: gdb-7.8.50.20141228/gdb/build-id.c
+Index: gdb-7.9.90.20150717/gdb/build-id.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/build-id.c 2015-01-01 17:12:24.894489079 +0100
-+++ gdb-7.8.50.20141228/gdb/build-id.c 2015-01-01 17:12:28.830486797 +0100
-@@ -31,6 +31,7 @@
- #include "gdbcmd.h"
- #include "observer.h"
+--- gdb-7.9.90.20150717.orig/gdb/build-id.c 2015-08-01 20:07:15.791993435 +0200
++++ gdb-7.9.90.20150717/gdb/build-id.c 2015-08-01 20:08:27.735546630 +0200
+@@ -35,6 +35,7 @@
+ #include "elf/common.h"
+ #include "elf-bfd.h"
#include
+#include "elf/external.h"
#define BUILD_ID_VERBOSE_NONE 0
#define BUILD_ID_VERBOSE_FILENAMES 1
-@@ -664,8 +665,363 @@ build_id_to_filename (const struct elf_b
+@@ -665,8 +666,363 @@ build_id_to_filename (const struct bfd_b
return result;
}
@@ -1474,7 +1474,7 @@
avoidance. */
struct missing_filepair
-@@ -719,11 +1072,17 @@ missing_filepair_change (void)
+@@ -720,11 +1076,17 @@ missing_filepair_change (void)
/* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL;
}
@@ -1492,7 +1492,7 @@
missing_filepair_change ();
}
-@@ -790,14 +1149,34 @@ debug_print_missing (const char *binary,
+@@ -791,14 +1153,39 @@ debug_print_missing (const char *binary,
*slot = missing_filepair;
@@ -1529,7 +1529,12 @@
+ _("Missing separate debuginfo for %s\n"), binary);
+ if (debug != NULL)
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
-+ "yum --enablerepo='*debug*' install", debug);
++#ifdef DNF_DEBUGINFO_INSTALL
++ "dnf"
++#else
++ "yum"
++#endif
++ " --enablerepo='*debug*' install", debug);
+ }
}
++++++ gdb-6.6-buildid-locate-solib-missing-ids.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:18:59.000000000 +0100
@@ -1,20 +1,20 @@
-Index: gdb-7.5.50.20130310/gdb/solib-svr4.c
+Index: gdb-7.9.90.20150709/gdb/solib-svr4.c
===================================================================
---- gdb-7.5.50.20130310.orig/gdb/solib-svr4.c 2013-03-10 16:37:49.000000000 +0100
-+++ gdb-7.5.50.20130310/gdb/solib-svr4.c 2013-03-10 16:43:45.498585091 +0100
-@@ -1225,14 +1225,27 @@ svr4_read_so_list (CORE_ADDR lm, struct
+--- gdb-7.9.90.20150709.orig/gdb/solib-svr4.c 2015-07-09 18:18:54.526417766 +0200
++++ gdb-7.9.90.20150709/gdb/solib-svr4.c 2015-07-09 18:19:33.074746586 +0200
+@@ -1381,14 +1381,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
}
{
-- struct elf_build_id *build_id;
-+ struct elf_build_id *build_id = NULL;
+- struct bfd_build_id *build_id;
++ struct bfd_build_id *build_id = NULL;
- strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
- new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
+ strncpy (newobj->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
+ newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
/* May get overwritten below. */
- strcpy (new->so_name, new->so_original_name);
+ strcpy (newobj->so_name, newobj->so_original_name);
-- build_id = build_id_addr_get (new->lm_info->l_ld);
+- build_id = build_id_addr_get (newobj->lm_info->l_ld);
+ /* In the case the main executable was found according to its build-id
+ (from a core file) prevent loading a different build of a library
+ with accidentally the same SO_NAME.
@@ -28,16 +28,16 @@
+ to the only existing file loaded that time - the executable. */
+ if (symfile_objfile != NULL
+ && (symfile_objfile->flags & OBJF_BUILD_ID_CORE_LOADED) != 0)
-+ build_id = build_id_addr_get (new->lm_info->l_ld);
++ build_id = build_id_addr_get (newobj->lm_info->l_ld);
if (build_id != NULL)
{
char *name, *build_id_filename;
-@@ -1247,23 +1260,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
+@@ -1403,23 +1416,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
xfree (name);
}
else
- {
-- debug_print_missing (new->so_name, build_id_filename);
+- debug_print_missing (newobj->so_name, build_id_filename);
-
- /* In the case the main executable was found according to
- its build-id (from a core file) prevent loading
@@ -51,9 +51,9 @@
- if (symfile_objfile != NULL
- && (symfile_objfile->flags
- & OBJF_BUILD_ID_CORE_LOADED) != 0)
-- new->so_name[0] = 0;
+- newobj->so_name[0] = 0;
- }
-+ debug_print_missing (new->so_name, build_id_filename);
++ debug_print_missing (newobj->so_name, build_id_filename);
xfree (build_id_filename);
xfree (build_id);
++++++ gdb-6.6-buildid-locate.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -1,7 +1,7 @@
-Index: gdb-7.8.50.20141228/gdb/corelow.c
+Index: gdb-7.9.90.20150709/gdb/corelow.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/corelow.c 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/corelow.c 2015-01-03 23:12:08.691349454 +0100
+--- gdb-7.9.90.20150709.orig/gdb/corelow.c 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/corelow.c 2015-07-09 22:05:42.057222722 +0200
@@ -45,6 +45,10 @@
#include "gdb_bfd.h"
#include "completer.h"
@@ -23,7 +23,7 @@
+build_id_locate_exec (int from_tty)
+{
+ CORE_ADDR at_entry;
-+ struct elf_build_id *build_id;
++ struct bfd_build_id *build_id;
+ char *execfilename, *debug_filename;
+ char *build_id_filename;
+ struct cleanup *back_to;
@@ -67,7 +67,7 @@
/* This routine opens and sets up the core file bfd. */
static void
-@@ -405,6 +456,14 @@ core_open (const char *arg, int from_tty
+@@ -404,6 +455,14 @@ core_open (const char *arg, int from_tty
switch_to_thread (thread->ptid);
}
@@ -82,7 +82,7 @@
post_create_inferior (&core_ops, from_tty);
/* Now go through the target stack looking for threads since there
-@@ -1035,4 +1094,11 @@ _initialize_corelow (void)
+@@ -1058,4 +1117,11 @@ _initialize_corelow (void)
init_core_ops ();
add_target_with_completer (&core_ops, filename_completer);
@@ -94,11 +94,11 @@
+ NULL, NULL, NULL,
+ &setlist, &showlist);
}
-Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo
+Index: gdb-7.9.90.20150709/gdb/doc/gdb.texinfo
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/doc/gdb.texinfo 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/doc/gdb.texinfo 2015-01-03 23:12:08.701349509 +0100
-@@ -17930,6 +17930,27 @@ information files.
+--- gdb-7.9.90.20150709.orig/gdb/doc/gdb.texinfo 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/doc/gdb.texinfo 2015-07-09 22:05:42.067222806 +0200
+@@ -18304,6 +18304,27 @@ information files.
@end table
@@ -126,10 +126,10 @@
@cindex @code{.gnu_debuglink} sections
@cindex debug link sections
A debug link is a special section of the executable file named
-Index: gdb-7.8.50.20141228/gdb/solib-svr4.c
+Index: gdb-7.9.90.20150709/gdb/solib-svr4.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/solib-svr4.c 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/solib-svr4.c 2015-01-03 23:12:08.702349514 +0100
+--- gdb-7.9.90.20150709.orig/gdb/solib-svr4.c 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/solib-svr4.c 2015-07-09 22:05:42.068222815 +0200
@@ -45,6 +45,7 @@
#include "auxv.h"
#include "gdb_bfd.h"
@@ -138,22 +138,22 @@
static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
static int svr4_have_link_map_offsets (void);
-@@ -1366,9 +1367,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
+@@ -1379,9 +1380,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
continue;
}
-- strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
-- new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
-- strcpy (new->so_original_name, new->so_name);
+- strncpy (newobj->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
+- newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
+- strcpy (newobj->so_original_name, newobj->so_name);
+ {
-+ struct elf_build_id *build_id;
++ struct bfd_build_id *build_id;
+
-+ strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
-+ new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
++ strncpy (newobj->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
++ newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
+ /* May get overwritten below. */
-+ strcpy (new->so_name, new->so_original_name);
++ strcpy (newobj->so_name, newobj->so_original_name);
+
-+ build_id = build_id_addr_get (new->lm_info->l_ld);
++ build_id = build_id_addr_get (newobj->lm_info->l_ld);
+ if (build_id != NULL)
+ {
+ char *name, *build_id_filename;
@@ -163,13 +163,13 @@
+ name = build_id_to_filename (build_id, &build_id_filename);
+ if (name != NULL)
+ {
-+ strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
-+ new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
++ strncpy (newobj->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
++ newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
+ xfree (name);
+ }
+ else
+ {
-+ debug_print_missing (new->so_name, build_id_filename);
++ debug_print_missing (newobj->so_name, build_id_filename);
+
+ /* In the case the main executable was found according to
+ its build-id (from a core file) prevent loading
@@ -183,7 +183,7 @@
+ if (symfile_objfile != NULL
+ && (symfile_objfile->flags
+ & OBJF_BUILD_ID_CORE_LOADED) != 0)
-+ new->so_name[0] = 0;
++ newobj->so_name[0] = 0;
+ }
+
+ xfree (build_id_filename);
@@ -194,11 +194,11 @@
xfree (buffer);
/* If this entry has no name, or its name matches the name
-Index: gdb-7.8.50.20141228/gdb/elfread.c
+Index: gdb-7.9.90.20150709/gdb/elfread.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/elfread.c 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/elfread.c 2015-01-03 23:12:08.703349519 +0100
-@@ -1339,9 +1339,10 @@ elf_symfile_read (struct objfile *objfil
+--- gdb-7.9.90.20150709.orig/gdb/elfread.c 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/elfread.c 2015-07-09 22:05:42.068222815 +0200
+@@ -1250,9 +1250,10 @@ elf_symfile_read (struct objfile *objfil
&& objfile->separate_debug_objfile == NULL
&& objfile->separate_debug_objfile_backlink == NULL)
{
@@ -211,7 +211,7 @@
if (debugfile == NULL)
debugfile = find_separate_debug_file_by_debuglink (objfile);
-@@ -1355,6 +1356,12 @@ elf_symfile_read (struct objfile *objfil
+@@ -1266,6 +1267,12 @@ elf_symfile_read (struct objfile *objfil
symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile);
do_cleanups (cleanup);
}
@@ -224,26 +224,26 @@
}
}
-Index: gdb-7.8.50.20141228/gdb/symfile.h
+Index: gdb-7.9.90.20150709/gdb/symfile.h
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/symfile.h 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/symfile.h 2015-01-03 23:12:08.703349519 +0100
-@@ -574,6 +574,10 @@ void expand_symtabs_matching (expand_sym
+--- gdb-7.9.90.20150709.orig/gdb/symfile.h 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/symfile.h 2015-07-09 22:05:42.068222815 +0200
+@@ -584,6 +584,10 @@ void expand_symtabs_matching (expand_sym
void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
int need_fullname);
+/* build-id support. */
-+extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr);
++extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr);
+extern void debug_print_missing (const char *binary, const char *debug);
+
/* From dwarf2read.c */
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
-Index: gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.9.90.20150709/gdb/testsuite/lib/gdb.exp
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/gdb.exp 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp 2015-01-03 23:12:08.704349525 +0100
-@@ -1522,6 +1522,16 @@ proc default_gdb_start { } {
+--- gdb-7.9.90.20150709.orig/gdb/testsuite/lib/gdb.exp 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/testsuite/lib/gdb.exp 2015-07-09 22:05:42.070222832 +0200
+@@ -1573,6 +1573,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
}
@@ -260,10 +260,10 @@
return 0
}
-Index: gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.9.90.20150709/gdb/testsuite/lib/mi-support.exp
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/mi-support.exp 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp 2015-01-03 23:12:08.705349530 +0100
+--- gdb-7.9.90.20150709.orig/gdb/testsuite/lib/mi-support.exp 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/testsuite/lib/mi-support.exp 2015-07-09 22:05:42.070222832 +0200
@@ -214,6 +214,16 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0."
}
@@ -281,10 +281,10 @@
# If allowing the inferior to have its own PTY then assign the inferior
# its own terminal device here.
if { $separate_inferior_pty } {
-Index: gdb-7.8.50.20141228/gdb/objfiles.h
+Index: gdb-7.9.90.20150709/gdb/objfiles.h
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/objfiles.h 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/objfiles.h 2015-01-03 23:12:08.705349530 +0100
+--- gdb-7.9.90.20150709.orig/gdb/objfiles.h 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/objfiles.h 2015-07-09 22:05:42.071222840 +0200
@@ -459,6 +459,10 @@ struct objfile
#define OBJF_NOT_FILENAME (1 << 6)
@@ -296,10 +296,10 @@
/* Declarations for functions defined in objfiles.c */
extern struct objfile *allocate_objfile (bfd *, const char *name, int);
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp
+Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/corefile.exp
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/testsuite/gdb.base/corefile.exp 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp 2015-01-03 23:12:08.705349530 +0100
+--- gdb-7.9.90.20150709.orig/gdb/testsuite/gdb.base/corefile.exp 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/testsuite/gdb.base/corefile.exp 2015-07-09 22:05:42.071222840 +0200
@@ -293,3 +293,33 @@ gdb_test_multiple "core-file $corefile"
pass $test
}
@@ -334,18 +334,22 @@
+ gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*"
+ pass $wholetest
+}
-Index: gdb-7.8.50.20141228/gdb/build-id.c
+Index: gdb-7.9.90.20150709/gdb/build-id.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/build-id.c 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/build-id.c 2015-01-03 23:12:40.792523085 +0100
-@@ -26,11 +26,64 @@
- #include "symfile.h"
+--- gdb-7.9.90.20150709.orig/gdb/build-id.c 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/build-id.c 2015-07-09 22:19:35.022957009 +0200
+@@ -26,11 +26,67 @@
#include "objfiles.h"
#include "filenames.h"
+ #include "gdbcore.h"
+#include "libbfd.h"
+#include "gdbcore.h"
+#include "gdbcmd.h"
+#include "observer.h"
++#include "elf/external.h"
++#include "elf/internal.h"
++#include "elf/common.h"
++#include "elf-bfd.h"
+#include
+
+#define BUILD_ID_VERBOSE_NONE 0
@@ -359,12 +363,10 @@
+ fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"),
+ value);
+}
-
--/* See build-id.h. */
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
+
-+static struct elf_build_id *
++static struct bfd_build_id *
+build_id_buf_get (bfd *templ, gdb_byte *buf, bfd_size_type size)
+{
+ bfd_byte *p;
@@ -384,41 +386,41 @@
+ {
+ size_t size = descsz;
+ gdb_byte *data = (void *) descdata;
-+ struct elf_build_id *retval;
++ struct bfd_build_id *retval;
+
+ retval = xmalloc (sizeof *retval - 1 + size);
+ retval->size = size;
+ memcpy (retval->data, data, size);
-
++
+ return retval;
+ }
+ p = descdata + BFD_ALIGN (descsz, 4);
+ }
+ return NULL;
+}
-+
-+/* See build-id.h. */
-+
- const struct elf_build_id *
+
+ /* See build-id.h. */
+
+ const struct bfd_build_id *
-build_id_bfd_get (bfd *abfd)
+build_id_bfd_shdr_get (bfd *abfd)
{
- if (!bfd_check_format (abfd, bfd_object)
- || bfd_get_flavour (abfd) != bfd_target_elf_flavour
-@@ -44,6 +97,348 @@ build_id_bfd_get (bfd *abfd)
- return elf_tdata (abfd)->build_id;
+ if (!bfd_check_format (abfd, bfd_object))
+ return NULL;
+@@ -42,6 +98,348 @@ build_id_bfd_get (bfd *abfd)
+ return NULL;
}
+/* Core files may have missing (corrupt) SHDR but PDHR is correct there.
+ bfd_elf_bfd_from_remote_memory () has too much overhead by
+ allocating/reading all the available ELF PT_LOADs. */
+
-+static struct elf_build_id *
++static struct bfd_build_id *
+build_id_phdr_get (bfd *templ, bfd_vma loadbase, unsigned e_phnum,
+ Elf_Internal_Phdr *i_phdr)
+{
+ int i;
-+ struct elf_build_id *retval = NULL;
++ struct bfd_build_id *retval = NULL;
+
+ for (i = 0; i < e_phnum; i++)
+ if (i_phdr[i].p_type == PT_NOTE && i_phdr[i].p_filesz > 0)
@@ -705,11 +707,11 @@
+ }
+}
+
-+struct elf_build_id *
++struct bfd_build_id *
+build_id_addr_get (CORE_ADDR addr)
+{
+ struct build_id_addr_sect *candidate;
-+ struct elf_build_id *retval = NULL;
++ struct bfd_build_id *retval = NULL;
+ Elf_Internal_Phdr *i_phdr = NULL;
+ bfd_vma loadbase = 0;
+ unsigned e_phnum = 0;
@@ -754,8 +756,8 @@
/* See build-id.h. */
int
-@@ -52,7 +447,7 @@ build_id_verify (bfd *abfd, size_t check
- const struct elf_build_id *found;
+@@ -50,7 +448,7 @@ build_id_verify (bfd *abfd, size_t check
+ const struct bfd_build_id *found;
int retval = 0;
- found = build_id_bfd_get (abfd);
@@ -763,7 +765,7 @@
if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"),
-@@ -67,20 +462,56 @@ build_id_verify (bfd *abfd, size_t check
+@@ -65,20 +463,56 @@ build_id_verify (bfd *abfd, size_t check
return retval;
}
@@ -824,12 +826,13 @@
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
cause "/.build-id/..." lookups. */
-@@ -93,8 +524,11 @@ build_id_to_debug_bfd (size_t build_id_l
+@@ -91,9 +525,12 @@ build_id_to_debug_bfd (size_t build_id_l
size_t debugdir_len = strlen (debugdir);
const gdb_byte *data = build_id;
size_t size = build_id_len;
- char *s;
char *filename = NULL;
+ struct cleanup *inner;
+ unsigned seqno;
+ struct stat statbuf_trash;
+ /* Initialize it just to avoid a GCC false warning. */
@@ -837,7 +840,7 @@
memcpy (link, debugdir, debugdir_len);
s = &link[debugdir_len];
-@@ -108,44 +542,282 @@ build_id_to_debug_bfd (size_t build_id_l
+@@ -107,47 +544,281 @@ build_id_to_debug_bfd (size_t build_id_l
*s++ = '/';
while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++);
@@ -884,20 +887,22 @@
+ continue;
+
+ /* We expect to be silent on the non-existing files. */
-+ abfd = gdb_bfd_open_maybe_remote (filename);
-+ if (abfd == NULL)
-+ {
-+ xfree (filename);
-+ continue;
-+ }
++ inner = make_cleanup (xfree, filename);
++ abfd = gdb_bfd_open (filename, gnutarget, -1);
++ do_cleanups (inner);
- if (filename == NULL)
- continue;
++ if (abfd == NULL)
++ continue;
+
+- /* We expect to be silent on the non-existing files. */
+- inner = make_cleanup (xfree, filename);
+- abfd = gdb_bfd_open (filename, gnutarget, -1);
+- do_cleanups (inner);
+ if (build_id_verify (abfd, build_id_len, build_id))
+ break;
-- /* We expect to be silent on the non-existing files. */
-- abfd = gdb_bfd_open_maybe_remote (filename);
- if (abfd == NULL)
- continue;
+ gdb_bfd_unref (abfd);
@@ -905,7 +910,6 @@
- if (build_id_verify (abfd, build_id_len, build_id))
- break;
-+ xfree (filename);
+ filename = NULL;
+ }
@@ -963,7 +967,7 @@
}
+char *
-+build_id_to_filename (const struct elf_build_id *build_id, char **link_return)
++build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
+{
+ bfd *abfd;
+ char *result;
@@ -1120,7 +1124,7 @@
+find_separate_debug_file_by_buildid (struct objfile *objfile,
+ char **build_id_filename_return)
{
- const struct elf_build_id *build_id;
+ const struct bfd_build_id *build_id;
- build_id = build_id_bfd_get (objfile->obfd);
+ if (build_id_filename_return)
@@ -1137,7 +1141,7 @@
/* Prevent looping on a stripped .debug file. */
if (abfd != NULL
&& filename_cmp (bfd_get_filename (abfd),
-@@ -165,3 +837,21 @@ find_separate_debug_file_by_buildid (str
+@@ -167,3 +838,21 @@ find_separate_debug_file_by_buildid (str
}
return NULL;
}
@@ -1159,10 +1163,10 @@
+
+ observer_attach_executable_changed (debug_print_executable_changed);
+}
-Index: gdb-7.8.50.20141228/gdb/build-id.h
+Index: gdb-7.9.90.20150709/gdb/build-id.h
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/build-id.h 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/build-id.h 2015-01-03 23:12:08.706349536 +0100
+--- gdb-7.9.90.20150709.orig/gdb/build-id.h 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/build-id.h 2015-07-09 22:05:42.072222849 +0200
@@ -20,9 +20,10 @@
#ifndef BUILD_ID_H
#define BUILD_ID_H
@@ -1171,8 +1175,8 @@
+/* Separate debuginfo files have corrupted PHDR but SHDR is correct there.
+ Locate NT_GNU_BUILD_ID from ABFD and return its content. */
--extern const struct elf_build_id *build_id_bfd_get (bfd *abfd);
-+extern const struct elf_build_id *build_id_bfd_shdr_get (bfd *abfd);
+-extern const struct bfd_build_id *build_id_bfd_get (bfd *abfd);
++extern const struct bfd_build_id *build_id_bfd_shdr_get (bfd *abfd);
/* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value.
Otherwise, issue a warning and return false. */
@@ -1184,7 +1188,7 @@
+ const bfd_byte *build_id, char **link_return,
+ int add_debug_suffix);
+
-+extern char *build_id_to_filename (const struct elf_build_id *build_id,
++extern char *build_id_to_filename (const struct bfd_build_id *build_id,
+ char **link_return);
/* Find the separate debug file for OBJFILE, by using the build-id
@@ -1197,11 +1201,11 @@
+ char **build_id_filename_return);
#endif /* BUILD_ID_H */
-Index: gdb-7.8.50.20141228/gdb/dwarf2read.c
+Index: gdb-7.9.90.20150709/gdb/dwarf2read.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/dwarf2read.c 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/dwarf2read.c 2015-01-03 23:12:08.711349563 +0100
-@@ -2443,7 +2443,7 @@ dwarf2_get_dwz_file (void)
+--- gdb-7.9.90.20150709.orig/gdb/dwarf2read.c 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/dwarf2read.c 2015-07-09 22:05:42.077222891 +0200
+@@ -2507,7 +2507,7 @@ dwarf2_get_dwz_file (void)
}
if (dwz_bfd == NULL)
@@ -1210,20 +1214,20 @@
if (dwz_bfd == NULL)
error (_("could not find '.gnu_debugaltlink' file for %s"),
-Index: gdb-7.8.50.20141228/gdb/python/py-objfile.c
+Index: gdb-7.9.90.20150709/gdb/python/py-objfile.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/python/py-objfile.c 2015-01-03 23:11:54.018270090 +0100
-+++ gdb-7.8.50.20141228/gdb/python/py-objfile.c 2015-01-03 23:12:08.712349568 +0100
-@@ -118,7 +118,7 @@ objfpy_get_build_id (PyObject *self, voi
+--- gdb-7.9.90.20150709.orig/gdb/python/py-objfile.c 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/python/py-objfile.c 2015-07-09 22:05:42.077222891 +0200
+@@ -139,7 +139,7 @@ objfpy_get_build_id (PyObject *self, voi
- TRY_CATCH (except, RETURN_MASK_ALL)
+ TRY
{
- build_id = build_id_bfd_get (objfile->obfd);
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
}
- GDB_PY_HANDLE_EXCEPTION (except);
-
-@@ -467,7 +467,7 @@ objfpy_lookup_objfile_by_build_id (const
+ CATCH (except, RETURN_MASK_ALL)
+ {
+@@ -548,7 +548,7 @@ objfpy_lookup_objfile_by_build_id (const
/* Don't return separate debug files. */
if (objfile->separate_debug_objfile_backlink != NULL)
continue;
@@ -1232,3 +1236,16 @@
if (obfd_build_id == NULL)
continue;
if (objfpy_build_id_matches (obfd_build_id, build_id))
+Index: gdb-7.9.90.20150709/gdb/coffread.c
+===================================================================
+--- gdb-7.9.90.20150709.orig/gdb/coffread.c 2015-07-09 22:05:20.988044312 +0200
++++ gdb-7.9.90.20150709/gdb/coffread.c 2015-07-09 22:05:42.078222899 +0200
+@@ -739,7 +739,7 @@ coff_symfile_read (struct objfile *objfi
+ {
+ char *debugfile;
+
+- debugfile = find_separate_debug_file_by_buildid (objfile);
++ debugfile = find_separate_debug_file_by_buildid (objfile, NULL);
+
+ if (debugfile == NULL)
+ debugfile = find_separate_debug_file_by_debuglink (objfile);
++++++ gdb-6.6-bz235197-fork-detach-info.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -3,10 +3,10 @@
Port to GDB-6.8pre.
Remove the `[' character from the GDB-6.8 default message.
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.c
+Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.c 2015-01-06 19:31:40.703988534 +0100
++++ gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.c 2015-05-31 18:23:49.008450716 +0200
@@ -0,0 +1,57 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@@ -65,10 +65,10 @@
+ }
+ return 0;
+}
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.exp
+Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.exp 2015-01-06 19:31:40.704988538 +0100
++++ gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.exp 2015-05-31 18:23:49.008450716 +0200
@@ -0,0 +1,36 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
@@ -106,16 +106,16 @@
+gdb_test "" \
+ "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \
+ "Info message caught"
-Index: gdb-7.8.50.20141228/gdb/infrun.c
+Index: gdb-7.9.50.20150531/gdb/infrun.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/infrun.c 2015-01-06 19:31:40.262986644 +0100
-+++ gdb-7.8.50.20141228/gdb/infrun.c 2015-01-06 19:43:54.865219096 +0100
-@@ -456,7 +456,7 @@ holding the child stopped. Try \"set de
+--- gdb-7.9.50.20150531.orig/gdb/infrun.c 2015-05-31 18:23:41.703405617 +0200
++++ gdb-7.9.50.20150531/gdb/infrun.c 2015-05-31 18:23:49.011450735 +0200
+@@ -443,7 +443,7 @@ holding the child stopped. Try \"set de
remove_breakpoints_pid (ptid_get_pid (inferior_ptid));
}
- if (info_verbose || debug_infrun)
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_infrun)
{
- target_terminal_ours_for_output ();
- fprintf_filtered (gdb_stdlog,
+ /* Ensure that we have a process ptid. */
+ ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid));
++++++ gdb-6.8-attach-signalled-detach-stopped.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -1,8 +1,8 @@
-Index: gdb-7.8.90.20150125/gdb/linux-nat.c
+Index: gdb-7.9.50.20150531/gdb/linux-nat.c
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/linux-nat.c 2015-01-25 08:42:49.381408899 +0100
-+++ gdb-7.8.90.20150125/gdb/linux-nat.c 2015-01-25 08:43:16.378525322 +0100
-@@ -174,6 +174,9 @@ blocked. */
+--- gdb-7.9.50.20150531.orig/gdb/linux-nat.c 2015-05-31 18:23:56.147494790 +0200
++++ gdb-7.9.50.20150531/gdb/linux-nat.c 2015-05-31 18:24:01.935530759 +0200
+@@ -168,6 +168,9 @@ blocked. */
static struct target_ops *linux_ops;
static struct target_ops linux_ops_saved;
@@ -12,7 +12,7 @@
/* The method to call, if any, when a new thread is attached. */
static void (*linux_nat_new_thread) (struct lwp_info *);
-@@ -924,6 +927,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
+@@ -981,6 +984,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LNPAW: Attaching to a stopped process\n");
@@ -20,7 +20,7 @@
/* The process is definitely stopped. It is in a job control
stop, unless the kernel predates the TASK_STOPPED /
-@@ -1424,6 +1428,9 @@ get_pending_status (struct lwp_info *lp,
+@@ -1468,6 +1472,9 @@ get_pending_status (struct lwp_info *lp,
gdb_signal_to_string (signo));
}
@@ -30,7 +30,7 @@
return 0;
}
-@@ -1537,6 +1544,8 @@ linux_nat_detach (struct target_ops *ops
+@@ -1581,6 +1588,8 @@ linux_nat_detach (struct target_ops *ops
}
else
linux_ops->to_detach (ops, args, from_tty);
@@ -39,7 +39,7 @@
}
/* Resume execution of the inferior process. If STEP is nonzero,
-@@ -1741,6 +1750,14 @@ linux_nat_resume (struct target_ops *ops
+@@ -1839,6 +1848,14 @@ linux_nat_resume (struct target_ops *ops
return;
}
@@ -54,7 +54,7 @@
if (resume_many)
iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
-@@ -3723,6 +3740,8 @@ linux_nat_mourn_inferior (struct target_
+@@ -3935,6 +3952,8 @@ linux_nat_mourn_inferior (struct target_
/* Let the arch-specific native code know this process is gone. */
linux_nat_forget_process (pid);
@@ -63,10 +63,10 @@
}
/* Convert a native/host siginfo object, into/from the siginfo in the
-Index: gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/attach-stopped.exp
+Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.threads/attach-stopped.exp
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-01-25 08:42:49.382408903 +0100
-+++ gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-01-25 08:43:16.379525327 +0100
+--- gdb-7.9.50.20150531.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-05-31 18:23:56.148494796 +0200
++++ gdb-7.9.50.20150531/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-05-31 18:24:01.935530759 +0200
@@ -61,7 +61,65 @@ proc corefunc { threadtype } {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
@@ -134,12 +134,12 @@
set test "$threadtype: attach2 to stopped, after setting file"
gdb_test_multiple "attach $testpid" "$test" {
-Index: gdb-7.8.90.20150125/gdb/infrun.c
+Index: gdb-7.9.50.20150531/gdb/infrun.c
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/infrun.c 2015-01-25 08:42:49.385408916 +0100
-+++ gdb-7.8.90.20150125/gdb/infrun.c 2015-01-25 08:43:16.381525335 +0100
-@@ -600,6 +600,11 @@ holding the child stopped. Try \"set de
- child_pid);
+--- gdb-7.9.50.20150531.orig/gdb/infrun.c 2015-05-31 18:23:56.150494809 +0200
++++ gdb-7.9.50.20150531/gdb/infrun.c 2015-05-31 18:24:01.938530778 +0200
+@@ -591,6 +591,11 @@ holding the child stopped. Try \"set de
+ target_pid_to_str (process_ptid));
}
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
++++++ gdb-6.8-quit-never-aborts.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -5,11 +5,11 @@
should have been detached with SIGSTOP (as they are accidentally left running
on the debugger termination).
-Index: gdb-7.7.90.20140613/gdb/defs.h
+Index: gdb-7.9.50.20150520/gdb/defs.h
===================================================================
---- gdb-7.7.90.20140613.orig/gdb/defs.h 2014-06-13 23:10:18.876623018 +0200
-+++ gdb-7.7.90.20140613/gdb/defs.h 2014-06-13 23:10:52.450660505 +0200
-@@ -174,6 +174,7 @@ extern void set_quit_flag (void);
+--- gdb-7.9.50.20150520.orig/gdb/defs.h 2015-05-31 18:06:24.579002757 +0200
++++ gdb-7.9.50.20150520/gdb/defs.h 2015-05-31 18:06:29.253031613 +0200
+@@ -145,6 +145,7 @@ extern void set_quit_flag (void);
/* Flag that function quit should call quit_force. */
extern volatile int sync_quit_force_run;
@@ -17,13 +17,13 @@
extern int immediate_quit;
extern void quit (void);
-Index: gdb-7.7.90.20140613/gdb/top.c
+Index: gdb-7.9.50.20150520/gdb/top.c
===================================================================
---- gdb-7.7.90.20140613.orig/gdb/top.c 2014-06-13 23:10:15.910619715 +0200
-+++ gdb-7.7.90.20140613/gdb/top.c 2014-06-13 23:10:18.877623020 +0200
-@@ -1378,7 +1378,9 @@ quit_force (char *args, int from_tty)
- if (ex.reason < 0) \
- exception_print (gdb_stderr, ex)
+--- gdb-7.9.50.20150520.orig/gdb/top.c 2015-05-31 18:06:24.580002763 +0200
++++ gdb-7.9.50.20150520/gdb/top.c 2015-05-31 18:06:29.254031619 +0200
+@@ -1463,7 +1463,9 @@ quit_force (char *args, int from_tty)
+ qt.args = args;
+ qt.from_tty = from_tty;
- /* We want to handle any quit errors and exit regardless. */
+ /* We want to handle any quit errors and exit regardless but we should never
@@ -31,12 +31,12 @@
+ quit_flag_cleanup = 1;
/* Get out of tfind mode, and kill or detach all inferiors. */
- DO_TRY
-Index: gdb-7.7.90.20140613/gdb/utils.c
+ TRY
+Index: gdb-7.9.50.20150520/gdb/utils.c
===================================================================
---- gdb-7.7.90.20140613.orig/gdb/utils.c 2014-06-13 23:10:18.878623021 +0200
-+++ gdb-7.7.90.20140613/gdb/utils.c 2014-06-13 23:10:38.307644652 +0200
-@@ -125,6 +125,11 @@ int job_control;
+--- gdb-7.9.50.20150520.orig/gdb/utils.c 2015-05-31 18:06:24.582002776 +0200
++++ gdb-7.9.50.20150520/gdb/utils.c 2015-05-31 18:06:29.255031625 +0200
+@@ -122,6 +122,11 @@ int job_control;
int immediate_quit;
@@ -48,11 +48,11 @@
/* Nonzero means that strings with character values >0x7F should be printed
as octal escapes. Zero means just print the value (e.g. it's an
international character, and the terminal or window can cope.) */
-Index: gdb-7.7.90.20140613/gdb/extension.c
+Index: gdb-7.9.50.20150520/gdb/extension.c
===================================================================
---- gdb-7.7.90.20140613.orig/gdb/extension.c 2014-06-13 03:59:36.000000000 +0200
-+++ gdb-7.7.90.20140613/gdb/extension.c 2014-06-13 23:11:32.434704853 +0200
-@@ -817,6 +817,9 @@ check_quit_flag (void)
+--- gdb-7.9.50.20150520.orig/gdb/extension.c 2015-05-31 18:06:24.582002776 +0200
++++ gdb-7.9.50.20150520/gdb/extension.c 2015-05-31 18:06:29.256031632 +0200
+@@ -833,6 +833,9 @@ check_quit_flag (void)
int i, result = 0;
const struct extension_language_defn *extlang;
++++++ gdb-7.9.1.tar.bz2 -> gdb-7.10.1.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/gdb/gdb-7.9.1.tar.bz2 /work/SRC/openSUSE:Factory/.gdb.new/gdb-7.10.1.tar.bz2 differ: char 11, line 1
++++++ gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -1,11 +1,11 @@
-Index: gdb-7.6.90.20140127/gdb/gdb_bfd.c
+Index: gdb-7.9.90.20150709/gdb/gdb_bfd.c
===================================================================
---- gdb-7.6.90.20140127.orig/gdb/gdb_bfd.c 2014-02-06 17:39:46.370096290 +0100
-+++ gdb-7.6.90.20140127/gdb/gdb_bfd.c 2014-02-06 17:40:14.996127247 +0100
-@@ -29,12 +29,14 @@
- #ifdef HAVE_ZLIB_H
- #include
- #endif
+--- gdb-7.9.90.20150709.orig/gdb/gdb_bfd.c 2015-07-09 18:23:59.344017882 +0200
++++ gdb-7.9.90.20150709/gdb/gdb_bfd.c 2015-07-09 18:24:06.986083071 +0200
+@@ -24,12 +24,14 @@
+ #include "hashtab.h"
+ #include "filestuff.h"
+ #include "vec.h"
+#ifndef __sparc__
#ifdef HAVE_MMAP
#include
@@ -14,10 +14,10 @@
#endif
#endif
+#endif
-
- typedef bfd *bfdp;
- DEF_VEC_P (bfdp);
-@@ -210,6 +212,7 @@ free_one_bfd_section (bfd *abfd, asectio
+ #include "target.h"
+ #include "gdb/fileio.h"
+ #include "inferior.h"
+@@ -397,6 +399,7 @@ free_one_bfd_section (bfd *abfd, asectio
if (sect != NULL && sect->data != NULL)
{
@@ -25,7 +25,7 @@
#ifdef HAVE_MMAP
if (sect->map_addr != NULL)
{
-@@ -220,6 +223,7 @@ free_one_bfd_section (bfd *abfd, asectio
+@@ -407,6 +410,7 @@ free_one_bfd_section (bfd *abfd, asectio
}
else
#endif
@@ -33,7 +33,7 @@
xfree (sect->data);
}
}
-@@ -371,6 +375,7 @@ gdb_bfd_map_section (asection *sectp, bf
+@@ -558,6 +562,7 @@ gdb_bfd_map_section (asection *sectp, bf
if (descriptor->data != NULL)
goto done;
@@ -41,7 +41,7 @@
#ifdef HAVE_MMAP
if (!bfd_is_section_compressed (abfd, sectp))
{
-@@ -405,6 +410,7 @@ gdb_bfd_map_section (asection *sectp, bf
+@@ -592,6 +597,7 @@ gdb_bfd_map_section (asection *sectp, bf
}
}
#endif /* HAVE_MMAP */
++++++ gdb-archer-pie-addons.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -1,8 +1,8 @@
-Index: gdb-7.7.50.20140609/gdb/gdbtypes.h
+Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/gdbtypes.h 2014-06-13 20:23:55.210626427 +0200
-+++ gdb-7.7.50.20140609/gdb/gdbtypes.h 2014-06-13 20:24:26.156658622 +0200
-@@ -440,6 +440,7 @@ enum field_loc_kind
+--- gdb-7.9.50.20150520.orig/gdb/gdbtypes.h 2015-05-31 16:55:29.723475485 +0200
++++ gdb-7.9.50.20150520/gdb/gdbtypes.h 2015-05-31 16:55:49.716601669 +0200
+@@ -462,6 +462,7 @@ enum field_loc_kind
{
FIELD_LOC_KIND_BITPOS, /**< bitpos */
FIELD_LOC_KIND_ENUMVAL, /**< enumval */
@@ -10,15 +10,15 @@
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
FIELD_LOC_KIND_PHYSNAME, /**< physname */
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */
-@@ -617,6 +618,7 @@ struct main_type
- field. Otherwise, physname is the mangled label of the
- static field. */
+@@ -513,6 +514,7 @@ union field_location
+ field. Otherwise, physname is the mangled label of the
+ static field. */
-+ /* This address is unrelocated by the objfile's ANOFFSET. */
- CORE_ADDR physaddr;
- const char *physname;
++ /* This address is unrelocated by the objfile's ANOFFSET. */
+ CORE_ADDR physaddr;
+ const char *physname;
-@@ -1262,6 +1264,7 @@ extern void allocate_gnat_aux_type (stru
+@@ -1386,6 +1388,7 @@ extern void set_type_vptr_basetype (stru
#define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
@@ -26,7 +26,7 @@
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
#define SET_FIELD_BITPOS(thisfld, bitpos) \
-@@ -1273,6 +1276,7 @@ extern void allocate_gnat_aux_type (stru
+@@ -1397,6 +1400,7 @@ extern void set_type_vptr_basetype (stru
#define SET_FIELD_PHYSNAME(thisfld, name) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
FIELD_STATIC_PHYSNAME (thisfld) = (name))
@@ -34,7 +34,7 @@
#define SET_FIELD_PHYSADDR(thisfld, addr) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
-@@ -1289,6 +1293,7 @@ extern void allocate_gnat_aux_type (stru
+@@ -1413,6 +1417,7 @@ extern void set_type_vptr_basetype (stru
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
@@ -42,10 +42,10 @@
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
-Index: gdb-7.7.50.20140609/gdb/jv-lang.c
+Index: gdb-7.9.50.20150520/gdb/jv-lang.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/jv-lang.c 2014-06-13 20:23:55.211626428 +0200
-+++ gdb-7.7.50.20140609/gdb/jv-lang.c 2014-06-13 20:23:56.278627534 +0200
+--- gdb-7.9.50.20150520.orig/gdb/jv-lang.c 2015-05-31 16:55:29.724475491 +0200
++++ gdb-7.9.50.20150520/gdb/jv-lang.c 2015-05-31 16:55:30.820482408 +0200
@@ -427,7 +427,8 @@ java_link_class_type (struct gdbarch *gd
fields = NULL;
@@ -66,11 +66,11 @@
else
SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset);
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
-Index: gdb-7.7.50.20140609/gdb/value.c
+Index: gdb-7.9.50.20150520/gdb/value.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/value.c 2014-06-13 20:23:55.212626429 +0200
-+++ gdb-7.7.50.20140609/gdb/value.c 2014-06-13 20:23:56.279627535 +0200
-@@ -2783,7 +2783,8 @@ value_static_field (struct type *type, i
+--- gdb-7.9.50.20150520.orig/gdb/value.c 2015-05-31 16:55:29.725475497 +0200
++++ gdb-7.9.50.20150520/gdb/value.c 2015-05-31 16:55:30.821482415 +0200
+@@ -2951,7 +2951,8 @@ value_static_field (struct type *type, i
{
case FIELD_LOC_KIND_PHYSADDR:
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
++++++ gdb-archer.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -2,7 +2,7 @@
http://sourceware.org/gdb/wiki/ArcherBranchManagement
GIT snapshot:
-commit d1a09bf2f8e7e3f752a1bbeba135bc080bf0c865
+commit f0ee78c5ccefe388a64273353ecd5c99dae62558
tromey/python
@@ -16,10 +16,10 @@
+This branch originally held the Python code for gdb. It still exists
+because a small amount of code here has not yet been merged upstream.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
-index be69b6f..a4483e4 100644
+index 95104ef..a9b198a 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
-@@ -1515,6 +1515,12 @@ stamp-h: $(srcdir)/config.in config.status
+@@ -1534,6 +1534,12 @@ stamp-h: $(srcdir)/config.in config.status
CONFIG_LINKS= \
$(SHELL) config.status
@@ -33,11 +33,11 @@
$(SHELL) config.status --recheck
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
-index 00c70bb..f93ffdd 100644
+index 30cfd17..e977b30 100644
--- a/gdb/data-directory/Makefile.in
+++ b/gdb/data-directory/Makefile.in
-@@ -64,7 +64,10 @@ PYTHON_FILE_LIST = \
- gdb/printing.py \
+@@ -65,7 +65,10 @@ PYTHON_FILE_LIST = \
+ gdb/unwinder.py \
gdb/prompt.py \
gdb/xmethod.py \
+ gdb/types.py \
@@ -46,8 +46,8 @@
+ gdb/command/pahole.py \
gdb/command/xmethods.py \
gdb/command/frame_filters.py \
- gdb/command/type_printers.py \
-@@ -74,6 +77,8 @@ PYTHON_FILE_LIST = \
+ gdb/command/unwinders.py \
+@@ -76,6 +79,8 @@ PYTHON_FILE_LIST = \
gdb/function/__init__.py \
gdb/function/caller_is.py \
gdb/function/strfns.py \
@@ -57,7 +57,7 @@
gdb/printer/bound_registers.py
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
-index e086c33..5dfeb1d 100644
+index 1665372..c4caffc 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -1225,6 +1225,16 @@ for remote debugging.
@@ -78,7 +78,7 @@
@item -tui
@cindex @code{--tui}
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
-index 234ce5c..e940125 100644
+index 57ec22e..13beb05 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -88,8 +88,6 @@ containing @code{end}. For example:
@@ -111,7 +111,7 @@
set variable $gdb_init_done = 1
diff --git a/gdb/main.c b/gdb/main.c
-index accd927..ed211f6 100644
+index aecd60a..d0f7834 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -33,6 +33,7 @@
@@ -122,7 +122,7 @@
#include "source.h"
#include "cli/cli-cmds.h"
#include "objfiles.h"
-@@ -444,6 +445,8 @@ captured_main (void *data)
+@@ -453,6 +454,8 @@ captured_main (void *data)
char *cdarg = NULL;
char *ttyarg = NULL;
@@ -131,7 +131,7 @@
/* These are static so that we can take their address in an
initializer. */
static int print_help;
-@@ -649,10 +652,14 @@ captured_main (void *data)
+@@ -663,10 +666,14 @@ captured_main (void *data)
{"args", no_argument, &set_args, 1},
{"l", required_argument, 0, 'l'},
{"return-child-result", no_argument, &return_child_result, 1},
@@ -147,7 +147,7 @@
{
int option_index;
-@@ -670,6 +677,9 @@ captured_main (void *data)
+@@ -684,6 +691,9 @@ captured_main (void *data)
case 0:
/* Long option that just sets a flag. */
break;
@@ -157,7 +157,7 @@
case OPT_SE:
symarg = optarg;
execarg = optarg;
-@@ -851,7 +861,31 @@ captured_main (void *data)
+@@ -864,7 +874,31 @@ captured_main (void *data)
/* Now that gdb_init has created the initial inferior, we're in
position to set args for that inferior. */
@@ -190,7 +190,7 @@
{
/* The remaining options are the command-line options for the
inferior. The first one is the sym/exec file, and the rest
-@@ -1129,7 +1163,8 @@ captured_main (void *data)
+@@ -1137,7 +1171,8 @@ captured_main (void *data)
/* Read in the old history after all the command files have been
read. */
@@ -200,7 +200,7 @@
if (batch_flag)
{
-@@ -1140,13 +1175,25 @@ captured_main (void *data)
+@@ -1148,13 +1183,25 @@ captured_main (void *data)
/* Show time and/or space usage. */
do_cleanups (pre_stat_chain);
@@ -232,7 +232,7 @@
}
/* No exit -- exit is through quit_command. */
}
-@@ -1180,6 +1227,12 @@ print_gdb_help (struct ui_file *stream)
+@@ -1188,6 +1235,12 @@ print_gdb_help (struct ui_file *stream)
fputs_unfiltered (_("\
This is the GNU debugger. Usage:\n\n\
gdb [options] [executable-file [core-file or process-id]]\n\
@@ -245,10 +245,10 @@
gdb [options] --args executable-file [inferior-arguments ...]\n\n\
"), stream);
fputs_unfiltered (_("\
-@@ -1225,6 +1278,13 @@ Output and user interface control:\n\n\
+@@ -1232,6 +1285,13 @@ Output and user interface control:\n\n\
+ #endif
fputs_unfiltered (_("\
--dbx DBX compatibility mode.\n\
- --xdb XDB compatibility mode.\n\
+"), stream);
+#if HAVE_PYTHON
+ fputs_unfiltered (_("\
@@ -304,7 +304,7 @@
+IgnoreErrorsCommand ()
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
new file mode 100644
-index 0000000..dee04f5
+index 0000000..e08eaf5
--- /dev/null
+++ b/gdb/python/lib/gdb/command/pahole.py
@@ -0,0 +1,81 @@
@@ -365,19 +365,19 @@
+ fieldsize = 8 * ftype.sizeof
+
+ # TARGET_CHAR_BIT
-+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)))
++ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), end = "")
+ bitpos = bitpos + fieldsize
+
+ if ftype.code == gdb.TYPE_CODE_STRUCT:
+ self.pahole (ftype, level + 1, field.name)
+ else:
-+ print (' ' * (2 + 2 * level))
++ print (' ' * (2 + 2 * level), end = "")
+ print ('%s %s' % (str (ftype), field.name))
+
+ if level == 0:
+ self.maybe_print_hole(bitpos, 8 * type.sizeof)
+
-+ print (' ' * (14 + 2 * level))
++ print (' ' * (14 + 2 * level), end = "")
+ print ('} %s' % name)
+
+ def invoke (self, arg, from_tty):
@@ -385,7 +385,7 @@
+ type = type.strip_typedefs ()
+ if type.code != gdb.TYPE_CODE_STRUCT:
+ raise (TypeError, '%s is not a struct type' % arg)
-+ print (' ' * 14)
++ print (' ' * 14, end = "")
+ self.pahole (type, 0, '')
+
+Pahole()
@@ -443,7 +443,7 @@
+
+InScope ()
diff --git a/gdb/python/python.c b/gdb/python/python.c
-index b1d8283..54a2d9b 100644
+index 4f88b0e..870a1ba 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -93,6 +93,8 @@ const struct extension_language_defn extension_language_python =
@@ -455,7 +455,7 @@
#include "target.h"
#include "gdbthread.h"
#include "interps.h"
-@@ -1220,6 +1222,83 @@ gdbpy_print_stack (void)
+@@ -1262,6 +1264,83 @@ gdbpy_print_stack (void)
/* Return the current Progspace.
There always is one. */
@@ -539,7 +539,7 @@
static PyObject *
gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2)
-@@ -1913,6 +1992,8 @@ static PyMethodDef GdbMethods[] =
+@@ -1982,6 +2061,8 @@ PyMethodDef python_GdbMethods[] =
Evaluate command, a string, as a gdb CLI command. Optionally returns\n\
a Python String containing the output of the command if to_string is\n\
set to True." },
@@ -549,7 +549,7 @@
"Return a gdb parameter's value" },
diff --git a/gdb/python/python.h b/gdb/python/python.h
-index 9e99992..c776e59 100644
+index e6bfcca..688daa3 100644
--- a/gdb/python/python.h
+++ b/gdb/python/python.h
@@ -25,4 +25,6 @@
@@ -560,7 +560,7 @@
+
#endif /* GDB_PYTHON_H */
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
-index 0b11e12..e35e829 100644
+index 9f25a48..88b0842 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -92,6 +92,10 @@ proc do_steps_and_nexts {} {
@@ -575,7 +575,7 @@
set description "next over make_command_stats_cleanup and everything it calls"
set command "next"
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
-index e47f340..a7e0a52 100644
+index 33fdbe5..264d00f 100644
--- a/gdb/testsuite/gdb.python/py-frame.exp
+++ b/gdb/testsuite/gdb.python/py-frame.exp
@@ -95,6 +95,8 @@ gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.r
@@ -588,7 +588,7 @@
gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \
" = True" \
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
-index f081ff0..58cce09 100644
+index baa17b7..45ad67e 100644
--- a/gdb/testsuite/gdb.python/py-value.exp
+++ b/gdb/testsuite/gdb.python/py-value.exp
@@ -388,6 +388,15 @@ proc test_value_after_death {} {
++++++ gdb-attach-fail-reasons-5of5.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -37,22 +37,22 @@
(linux_create_inferior, linux_tracefork_child): Call it instead of
direct ptrace.
-Index: gdb-7.8.90.20150125/gdb/nat/linux-ptrace.c
+Index: gdb-7.9.90.20150709/gdb/nat/linux-ptrace.c
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/nat/linux-ptrace.c 2015-01-25 08:36:55.710884511 +0100
-+++ gdb-7.8.90.20150125/gdb/nat/linux-ptrace.c 2015-01-25 08:38:43.157347627 +0100
-@@ -25,6 +25,10 @@
-
- #include
+--- gdb-7.9.90.20150709.orig/gdb/nat/linux-ptrace.c 2015-07-09 18:24:13.705140384 +0200
++++ gdb-7.9.90.20150709/gdb/nat/linux-ptrace.c 2015-07-09 18:24:24.911235973 +0200
+@@ -23,6 +23,10 @@
+ #include "buffer.h"
+ #include "gdb_wait.h"
+#ifdef HAVE_SELINUX_SELINUX_H
+# include
+#endif /* HAVE_SELINUX_SELINUX_H */
+
- /* Stores the currently supported ptrace options. A value of
- -1 means we did not check for features yet. A value of 0 means
- there are no supported features. */
-@@ -53,6 +57,8 @@ linux_ptrace_attach_fail_reason (pid_t p
+ /* Stores the ptrace options supported by the running kernel.
+ A value of -1 means we did not check for features yet. A value
+ of 0 means there are no supported features. */
+@@ -47,6 +51,8 @@ linux_ptrace_attach_fail_reason (pid_t p
buffer_xml_printf (buffer, _("process %d is a zombie "
"- the process has already terminated"),
(int) pid);
@@ -61,7 +61,7 @@
}
/* See linux-ptrace.h. */
-@@ -595,6 +601,22 @@ linux_ptrace_init_warnings (void)
+@@ -581,6 +587,22 @@ linux_ptrace_init_warnings (void)
linux_ptrace_test_ret_to_nx ();
}
@@ -81,26 +81,26 @@
+#endif /* HAVE_LIBSELINUX */
+}
+
- /* Set additional ptrace flags to use. Some such flags may be checked
- by the implementation above. This function must be called before
- any other function in this file; otherwise the flags may not take
-Index: gdb-7.8.90.20150125/gdb/nat/linux-ptrace.h
-===================================================================
---- gdb-7.8.90.20150125.orig/gdb/nat/linux-ptrace.h 2015-01-25 08:37:02.800915071 +0100
-+++ gdb-7.8.90.20150125/gdb/nat/linux-ptrace.h 2015-01-25 08:38:16.565233009 +0100
-@@ -98,6 +98,7 @@ extern void linux_ptrace_attach_fail_rea
+ /* Extract extended ptrace event from wait status. */
+
+ int
+Index: gdb-7.9.90.20150709/gdb/nat/linux-ptrace.h
+===================================================================
+--- gdb-7.9.90.20150709.orig/gdb/nat/linux-ptrace.h 2015-07-09 18:24:13.706140392 +0200
++++ gdb-7.9.90.20150709/gdb/nat/linux-ptrace.h 2015-07-09 18:24:24.912235981 +0200
+@@ -157,6 +157,7 @@ extern void linux_ptrace_attach_fail_rea
extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err);
extern void linux_ptrace_init_warnings (void);
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
+ extern void linux_check_ptrace_features (void);
extern void linux_enable_event_reporting (pid_t pid, int attached);
extern void linux_disable_event_reporting (pid_t pid);
- extern int linux_supports_tracefork (void);
-Index: gdb-7.8.90.20150125/gdb/configure.ac
+Index: gdb-7.9.90.20150709/gdb/configure.ac
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/configure.ac 2015-01-25 08:36:55.712884520 +0100
-+++ gdb-7.8.90.20150125/gdb/configure.ac 2015-01-25 08:37:02.801915075 +0100
-@@ -2117,6 +2117,10 @@ case $host_os in
+--- gdb-7.9.90.20150709.orig/gdb/configure.ac 2015-07-09 18:24:13.707140401 +0200
++++ gdb-7.9.90.20150709/gdb/configure.ac 2015-07-09 18:24:24.913235990 +0200
+@@ -2150,6 +2150,10 @@ case $host_os in
esac
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
@@ -111,11 +111,11 @@
dnl Handle optional features that can be enabled.
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
-Index: gdb-7.8.90.20150125/gdb/gdbserver/configure.ac
+Index: gdb-7.9.90.20150709/gdb/gdbserver/configure.ac
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/gdbserver/configure.ac 2015-01-25 08:36:55.712884520 +0100
-+++ gdb-7.8.90.20150125/gdb/gdbserver/configure.ac 2015-01-25 08:37:02.801915075 +0100
-@@ -461,6 +461,10 @@ if $want_ipa ; then
+--- gdb-7.9.90.20150709.orig/gdb/gdbserver/configure.ac 2015-07-09 18:24:13.707140401 +0200
++++ gdb-7.9.90.20150709/gdb/gdbserver/configure.ac 2015-07-09 18:24:24.913235990 +0200
+@@ -499,6 +499,10 @@ if $want_ipa ; then
fi
fi
@@ -126,11 +126,11 @@
AC_SUBST(GDBSERVER_DEPFILES)
AC_SUBST(GDBSERVER_LIBS)
AC_SUBST(srv_xmlbuiltin)
-Index: gdb-7.8.90.20150125/gdb/gdbserver/linux-low.c
+Index: gdb-7.9.90.20150709/gdb/gdbserver/linux-low.c
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/gdbserver/linux-low.c 2015-01-25 08:36:55.714884529 +0100
-+++ gdb-7.8.90.20150125/gdb/gdbserver/linux-low.c 2015-01-25 08:37:02.803915084 +0100
-@@ -591,6 +591,29 @@ add_lwp (ptid_t ptid)
+--- gdb-7.9.90.20150709.orig/gdb/gdbserver/linux-low.c 2015-07-09 18:24:13.709140418 +0200
++++ gdb-7.9.90.20150709/gdb/gdbserver/linux-low.c 2015-07-09 18:24:24.914235998 +0200
+@@ -755,6 +755,29 @@ add_lwp (ptid_t ptid)
return lwp;
}
@@ -160,7 +160,7 @@
/* Start an inferior process and returns its pid.
ALLARGS is a vector of program-name and args. */
-@@ -632,7 +655,7 @@ linux_create_inferior (char *program, ch
+@@ -778,7 +801,7 @@ linux_create_inferior (char *program, ch
if (pid == 0)
{
close_most_fds ();
@@ -169,11 +169,11 @@
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
signal (__SIGRTMIN + 1, SIG_DFL);
-Index: gdb-7.8.90.20150125/gdb/inf-ptrace.c
+Index: gdb-7.9.90.20150709/gdb/inf-ptrace.c
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/inf-ptrace.c 2015-01-25 08:36:55.715884533 +0100
-+++ gdb-7.8.90.20150125/gdb/inf-ptrace.c 2015-01-25 08:37:02.803915084 +0100
-@@ -67,7 +67,15 @@ static void
+--- gdb-7.9.90.20150709.orig/gdb/inf-ptrace.c 2015-07-09 18:24:13.710140426 +0200
++++ gdb-7.9.90.20150709/gdb/inf-ptrace.c 2015-07-09 18:24:24.915236007 +0200
+@@ -79,7 +79,15 @@ static void
inf_ptrace_me (void)
{
/* "Trace me, Dr. Memory!" */
@@ -189,36 +189,28 @@
}
/* Start a new inferior Unix child process. EXEC_FILE is the file to
-Index: gdb-7.8.90.20150125/gdb/linux-nat.c
+Index: gdb-7.9.90.20150709/gdb/linux-nat.c
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/linux-nat.c 2015-01-25 08:36:55.717884541 +0100
-+++ gdb-7.8.90.20150125/gdb/linux-nat.c 2015-01-25 08:37:52.054127362 +0100
-@@ -1109,6 +1109,7 @@ linux_nat_create_inferior (struct target
- #ifdef HAVE_PERSONALITY
- int personality_orig = 0, personality_set = 0;
- #endif /* HAVE_PERSONALITY */
+--- gdb-7.9.90.20150709.orig/gdb/linux-nat.c 2015-07-09 18:24:13.712140443 +0200
++++ gdb-7.9.90.20150709/gdb/linux-nat.c 2015-07-09 18:24:24.916236015 +0200
+@@ -1184,6 +1184,7 @@ linux_nat_create_inferior (struct target
+ {
+ struct cleanup *restore_personality
+ = maybe_disable_address_space_randomization (disable_randomization);
+ volatile struct gdb_exception ex;
/* The fork_child mechanism is synchronous and calls target_wait, so
we have to mask the async mode. */
-@@ -1133,7 +1134,10 @@ linux_nat_create_inferior (struct target
+@@ -1191,7 +1192,28 @@ linux_nat_create_inferior (struct target
/* Make sure we report all signals during startup. */
linux_nat_pass_signals (ops, 0, NULL);
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
-+ TRY_CATCH (ex, RETURN_MASK_ERROR)
++ TRY
+ {
+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
+ }
-
- #ifdef HAVE_PERSONALITY
- if (personality_set)
-@@ -1145,6 +1149,24 @@ linux_nat_create_inferior (struct target
- safe_strerror (errno));
- }
- #endif /* HAVE_PERSONALITY */
-+
-+ if (ex.reason < 0)
++ CATCH (ex, RETURN_MASK_ERROR)
+ {
+ struct buffer buffer;
+ char *message, *buffer_s;
@@ -235,14 +227,15 @@
+
+ throw_error (ex.error, "%s%s", buffer_s, message);
+ }
- }
++ END_CATCH
- /* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not
-Index: gdb-7.8.90.20150125/gdb/config.in
+ do_cleanups (restore_personality);
+ }
+Index: gdb-7.9.90.20150709/gdb/config.in
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/config.in 2015-01-25 08:36:55.718884546 +0100
-+++ gdb-7.8.90.20150125/gdb/config.in 2015-01-25 08:37:02.805915092 +0100
-@@ -213,6 +213,9 @@
+--- gdb-7.9.90.20150709.orig/gdb/config.in 2015-07-09 18:24:13.713140452 +0200
++++ gdb-7.9.90.20150709/gdb/config.in 2015-07-09 18:24:24.916236015 +0200
+@@ -264,6 +264,9 @@
/* Define if librpm library is being used. */
#undef HAVE_LIBRPM
@@ -252,7 +245,7 @@
/* Define to 1 if you have the header file. */
#undef HAVE_LIBUNWIND_IA64_H
-@@ -342,6 +345,9 @@
+@@ -396,6 +399,9 @@
/* Define to 1 if you have the `scm_new_smob' function. */
#undef HAVE_SCM_NEW_SMOB
@@ -262,11 +255,11 @@
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
-Index: gdb-7.8.90.20150125/gdb/configure
+Index: gdb-7.9.90.20150709/gdb/configure
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/configure 2015-01-25 08:36:55.722884563 +0100
-+++ gdb-7.8.90.20150125/gdb/configure 2015-01-25 08:37:02.809915110 +0100
-@@ -13270,6 +13270,64 @@ cat >>confdefs.h <<_ACEOF
+--- gdb-7.9.90.20150709.orig/gdb/configure 2015-07-09 18:24:13.718140495 +0200
++++ gdb-7.9.90.20150709/gdb/configure 2015-07-09 18:24:24.920236049 +0200
+@@ -14228,6 +14228,64 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
@@ -331,11 +324,11 @@
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
# except that the argument to --with-sysroot is optional.
-Index: gdb-7.8.90.20150125/gdb/gdbserver/config.in
+Index: gdb-7.9.90.20150709/gdb/gdbserver/config.in
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/gdbserver/config.in 2015-01-25 08:36:55.724884572 +0100
-+++ gdb-7.8.90.20150125/gdb/gdbserver/config.in 2015-01-25 08:37:02.809915110 +0100
-@@ -75,6 +75,9 @@
+--- gdb-7.9.90.20150709.orig/gdb/gdbserver/config.in 2015-07-09 18:24:13.719140503 +0200
++++ gdb-7.9.90.20150709/gdb/gdbserver/config.in 2015-07-09 18:24:24.920236049 +0200
+@@ -113,6 +113,9 @@
/* Define to 1 if you have the `mcheck' library (-lmcheck). */
#undef HAVE_LIBMCHECK
@@ -345,9 +338,9 @@
/* Define if the target supports branch tracing. */
#undef HAVE_LINUX_BTRACE
-@@ -142,6 +145,9 @@
- /* Define to 1 if you have the `pwrite' function. */
- #undef HAVE_PWRITE
+@@ -189,6 +192,9 @@
+ /* Define to 1 if you have the `setns' function. */
+ #undef HAVE_SETNS
+/* Define to 1 if you have the header file. */
+#undef HAVE_SELINUX_SELINUX_H
@@ -355,11 +348,11 @@
/* Define to 1 if you have the header file. */
#undef HAVE_SGTTY_H
-Index: gdb-7.8.90.20150125/gdb/gdbserver/configure
+Index: gdb-7.9.90.20150709/gdb/gdbserver/configure
===================================================================
---- gdb-7.8.90.20150125.orig/gdb/gdbserver/configure 2015-01-25 08:36:55.726884580 +0100
-+++ gdb-7.8.90.20150125/gdb/gdbserver/configure 2015-01-25 08:37:02.811915118 +0100
-@@ -6199,6 +6199,64 @@ if $want_ipa ; then
+--- gdb-7.9.90.20150709.orig/gdb/gdbserver/configure 2015-07-09 18:24:13.721140520 +0200
++++ gdb-7.9.90.20150709/gdb/gdbserver/configure 2015-07-09 18:24:24.922236066 +0200
+@@ -7022,6 +7022,64 @@ if $want_ipa ; then
fi
fi
++++++ gdb-btrobust.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -3,19 +3,19 @@
--
-Index: gdb-7.8.90.20150214/gdb/python/py-framefilter.c
+Index: gdb-7.9.50.20150520/gdb/python/py-framefilter.c
===================================================================
---- gdb-7.8.90.20150214.orig/gdb/python/py-framefilter.c 2015-02-14 17:35:12.277653200 +0100
-+++ gdb-7.8.90.20150214/gdb/python/py-framefilter.c 2015-02-14 17:36:15.737953789 +0100
-@@ -1506,6 +1506,7 @@ gdbpy_apply_frame_filter (const struct e
- volatile struct gdb_exception except;
+--- gdb-7.9.50.20150520.orig/gdb/python/py-framefilter.c 2015-05-31 17:36:34.681952530 +0200
++++ gdb-7.9.50.20150520/gdb/python/py-framefilter.c 2015-05-31 17:55:01.884788031 +0200
+@@ -1523,6 +1523,7 @@ gdbpy_apply_frame_filter (const struct e
+ PyObject *iterable;
PyObject *item;
htab_t levels_printed;
+ int count_printed = 0;
if (!gdb_python_initialized)
return EXT_LANG_BT_NO_FILTERS;
-@@ -1525,24 +1526,7 @@ gdbpy_apply_frame_filter (const struct e
+@@ -1543,24 +1544,7 @@ gdbpy_apply_frame_filter (const struct e
iterable = bootstrap_python_frame_filters (frame, frame_low, frame_high);
if (iterable == NULL)
@@ -41,7 +41,7 @@
/* If iterable is None, then there are no frame filters registered.
If this is the case, defer to default GDB printing routines in MI
-@@ -1573,15 +1557,40 @@ gdbpy_apply_frame_filter (const struct e
+@@ -1591,15 +1575,40 @@ gdbpy_apply_frame_filter (const struct e
error and continue with other frames. */
if (success == EXT_LANG_BT_ERROR)
gdbpy_print_stack ();
++++++ gdb-bz541866-rwatch-before-run.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -1,20 +1,20 @@
-Index: gdb-7.8.50.20141228/gdb/config/i386/linux64.mh
+Index: gdb-7.9.90.20150709/gdb/config/i386/linux64.mh
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/config/i386/linux64.mh 2015-01-01 17:12:53.965472227 +0100
-+++ gdb-7.8.50.20141228/gdb/config/i386/linux64.mh 2015-01-01 17:12:55.367471414 +0100
-@@ -6,7 +6,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
- proc-service.o linux-thread-db.o linux-fork.o \
+--- gdb-7.9.90.20150709.orig/gdb/config/i386/linux64.mh 2015-07-09 18:23:32.173786118 +0200
++++ gdb-7.9.90.20150709/gdb/config/i386/linux64.mh 2015-07-09 18:23:51.823953736 +0200
+@@ -7,7 +7,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
linux-procfs.o linux-ptrace.o linux-btrace.o \
- linux-waitpid.o
+ linux-waitpid.o linux-personality.o x86-linux.o \
+ x86-linux-dregs.o linux-namespaces.o
-NAT_FILE= config/nm-linux.h
+NAT_FILE= nm-linux64.h
NAT_CDEPS = $(srcdir)/proc-service.list
# The dynamically loaded libthread_db needs access to symbols in the
-Index: gdb-7.8.50.20141228/gdb/config/i386/linux.mh
+Index: gdb-7.9.90.20150709/gdb/config/i386/linux.mh
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/config/i386/linux.mh 2015-01-01 17:12:55.367471414 +0100
-+++ gdb-7.8.50.20141228/gdb/config/i386/linux.mh 2015-01-01 17:13:07.568464342 +0100
+--- gdb-7.9.90.20150709.orig/gdb/config/i386/linux.mh 2015-07-09 18:23:30.527772078 +0200
++++ gdb-7.9.90.20150709/gdb/config/i386/linux.mh 2015-07-09 18:23:32.174786127 +0200
@@ -1,6 +1,6 @@
# Host: Intel 386 running GNU/Linux.
@@ -23,10 +23,10 @@
NATDEPFILES= inf-ptrace.o fork-child.o \
x86-nat.o x86-dregs.o i386-linux-nat.o x86-linux-nat.o \
proc-service.o linux-thread-db.o \
-Index: gdb-7.8.50.20141228/gdb/config/i386/nm-linux.h
+Index: gdb-7.9.90.20150709/gdb/config/i386/nm-linux.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/config/i386/nm-linux.h 2015-01-01 17:12:55.368471414 +0100
++++ gdb-7.9.90.20150709/gdb/config/i386/nm-linux.h 2015-07-09 18:23:32.174786127 +0200
@@ -0,0 +1,28 @@
+/* Native support for GNU/Linux i386.
+
@@ -56,10 +56,10 @@
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
+
+#endif /* NM_LINUX64_H */
-Index: gdb-7.8.50.20141228/gdb/config/i386/nm-linux64.h
+Index: gdb-7.9.90.20150709/gdb/config/i386/nm-linux64.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/config/i386/nm-linux64.h 2015-01-01 17:12:55.368471414 +0100
++++ gdb-7.9.90.20150709/gdb/config/i386/nm-linux64.h 2015-07-09 18:23:32.174786127 +0200
@@ -0,0 +1,28 @@
+/* Native support for GNU/Linux amd64.
+
@@ -89,26 +89,26 @@
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
+
+#endif /* NM_LINUX64_H */
-Index: gdb-7.8.50.20141228/gdb/target.h
+Index: gdb-7.9.90.20150709/gdb/target.h
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/target.h 2015-01-01 17:12:53.967472226 +0100
-+++ gdb-7.8.50.20141228/gdb/target.h 2015-01-01 17:12:55.368471414 +0100
-@@ -1754,9 +1754,11 @@ extern char *target_thread_name (struct
- bp_hardware_breakpoint. CNT is the number of such watchpoints used so far
- (including this one?). OTHERTYPE is who knows what... */
+--- gdb-7.9.90.20150709.orig/gdb/target.h 2015-07-09 18:23:30.528772086 +0200
++++ gdb-7.9.90.20150709/gdb/target.h 2015-07-09 18:23:32.175786135 +0200
+@@ -1849,9 +1849,11 @@ extern char *target_thread_name (struct
+ CNT is the number of such watchpoints used so far, including this
+ one. OTHERTYPE is who knows what... */
+#ifndef target_can_use_hardware_watchpoint
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
(*current_target.to_can_use_hw_breakpoint) (¤t_target, \
- TYPE, CNT, OTHERTYPE);
+ TYPE, CNT, OTHERTYPE)
+#endif
/* Returns the number of debug registers needed to watch the given
memory region, or zero if not supported. */
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
+Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2015-01-01 17:12:55.369471413 +0100
++++ gdb-7.9.90.20150709/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2015-07-09 18:23:32.175786135 +0200
@@ -0,0 +1,40 @@
+# Copyright 2009, 2010 Free Software Foundation, Inc.
+
++++++ gdb-dts-rhel6-python-compat.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -1,9 +1,9 @@
https://bugzilla.redhat.com/show_bug.cgi?id=1020004
-Index: gdb-7.8.50.20141228/gdb/data-directory/Makefile.in
+Index: gdb-7.9.50.20150520/gdb/data-directory/Makefile.in
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/data-directory/Makefile.in 2015-01-05 22:51:10.707756810 +0100
-+++ gdb-7.8.50.20141228/gdb/data-directory/Makefile.in 2015-01-05 22:51:48.608923139 +0100
+--- gdb-7.9.50.20150520.orig/gdb/data-directory/Makefile.in 2015-05-31 18:05:43.046746351 +0200
++++ gdb-7.9.50.20150520/gdb/data-directory/Makefile.in 2015-05-31 18:05:58.483841655 +0200
@@ -60,6 +60,8 @@ PYTHON_FILE_LIST = \
gdb/frames.py \
gdb/FrameIterator.py \
@@ -12,8 +12,8 @@
+ gdb/backtrace.py \
gdb/types.py \
gdb/printing.py \
- gdb/prompt.py \
-@@ -74,6 +76,7 @@ PYTHON_FILE_LIST = \
+ gdb/unwinder.py \
+@@ -76,6 +78,7 @@ PYTHON_FILE_LIST = \
gdb/command/pretty_printers.py \
gdb/command/prompt.py \
gdb/command/explore.py \
@@ -21,10 +21,10 @@
gdb/function/__init__.py \
gdb/function/caller_is.py \
gdb/function/strfns.py \
-Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/FrameWrapper.py
+Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/FrameWrapper.py
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/python/lib/gdb/FrameWrapper.py 2015-01-05 22:51:24.706818245 +0100
++++ gdb-7.9.50.20150520/gdb/python/lib/gdb/FrameWrapper.py 2015-05-31 18:05:58.484841661 +0200
@@ -0,0 +1,122 @@
+# Wrapper API for frames.
+
@@ -148,10 +148,10 @@
+
+ def __getattr__ (self, name):
+ return getattr (self.frame, name)
-Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/backtrace.py
+Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/backtrace.py
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/python/lib/gdb/backtrace.py 2015-01-05 22:51:24.706818245 +0100
++++ gdb-7.9.50.20150520/gdb/python/lib/gdb/backtrace.py 2015-05-31 18:05:58.484841661 +0200
@@ -0,0 +1,42 @@
+# Filtering backtrace.
+
@@ -195,10 +195,10 @@
+ return iter
+ return old_frame_filter (iter)
+
-Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/command/backtrace.py
+Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/command/backtrace.py
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/python/lib/gdb/command/backtrace.py 2015-01-05 22:51:24.707818249 +0100
++++ gdb-7.9.50.20150520/gdb/python/lib/gdb/command/backtrace.py 2015-05-31 18:05:58.484841661 +0200
@@ -0,0 +1,106 @@
+# New backtrace command.
+
++++++ gdb-glibc-vdso-workaround.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -11,11 +11,13 @@
Work around PR libc/13097.
* solib.c (update_solib_list): Ignore "linux-vdso.so.1".
---- a/gdb/solib.c
-+++ b/gdb/solib.c
-@@ -783,8 +783,11 @@ update_solib_list (int from_tty, struct target_ops *target)
+Index: gdb-7.9.50.20150520/gdb/solib.c
+===================================================================
+--- gdb-7.9.50.20150520.orig/gdb/solib.c 2015-05-31 17:04:16.870802493 +0200
++++ gdb-7.9.50.20150520/gdb/solib.c 2015-05-31 17:04:38.824941054 +0200
+@@ -893,8 +893,11 @@ update_solib_list (int from_tty, struct
- TRY_CATCH (e, RETURN_MASK_ERROR)
+ TRY
{
- /* Fill in the rest of the `struct so_list' node. */
- if (!solib_map_sections (i))
@@ -27,4 +29,3 @@
{
not_found++;
if (not_found_filename == NULL)
-
++++++ gdb-libstdc++-v3-python-r155978.tar.bz2 -> gdb-libstdc++-v3-python-r225521.tar.bz2 ++++++
++++ 2625 lines of diff (skipped)
++++++ gdb-pahole-python2.patch ++++++
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
index e08eaf5..56c1737 100644
--- a/gdb/python/lib/gdb/command/pahole.py
+++ b/gdb/python/lib/gdb/command/pahole.py
@@ -55,19 +55,19 @@ It prints the type and displays comments showing where holes are."""
fieldsize = 8 * ftype.sizeof
# TARGET_CHAR_BIT
- print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), end = "")
+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8))),
bitpos = bitpos + fieldsize
if ftype.code == gdb.TYPE_CODE_STRUCT:
self.pahole (ftype, level + 1, field.name)
else:
- print (' ' * (2 + 2 * level), end = "")
+ print (' ' * (2 + 2 * level)),
print ('%s %s' % (str (ftype), field.name))
if level == 0:
self.maybe_print_hole(bitpos, 8 * type.sizeof)
- print (' ' * (14 + 2 * level), end = "")
+ print (' ' * (14 + 2 * level)),
print ('} %s' % name)
def invoke (self, arg, from_tty):
@@ -75,7 +75,7 @@ It prints the type and displays comments showing where holes are."""
type = type.strip_typedefs ()
if type.code != gdb.TYPE_CODE_STRUCT:
raise (TypeError, '%s is not a struct type' % arg)
- print (' ' * 14, end = "")
+ print (' ' * 14),
self.pahole (type, 0, '')
Pahole()
++++++ gdb-probes-based-interface-robust-1of2.patch ++++++
probes
This patch improves the error reporting when handling SystemTap SDT
probes. "Handling", in this case, mostly means "parsing".
On gdb/probe.h, only trivial changes on functions' comments in order
to explicitly mention that some of them can throw exceptions. This is
just to make the API a bit more clear.
On gdb/stap-probe.c, I have s/internal_error/error/ on two functions
that are responsible for parsing specific bits of the probes'
arguments: stap_get_opcode and stap_get_expected_argument_type. It is
not correct to call internal_error on such situations because it is
not really GDB's fault if the probes have malformed arguments. I also
improved the error reported on stap_get_expected_argument_type by also
including the probe name on it.
Aside from that, and perhaps most importantly, I added a check on
stap_get_arg to make sure that we don't try to extract an argument
from a probe that has no arguments. This check issues an
internal_error, because it really means that GDB is doing something it
shouldn't.
Although it can be considered almost trivial, and despite the fact
that I am the maintainer for this part of the code, I am posting this
patch for review. I will wait a few days, and if nobody has anything
to say, I will go ahead and push it.
gdb/ChangeLog:
2015-09-01 Sergio Durigan Junior
* probe.h (struct probe_ops) : Mention in
the comment that the function can throw an exception.
(get_probe_argument_count): Likewise.
(evaluate_probe_argument): Likewise.
* stap-probe.c (stap_get_opcode): Call error instead of
internal_error.
(stap_get_expected_argument_type): Likewise. Add argument
'probe'. Improve error message by mentioning the probe's name.
(stap_parse_probe_arguments): Adjust call to
stap_get_expected_argument_type.
(stap_get_arg): Add comment. Assert that 'probe->args_parsed' is
not zero. Call internal_error if GDB requests an argument but the
probe has no arguments.
---
gdb/ChangeLog | 17 +++++++++++++++++
gdb/probe.h | 20 ++++++++++++++------
gdb/stap-probe.c | 29 ++++++++++++++++++++++-------
3 files changed, 53 insertions(+), 13 deletions(-)
Index: gdb-7.10/gdb/probe.h
===================================================================
--- gdb-7.10.orig/gdb/probe.h
+++ gdb-7.10/gdb/probe.h
@@ -70,7 +70,8 @@ struct probe_ops
CORE_ADDR (*get_probe_address) (struct probe *probe,
struct objfile *objfile);
- /* Return the number of arguments of PROBE. */
+ /* Return the number of arguments of PROBE. This function can
+ throw an exception. */
unsigned (*get_probe_argument_count) (struct probe *probe,
struct frame_info *frame);
@@ -82,7 +83,8 @@ struct probe_ops
int (*can_evaluate_probe_arguments) (struct probe *probe);
/* Evaluate the Nth argument from the PROBE, returning a value
- corresponding to it. The argument number is represented N. */
+ corresponding to it. The argument number is represented N.
+ This function can throw an exception. */
struct value *(*evaluate_probe_argument) (struct probe *probe,
unsigned n,
@@ -141,13 +143,15 @@ struct probe_ops
/* Enable a probe. The semantics of "enabling" a probe depend on
the specific backend and the field can be NULL in case enabling
- probes is not supported. */
+ probes is not supported. This function can throw an
+ exception. */
void (*enable_probe) (struct probe *probe);
/* Disable a probe. The semantics of "disabling" a probe depend
on the specific backend and the field can be NULL in case
- disabling probes is not supported. */
+ disabling probes is not supported. This function can throw an
+ exception. */
void (*disable_probe) (struct probe *probe);
};
@@ -264,7 +268,9 @@ extern struct cmd_list_element **info_pr
extern CORE_ADDR get_probe_address (struct probe *probe,
struct objfile *objfile);
-/* Return the argument count of the specified probe. */
+/* Return the argument count of the specified probe.
+
+ This function can throw an exception. */
extern unsigned get_probe_argument_count (struct probe *probe,
struct frame_info *frame);
@@ -276,7 +282,9 @@ extern unsigned get_probe_argument_count
extern int can_evaluate_probe_arguments (struct probe *probe);
/* Evaluate argument N of the specified probe. N must be between 0
- inclusive and get_probe_argument_count exclusive. */
+ inclusive and get_probe_argument_count exclusive.
+
+ This function can throw an exception. */
extern struct value *evaluate_probe_argument (struct probe *probe,
unsigned n,
Index: gdb-7.10/gdb/stap-probe.c
===================================================================
--- gdb-7.10.orig/gdb/stap-probe.c
+++ gdb-7.10/gdb/stap-probe.c
@@ -313,9 +313,8 @@ stap_get_opcode (const char **s)
break;
default:
- internal_error (__FILE__, __LINE__,
- _("Invalid opcode in expression `%s' for SystemTap"
- "probe"), *s);
+ error (_("Invalid opcode in expression `%s' for SystemTap"
+ "probe"), *s);
}
return op;
@@ -326,7 +325,8 @@ stap_get_opcode (const char **s)
static struct type *
stap_get_expected_argument_type (struct gdbarch *gdbarch,
- enum stap_arg_bitness b)
+ enum stap_arg_bitness b,
+ const struct stap_probe *probe)
{
switch (b)
{
@@ -361,8 +361,8 @@ stap_get_expected_argument_type (struct
return builtin_type (gdbarch)->builtin_uint64;
default:
- internal_error (__FILE__, __LINE__,
- _("Undefined bitness for probe."));
+ error (_("Undefined bitness for probe '%s'."),
+ probe->p.name);
break;
}
}
@@ -1172,7 +1172,8 @@ stap_parse_probe_arguments (struct stap_
else
arg.bitness = STAP_ARG_BITNESS_UNDEFINED;
- arg.atype = stap_get_expected_argument_type (gdbarch, arg.bitness);
+ arg.atype = stap_get_expected_argument_type (gdbarch, arg.bitness,
+ probe);
expr = stap_parse_argument (&cur, arg.atype, gdbarch);
@@ -1278,12 +1279,26 @@ stap_is_operator (const char *op)
return ret;
}
+/* Return argument N of probe PROBE.
+
+ If the probe's arguments have not been parsed yet, parse them. If
+ there are no arguments, throw an exception (error). Otherwise,
+ return the requested argument. */
+
static struct stap_probe_arg *
stap_get_arg (struct stap_probe *probe, unsigned n, struct gdbarch *gdbarch)
{
if (!probe->args_parsed)
stap_parse_probe_arguments (probe, gdbarch);
+ gdb_assert (probe->args_parsed);
+ if (probe->args_u.vec == NULL)
+ internal_error (__FILE__, __LINE__,
+ _("Probe '%s' apparently does not have arguments, but \n"
+ "GDB is requesting its argument number %u anyway. "
+ "This should not happen. Please report this bug."),
+ probe->p.name, n);
+
return VEC_index (stap_probe_arg_s, probe->args_u.vec, n);
}
++++++ gdb-probes-based-interface-robust-2of2.patch ++++++
From 3bd7e5b7ee5ea0b3bbb4030ca841f66faad74f0f Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior
Date: Fri, 21 Aug 2015 18:28:07 -0400
Subject: [PATCH 2/4] Catching errors on probes-based dynamic linker interface
This patch is intended to make the interaction between the
probes-based dynamic linker interface and the SystemTap SDT probe code
on GDB more robust. It does that by wrapping the calls to the probe
API with TRY...CATCH'es, so that any exception thrown will be caught
and handled properly.
The idea for this patch came from
https://bugzilla.redhat.com/show_bug.cgi?id=1196181, which is a bug
initially filed against Fedora GDB (but now under Fedora GLIBC). This
bug happens on armhfp (although it could happen on other targets as
well), and is triggered because GCC generates a strange argument for
one of the probes used by GDB in the dynamic linker interface. As can
be seen in the bug, this argument is "-4@.L1052".
I don't want to discuss the reasons for this argument to be there
(this discussion belongs to the bug, or to another thread), but GDB
could definitely do a better error handling here. Currently, one sees
the following message when there is an error in the probes-based
dynamic linker interface:
(gdb) run
Starting program: /bin/inferior
warning: Probes-based dynamic linker interface failed.
Reverting to original interface.
Cannot parse expression `.L976 4@r4'.
(gdb)
Which means that one needs to explicitly issue a "continue" command to
make GDB continue running the inferior, even though this error is not
fatal and GDB will fallback to the old interface automatically.
This is where this patch helps: it makes GDB still print the necessary
warnings or error messages, but it *also* does not stop the inferior
unnecessarily.
I have tested this patch on the systems where this error happens, but
I could not come up with a way to create a testcase for it.
Nevertheless, it should be straightforward to see that this patch does
improve the current situation.
gdb/ChangeLog:
2015-09-01 Sergio Durigan Junior
* solib-svr4.c (solib_event_probe_action): Call
get_probe_argument_count using TRY...CATCH.
(svr4_handle_solib_event): Likewise, for evaluate_probe_argument.
---
gdb/ChangeLog | 6 ++++++
gdb/solib-svr4.c | 43 ++++++++++++++++++++++++++++++++++++++++---
2 files changed, 46 insertions(+), 3 deletions(-)
Index: gdb-7.10/gdb/solib-svr4.c
===================================================================
--- gdb-7.10.orig/gdb/solib-svr4.c
+++ gdb-7.10/gdb/solib-svr4.c
@@ -1796,7 +1796,23 @@ solib_event_probe_action (struct probe_a
arg0: Lmid_t lmid (mandatory)
arg1: struct r_debug *debug_base (mandatory)
arg2: struct link_map *new (optional, for incremental updates) */
- probe_argc = get_probe_argument_count (pa->probe, frame);
+ TRY
+ {
+ probe_argc = get_probe_argument_count (pa->probe, frame);
+ }
+ CATCH (ex, RETURN_MASK_ERROR)
+ {
+ exception_print (gdb_stderr, ex);
+ probe_argc = 0;
+ }
+ END_CATCH
+
+ /* If get_probe_argument_count throws an exception, probe_argc will
+ be set to zero. However, if pa->probe does not have arguments,
+ then get_probe_argument_count will succeed but probe_argc will
+ also be zero. Both cases happen because of different things, but
+ they are treated equally here: action will be set to
+ PROBES_INTERFACE_FAILED. */
if (probe_argc == 2)
action = FULL_RELOAD;
else if (probe_argc < 2)
@@ -1950,7 +1966,17 @@ svr4_handle_solib_event (void)
usm_chain = make_cleanup (resume_section_map_updates_cleanup,
current_program_space);
- val = evaluate_probe_argument (pa->probe, 1, frame);
+ TRY
+ {
+ val = evaluate_probe_argument (pa->probe, 1, frame);
+ }
+ CATCH (ex, RETURN_MASK_ERROR)
+ {
+ exception_print (gdb_stderr, ex);
+ val = NULL;
+ }
+ END_CATCH
+
if (val == NULL)
{
do_cleanups (old_chain);
@@ -1981,7 +2007,18 @@ svr4_handle_solib_event (void)
if (action == UPDATE_OR_RELOAD)
{
- val = evaluate_probe_argument (pa->probe, 2, frame);
+ TRY
+ {
+ val = evaluate_probe_argument (pa->probe, 2, frame);
+ }
+ CATCH (ex, RETURN_MASK_ERROR)
+ {
+ exception_print (gdb_stderr, ex);
+ do_cleanups (old_chain);
+ return;
+ }
+ END_CATCH
+
if (val != NULL)
lm = value_as_address (val);
From ad1c917a79e8c5aa67657f148415c1bee01b240f Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior
Date: Wed, 2 Sep 2015 00:34:22 -0400
Subject: [PATCH 3/4] Initialize variable and silence GCC warning from last
commit
BuildBot e-mailed me to let me know that my last commit broke GDB on
RHEL-7.1 s390x. On solib-svr4.c:svr4_handle_solib_event, 'val' now
needs to be initialized as NULL because it is inside a TRY..CATCH
block. This patch does that. Pushed as obvious.
gdb/ChangeLog:
2015-09-01 Sergio Durigan Junior
* solib-svr4.c (svr4_handle_solib_event): Initialize 'val' as NULL
---
gdb/ChangeLog | 4 ++++
gdb/solib-svr4.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
Index: gdb-7.10/gdb/solib-svr4.c
===================================================================
--- gdb-7.10.orig/gdb/solib-svr4.c
+++ gdb-7.10/gdb/solib-svr4.c
@@ -1918,7 +1918,7 @@ svr4_handle_solib_event (void)
struct probe_and_action *pa;
enum probe_action action;
struct cleanup *old_chain, *usm_chain;
- struct value *val;
+ struct value *val = NULL;
CORE_ADDR pc, debug_base, lm = 0;
int is_initial_ns;
struct frame_info *frame = get_current_frame ();
From 73c6b4756a7cee53c274ed05fddcd079b8b7e57c Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior
Date: Wed, 2 Sep 2015 00:46:43 -0400
Subject: [PATCH 4/4] Initialize yet another variable to silence GCC warning
from last-but-one commit
Yet another BuildBot e-mail, yet another breakage on RHEL-7.1 s390x
(which uses an older GCC). This time,
solib-svr4.c:solib_event_probe_action has the probe_argc variable,
which is now inside a TRY..CATCH and therefore needs to be
initialized. Pushed as obvious.
gdb/ChangeLog:
2015-09-01 Sergio Durigan Junior
* solib-svr4.c (solib_event_probe_action): Initialize 'probe_argc'
as zero.
---
gdb/ChangeLog | 5 +++++
gdb/solib-svr4.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
2015-09-01 Sergio Durigan Junior
Index: gdb-7.10/gdb/solib-svr4.c
===================================================================
--- gdb-7.10.orig/gdb/solib-svr4.c
+++ gdb-7.10/gdb/solib-svr4.c
@@ -1782,7 +1782,7 @@ static enum probe_action
solib_event_probe_action (struct probe_and_action *pa)
{
enum probe_action action;
- unsigned probe_argc;
+ unsigned probe_argc = 0;
struct frame_info *frame = get_current_frame ();
action = pa->action;
++++++ gdb-python-gil.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -1,7 +1,8 @@
-diff -dup -ruNp gdb-7.8-orig/gdb/doc/python.texi gdb-7.8/gdb/doc/python.texi
---- gdb-7.8-orig/gdb/doc/python.texi 2014-08-13 22:04:14.162441271 +0200
-+++ gdb-7.8/gdb/doc/python.texi 2014-08-13 22:07:20.894643853 +0200
-@@ -228,6 +228,14 @@ returned as a string. The default is @c
+Index: gdb-7.9.50.20150520/gdb/doc/python.texi
+===================================================================
+--- gdb-7.9.50.20150520.orig/gdb/doc/python.texi 2015-05-31 17:57:12.431593983 +0200
++++ gdb-7.9.50.20150520/gdb/doc/python.texi 2015-05-31 17:57:14.654607708 +0200
+@@ -229,6 +229,14 @@ returned as a string. The default is @c
return value is @code{None}. If @var{to_string} is @code{True}, the
@value{GDBN} virtual terminal will be temporarily set to unlimited width
and height, and its pagination will be disabled; @pxref{Screen Size}.
@@ -16,10 +17,11 @@
@end defun
@findex gdb.breakpoints
-diff -dup -ruNp gdb-7.8-orig/gdb/python/python-internal.h gdb-7.8/gdb/python/python-internal.h
---- gdb-7.8-orig/gdb/python/python-internal.h 2014-08-13 22:04:14.835441977 +0200
-+++ gdb-7.8/gdb/python/python-internal.h 2014-08-13 22:07:20.895643867 +0200
-@@ -143,6 +143,8 @@ typedef int Py_ssize_t;
+Index: gdb-7.9.50.20150520/gdb/python/python-internal.h
+===================================================================
+--- gdb-7.9.50.20150520.orig/gdb/python/python-internal.h 2015-05-31 17:57:12.432593989 +0200
++++ gdb-7.9.50.20150520/gdb/python/python-internal.h 2015-05-31 17:57:14.654607708 +0200
+@@ -142,6 +142,8 @@ typedef int Py_ssize_t;
#define PyGILState_Release(ARG) ((void)(ARG))
#define PyEval_InitThreads()
#define PyThreadState_Swap(ARG) ((void)(ARG))
@@ -28,18 +30,18 @@
#define PyEval_ReleaseLock()
#endif
-diff -dup -ruNp gdb-7.8-orig/gdb/python/python.c gdb-7.8/gdb/python/python.c
---- gdb-7.8-orig/gdb/python/python.c 2014-08-13 22:04:14.164441273 +0200
-+++ gdb-7.8/gdb/python/python.c 2014-08-13 22:07:20.895643867 +0200
-@@ -620,14 +620,19 @@ execute_gdb_command (PyObject *self, PyO
+Index: gdb-7.9.50.20150520/gdb/python/python.c
+===================================================================
+--- gdb-7.9.50.20150520.orig/gdb/python/python.c 2015-05-31 17:57:14.656607720 +0200
++++ gdb-7.9.50.20150520/gdb/python/python.c 2015-05-31 18:02:08.891424227 +0200
+@@ -627,13 +627,18 @@ execute_gdb_command (PyObject *self, PyO
{
const char *arg;
PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
- int from_tty, to_string;
+- static char *keywords[] = {"command", "from_tty", "to_string", NULL };
+ PyObject *release_gil_obj = NULL;
+ int from_tty, to_string, release_gil;
- volatile struct gdb_exception except;
-- static char *keywords[] = {"command", "from_tty", "to_string", NULL };
+ static char *keywords[] = {"command", "from_tty", "to_string",
+ "release_gil", NULL };
char *result = NULL;
@@ -55,7 +57,7 @@
return NULL;
from_tty = 0;
-@@ -648,12 +652,28 @@ execute_gdb_command (PyObject *self, PyO
+@@ -654,12 +659,28 @@ execute_gdb_command (PyObject *self, PyO
to_string = cmp;
}
@@ -68,7 +70,7 @@
+ release_gil = cmp;
+ }
+
- TRY_CATCH (except, RETURN_MASK_ALL)
+ TRY
{
/* Copy the argument text in case the command modifies it. */
char *copy = xstrdup (arg);
@@ -84,7 +86,7 @@
make_cleanup_restore_integer (&interpreter_async);
interpreter_async = 0;
-@@ -666,9 +686,21 @@ execute_gdb_command (PyObject *self, PyO
+@@ -672,11 +693,23 @@ execute_gdb_command (PyObject *self, PyO
execute_command (copy, from_tty);
}
@@ -94,22 +96,25 @@
+
do_cleanups (cleanup);
}
-- GDB_PY_HANDLE_EXCEPTION (except);
-+ if (except.reason < 0)
-+ {
-+ /* Reacquire the GIL if it was released earlier. */
-+ if (release_gil)
-+ PyEval_RestoreThread (state);
+ CATCH (except, RETURN_MASK_ALL)
+ {
+- GDB_PY_HANDLE_EXCEPTION (except);
++ if (except.reason < 0)
++ {
++ /* Reacquire the GIL if it was released earlier. */
++ if (release_gil)
++ PyEval_RestoreThread (state);
+
-+ gdbpy_convert_exception (except);
-+ return NULL;
-+ }
++ gdbpy_convert_exception (except);
++ return NULL;
++ }
+ }
+ END_CATCH
- /* Do any commands attached to breakpoint we stopped at. */
- bpstat_do_actions ();
-diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.c gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.c
---- gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.c 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.c 2014-08-13 22:33:05.052648912 +0200
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.c 2015-05-31 17:57:14.656607720 +0200
@@ -0,0 +1,12 @@
+#include
+
@@ -123,9 +128,10 @@
+ printf ("Sleeping %d\n", i);
+ }
+}
-diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.exp gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.exp
---- gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.exp 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.exp 2014-08-13 22:33:00.660641300 +0200
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.exp 2015-05-31 17:57:14.657607726 +0200
@@ -0,0 +1,69 @@
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
@@ -196,9 +202,10 @@
+ }
+ }
+}
-diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.py gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.py
---- gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.py 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.py 2014-08-13 22:33:08.996654320 +0200
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.py
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.py 2015-05-31 17:57:14.657607726 +0200
@@ -0,0 +1,22 @@
+import thread
+import time
++++++ gdb-rhbz1260558-ppc64le-skip_trampoline_code.patch ++++++
http://sourceware.org/ml/gdb-patches/2015-09/msg00183.html
Subject: [ppc64le patch v3] Use skip_entrypoint for skip_trampoline_code
--mYCpIKhGyMATD0i+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
An update to PASS the testcase on non-ppc64le archs.
--mYCpIKhGyMATD0i+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=4
gdb/ChangeLog
2015-09-07 Jan Kratochvil
* linespec.c (minsym_found): Call gdbarch_skip_entrypoint.
* ppc64-tdep.c (ppc64_skip_trampoline_code): Rename to ...
(ppc64_skip_trampoline_code_1): ... here.
(ppc64_skip_trampoline_code): New wrapper function.
* symtab.c (find_function_start_sal): Call gdbarch_skip_entrypoint.
gdb/testsuite/ChangeLog
2015-09-07 Jan Kratochvil
* gdb.opt/solib-intra-step-lib.c: New file.
* gdb.opt/solib-intra-step-main.c: New file.
* gdb.opt/solib-intra-step.exp: New file.
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 8f102fa..4c29c12 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -3570,6 +3570,8 @@ minsym_found (struct linespec_state *self, struct objfile *objfile,
sal.pc = MSYMBOL_VALUE_ADDRESS (objfile, msymbol);
sal.pc = gdbarch_convert_from_func_ptr_addr (gdbarch, sal.pc,
¤t_target);
+ if (gdbarch_skip_entrypoint_p (gdbarch))
+ sal.pc = gdbarch_skip_entrypoint (gdbarch, sal.pc);
}
else
skip_prologue_sal (&sal);
diff --git a/gdb/ppc64-tdep.c b/gdb/ppc64-tdep.c
index bb23b6a..4a0b93a 100644
--- a/gdb/ppc64-tdep.c
+++ b/gdb/ppc64-tdep.c
@@ -454,8 +454,8 @@ ppc64_standard_linkage4_target (struct frame_info *frame,
When the execution direction is EXEC_REVERSE, scan backward to
check whether we are in the middle of a PLT stub. */
-CORE_ADDR
-ppc64_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
+static CORE_ADDR
+ppc64_skip_trampoline_code_1 (struct frame_info *frame, CORE_ADDR pc)
{
#define MAX(a,b) ((a) > (b) ? (a) : (b))
unsigned int insns[MAX (MAX (MAX (ARRAY_SIZE (ppc64_standard_linkage1),
@@ -530,6 +530,20 @@ ppc64_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
return 0;
}
+/* Wrapper of ppc64_skip_trampoline_code_1 checking also
+ ppc_elfv2_skip_entrypoint. */
+
+CORE_ADDR
+ppc64_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
+{
+ struct gdbarch *gdbarch = get_frame_arch (frame);
+
+ pc = ppc64_skip_trampoline_code_1 (frame, pc);
+ if (pc != 0 && gdbarch_skip_entrypoint_p (gdbarch))
+ pc = gdbarch_skip_entrypoint (gdbarch, pc);
+ return pc;
+}
+
/* Support for convert_from_func_ptr_addr (ARCH, ADDR, TARG) on PPC64
GNU/Linux.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 1ba691e..f65e809 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -3629,7 +3629,11 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
&& (COMPUNIT_LOCATIONS_VALID (SYMTAB_COMPUNIT (sal.symtab))
|| SYMTAB_LANGUAGE (sal.symtab) == language_asm))
{
+ struct gdbarch *gdbarch = symbol_arch (sym);
+
sal.pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
+ if (gdbarch_skip_entrypoint_p (gdbarch))
+ sal.pc = gdbarch_skip_entrypoint (gdbarch, sal.pc);
return sal;
}
diff --git a/gdb/testsuite/gdb.opt/solib-intra-step-lib.c b/gdb/testsuite/gdb.opt/solib-intra-step-lib.c
new file mode 100644
index 0000000..9ab1211
--- /dev/null
+++ b/gdb/testsuite/gdb.opt/solib-intra-step-lib.c
@@ -0,0 +1,30 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2015 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/. */
+
+#include
+
+void
+shlib_second (int dummy)
+{ /* second-retry */
+ abort (); /* second-hit */
+}
+
+void
+shlib_first (void)
+{ /* first-retry */
+ shlib_second (0); /* first-hit */
+}
diff --git a/gdb/testsuite/gdb.opt/solib-intra-step-main.c b/gdb/testsuite/gdb.opt/solib-intra-step-main.c
new file mode 100644
index 0000000..186bd5f
--- /dev/null
+++ b/gdb/testsuite/gdb.opt/solib-intra-step-main.c
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2015 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/. */
+
+extern void shlib_first (void);
+
+int
+main (void)
+{
+ shlib_first ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.opt/solib-intra-step.exp b/gdb/testsuite/gdb.opt/solib-intra-step.exp
new file mode 100644
index 0000000..044c4bd
--- /dev/null
+++ b/gdb/testsuite/gdb.opt/solib-intra-step.exp
@@ -0,0 +1,86 @@
+# Copyright 2015 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see http://www.gnu.org/licenses/.
+
+standard_testfile
+
+if {[skip_shlib_tests]} {
+ return 0
+}
+
+# Library file.
+set libname "${testfile}-lib"
+set srcfile_lib ${srcdir}/${subdir}/${libname}.c
+set binfile_lib [standard_output_file ${libname}.so]
+set lib_flags [list debug optimize=-O2]
+# Binary file.
+set testfile "${testfile}-main"
+set srcfile ${srcdir}/${subdir}/${testfile}.c
+set binfile [standard_output_file ${testfile}]
+set bin_flags [list debug shlib=${binfile_lib}]
+
+if [get_compiler_info] {
+ return -1
+}
+
+if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
+ || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
+ untested "Could not compile $binfile_lib or $binfile."
+ return -1
+}
+
+clean_restart ${binfile}
+gdb_load_shlibs $binfile_lib
+
+if ![runto_main] then {
+ return 0
+}
+
+set test "first-hit"
+gdb_test_multiple "step" $test {
+ -re " first-hit .*\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re " first-retry .*\r\n$gdb_prompt $" {
+ gdb_test "step" " first-hit .*" "first-hit (optimized)"
+ }
+}
+
+set test "second-hit"
+gdb_test_multiple "step" $test {
+ -re " second-hit .*\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re " first-retry .*\r\n$gdb_prompt $" {
+ set test "second-hit (optimized 1)"
+ gdb_test_multiple "step" $test {
+ -re " second-hit .*\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re " first-hit .*\r\n$gdb_prompt $" {
+ gdb_test "step" " second-hit .*" "second-hit (optimized 2)"
+ }
+ }
+ }
+ -re " second-retry .*\r\n$gdb_prompt $" {
+ gdb_test "step" " second-hit .*" "second-hit (optimized 3)"
+ }
+}
+
+if ![runto_main] then {
+ return 0
+}
+
+gdb_breakpoint "shlib_second"
+gdb_continue_to_breakpoint "second-hit" ".* (second-hit|second-retry) .*"
--mYCpIKhGyMATD0i+--
++++++ gdb-rhbz1270564-invalid-dwarf-regno.patch ++++++
http://sourceware.org/ml/gdb-patches/2015-10/msg00166.html
Subject: [patch] Fix internal error on DW_OP_bregx(-1)
--ibTvN161/egqYuK8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
https://bugzilla.redhat.com/show_bug.cgi?id=1270564#c15
https://bugzilla.redhat.com/attachment.cgi?id=1081772
clang-3.5.0-9.fc22.x86_64
<3><22b2>: Abbrev Number: 69 (DW_TAG_variable)
<22b3> DW_AT_location : 7 byte block: 92 ff ff ff ff f 0 (DW_OP_bregx: 4294967295 (r-1) 0)
<22bb> DW_AT_name : (indirect string, offset: 0x2a36): texture_data
<22c1> DW_AT_type : <0x1d3>
(gdb) p variable
warning: Unmapped DWARF Register #-1 encountered.
regcache.c:177: internal-error: register_size: Assertion `regnum >= 0 && regnum < (gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch))' failed.
[...]
Quit this debugging session? (y or n) FAIL: gdb.dwarf2/dw2-regno-invalid.exp: p variable (GDB internal error)
-> (x86_64)
(gdb) p variable
warning: Unmapped DWARF Register #-1 encountered.
Invalid register #-1, expecting 0 <= # < 220
(gdb) PASS: gdb.dwarf2/dw2-regno-invalid.exp: p variable
-> (i386)
(gdb) p variable
Invalid register #104, expecting 0 <= # < 104
(gdb) PASS: gdb.dwarf2/dw2-regno-invalid.exp: p variable
GDB calls gdbarch_dwarf2_reg_to_regnum() first which returns -1 in the x86_64
case
if (regnum == -1)
warning (_("Unmapped DWARF Register #%d encountered."), reg);
but in i386 case it does:
/* This will hopefully provoke a warning. */
return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
and the default implementation is a nop, leaving whatever register number
the DWARF specified.
No regressions on {x86_64,x86_64-m32,i686}-fedorarawhide-linux-gnu.
Jan
--ibTvN161/egqYuK8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="undefreg.patch"
gdb/ChangeLog
2015-10-12 Jan Kratochvil
* findvar.c (address_from_register): Check REGNUM validity.
gdb/testsuite/ChangeLog
2015-10-12 Jan Kratochvil
* gdb.dwarf2/dw2-regno-invalid.S: New file.
* gdb.dwarf2/dw2-regno-invalid.exp: New file.
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 0f46e53..855947d 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -927,6 +927,12 @@ address_from_register (int regnum, struct frame_info *frame)
struct type *type = builtin_type (gdbarch)->builtin_data_ptr;
struct value *value;
CORE_ADDR result;
+ int regnum_max_excl = (gdbarch_num_regs (gdbarch)
+ + gdbarch_num_pseudo_regs (gdbarch));
+
+ if (regnum < 0 || regnum >= regnum_max_excl)
+ error (_("Invalid register #%d, expecting 0 <= # < %d"), regnum,
+ regnum_max_excl);
/* This routine may be called during early unwinding, at a time
where the ID of FRAME is not yet known. Calling value_from_register
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.S b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.S
new file mode 100644
index 0000000..075bfd6
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.S
@@ -0,0 +1,91 @@
+/* Copyright 2015 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/. */
+
+ .section .debug_info
+debug_start:
+ .4byte debug_end - 1f /* Length of Compilation Unit Info */
+1:
+ .2byte 0x3 /* DWARF version number */
+ .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
+ .byte 0x4 /* Pointer Size (in bytes) */
+ .uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */
+ .ascii "clang-3.5.0-9.fc22.x86_64\0" /* DW_AT_producer */
+ .byte 0x1 /* DW_AT_language */
+ .ascii "1.c\0" /* DW_AT_name */
+ .4byte main_label /* DW_AT_low_pc */
+ .4byte main_label+0x10000 /* DW_AT_high_pc */
+
+ .uleb128 2 /* Abbrev: DW_TAG_subprogram */
+ .byte 1 /* DW_AT_external */
+ .ascii "main\0" /* DW_AT_name */
+ .4byte main_label /* DW_AT_low_pc */
+ .4byte main_label+0x10000 /* DW_AT_high_pc */
+
+ .uleb128 0x4 /* (DW_TAG_variable) */
+ .ascii "variable\0" /* DW_AT_name */
+ .2byte 2f - 1f /* DW_AT_location: DW_FORM_block2 */
+1:
+ .byte 0x92 /* DW_OP_bregx */
+ .uleb128 0xffffffff
+ .sleb128 0
+2:
+
+ .byte 0x0 /* end of children of main */
+ .byte 0x0 /* end of children of CU */
+debug_end:
+
+ .section .debug_abbrev
+.Ldebug_abbrev0:
+ .uleb128 0x1 /* (abbrev code) */
+ .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x25 /* (DW_AT_producer) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x13 /* (DW_AT_language) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x11 /* DW_AT_low_pc */
+ .uleb128 0x1 /* DW_FORM_addr */
+ .uleb128 0x12 /* DW_AT_high_pc */
+ .uleb128 0x1 /* DW_FORM_addr */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 2 /* Abbrev code */
+ .uleb128 0x2e /* DW_TAG_subprogram */
+ .byte 1 /* has_children */
+ .uleb128 0x3f /* DW_AT_external */
+ .uleb128 0xc /* DW_FORM_flag */
+ .uleb128 0x3 /* DW_AT_name */
+ .uleb128 0x8 /* DW_FORM_string */
+ .uleb128 0x11 /* DW_AT_low_pc */
+ .uleb128 0x1 /* DW_FORM_addr */
+ .uleb128 0x12 /* DW_AT_high_pc */
+ .uleb128 0x1 /* DW_FORM_addr */
+ .byte 0x0 /* Terminator */
+ .byte 0x0 /* Terminator */
+
+
+ .uleb128 0x4 /* (abbrev code) */
+ .uleb128 0x34 /* (TAG: DW_TAG_variable) */
+ .byte 0x0 /* DW_children_yes */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x02 /* (DW_AT_location) */
+ .uleb128 0x3 /* (DW_FORM_block2) */
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
new file mode 100644
index 0000000..7c3a404
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
@@ -0,0 +1,32 @@
+# Copyright 2015 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see http://www.gnu.org/licenses/.
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+ return 0
+}
+
+standard_testfile .S main.c
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" \
+ "${binfile}" executable {}] != "" } {
+ return -1
+}
+
+clean_restart ${binfile}
+runto_main
+
+gdb_test "p variable"
--ibTvN161/egqYuK8--
++++++ gdb-rhbz795424-bitpos-20of25.patch ++++++
++++ 2311 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/gdb/gdb-rhbz795424-bitpos-20of25.patch
++++ and /work/SRC/openSUSE:Factory/.gdb.new/gdb-rhbz795424-bitpos-20of25.patch
++++++ gdb-rhbz795424-bitpos-23of25.patch ++++++
++++ 656 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/gdb/gdb-rhbz795424-bitpos-23of25.patch
++++ and /work/SRC/openSUSE:Factory/.gdb.new/gdb-rhbz795424-bitpos-23of25.patch
++++++ gdb-vla-intel-stringbt-fix.patch ++++++
--- /var/tmp/diff_new_pack.W1zk7D/_old 2016-02-03 10:19:00.000000000 +0100
+++ /var/tmp/diff_new_pack.W1zk7D/_new 2016-02-03 10:19:00.000000000 +0100
@@ -31,30 +31,30 @@
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="vlastringonly.patch"
-Index: gdb-7.8.50.20141228/gdb/gdbtypes.c
+Index: gdb-7.9.50.20150520/gdb/gdbtypes.c
===================================================================
---- gdb-7.8.50.20141228.orig/gdb/gdbtypes.c 2015-01-08 18:15:18.475682523 +0100
-+++ gdb-7.8.50.20141228/gdb/gdbtypes.c 2015-01-08 18:39:01.423134700 +0100
-@@ -1684,6 +1684,7 @@ is_dynamic_type_internal (struct type *t
- return !has_static_range (TYPE_RANGE_DATA (type));
+--- gdb-7.9.50.20150520.orig/gdb/gdbtypes.c 2015-05-31 16:14:04.164533833 +0200
++++ gdb-7.9.50.20150520/gdb/gdbtypes.c 2015-05-31 16:14:05.844545344 +0200
+@@ -1851,6 +1851,7 @@ is_dynamic_type_internal (struct type *t
+ }
case TYPE_CODE_ARRAY:
+ case TYPE_CODE_STRING:
{
gdb_assert (TYPE_NFIELDS (type) == 1);
-@@ -1992,6 +1993,7 @@ resolve_dynamic_type_internal (struct ty
+@@ -2192,6 +2193,7 @@ resolve_dynamic_type_internal (struct ty
}
case TYPE_CODE_ARRAY:
+ case TYPE_CODE_STRING:
- resolved_type = resolve_dynamic_array (type, addr);
+ resolved_type = resolve_dynamic_array (type, addr_stack);
break;
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 2015-01-08 18:15:18.897684435 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 2015-05-31 16:14:05.844545344 +0200
@@ -0,0 +1,24 @@
+! Copyright 2010 Free Software Foundation, Inc.
+!
@@ -80,10 +80,10 @@
+ real :: dummy
+ dummy = 1
+end subroutine bar
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp 2015-01-08 18:15:18.897684435 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp 2015-05-31 16:14:05.845545351 +0200
@@ -0,0 +1,39 @@
+# Copyright 2010 Free Software Foundation, Inc.
+
@@ -124,10 +124,10 @@
+}
+
+gdb_test "bt" {foo \(string='hello'.*}
-Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 2015-01-08 18:15:18.897684435 +0100
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 2015-05-31 16:14:05.845545351 +0200
@@ -0,0 +1,36 @@
+! Copyright 2010 Free Software Foundation, Inc.
+!
@@ -165,3 +165,17 @@
+ end interface
+ call foo ('hello')
+end
+Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp
+===================================================================
+--- gdb-7.9.50.20150520.orig/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-05-31 16:14:04.167533854 +0200
++++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-05-31 16:14:31.073718201 +0200
+@@ -33,9 +33,6 @@ gdb_continue_to_breakpoint "var_char-all
+ gdb_test "print var_char" \
+ " = \\(PTR TO -> \\( character\\*10 \\)\\) ${hex}" \
+ "print var_char after allocated first time"
+-gdb_test "print *var_char" \
+- " = '\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000'" \
+- "print *var_char after allocated first time"
+ gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*10 \\)" \
+ "whatis var_char first time"
+ gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*10 \\)" \
++++++ gdb-vla-intel.patch ++++++
++++ 1060 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/gdb/gdb-vla-intel.patch
++++ and /work/SRC/openSUSE:Factory/.gdb.new/gdb-vla-intel.patch