Hello community,
here is the log from the commit of package gdb for openSUSE:Factory checked in at 2012-06-16 06:55:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gdb (Old)
and /work/SRC/openSUSE:Factory/.gdb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gdb", Maintainer is "RGuenther@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gdb/gdb.changes 2011-09-23 01:59:29.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gdb.new/gdb.changes 2012-06-16 06:55:32.000000000 +0200
@@ -1,0 +2,256 @@
+Tue Jun 12 13:00:14 UTC 2012 - rguenther@suse.com
+
+- Merge from gdb-7.4.50.20120603-3.fc18.src.rpm.
+
+ * Wed Jun 6 2012 Jan Kratochvil - 7.4.50.20120603-3.fc18
+ - Disable -lmcheck in the development builds.
+ - Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans).
+
+ * Sun Jun 3 2012 Jan Kratochvil - 7.4.50.20120603-2.fc18
+ - Fix Release.
+ - Make yum --enablerepo compatible with at least mock-1.1.21-1.fc16 Rawhide cfg.
+
+ * Sun Jun 3 2012 Jan Kratochvil - 7.4.50.20120602-1.fc18
+ - Rebase to FSF GDB 7.4.50.20120602.
+ - [testsuite] BuildRequire gcc-go.
+ - Drop printing 2D C++ vectors as matrices which no longer worked (BZ 562763).
+ - Fix dejagnu-1.5-4.fc17 compatibility for Go (for BZ 635651).
+ - Use librpm.so.3 for rpm-4.10.0 in Fedora 18.
+ - Revert recent breakage of UNIX objfiles order for symbols lookup.
+
+ * Sat Jun 2 2012 Jan Kratochvil - 7.4.50.20120120-48.fc17
+ - [ppc] Fix hardware watchpoints on PowerPC (BZ 827600, Edjunior Machado).
+
+ * Mon May 28 2012 Jan Kratochvil - 7.4.50.20120120-47.fc17
+ - Workaround PR libc/14166 for inferior calls of strstr.
+
+ * Mon May 14 2012 Jan Kratochvil - 7.4.50.20120120-46.fc17
+ - [RHEL5] Workaround doc build race.
+
+ * Mon May 14 2012 Jan Kratochvil - 7.4.50.20120120-45.fc17
+ - Rename "set auto-load" patchset variable $ddir to $datadir.
+
+ * Wed May 9 2012 Jan Kratochvil - 7.4.50.20120120-44.fc17
+ - Fix in "set auto-load" patchset for SCL scripts inheritance (BZ 815910).
+
+ * Wed Apr 25 2012 Jan Kratochvil - 7.4.50.20120120-43.fc17
+ - [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
+
+ * Tue Apr 24 2012 Jan Kratochvil - 7.4.50.20120120-42.fc17
+ - Update "set auto-load" patchset and the --with-auto-load-safe-path setting.
+ - [RHEL] Disable gdb-add-index even on RHEL-6 as RHEL-6.0 had too old elfutils.
+
+ * Wed Apr 18 2012 Jan Kratochvil - 7.4.50.20120120-41.fc17
+ - [RHEL] Fix --with-auto-load-safe-path systems prior to /usr move.
+
+ * Wed Apr 18 2012 Jan Kratochvil - 7.4.50.20120120-40.fc17
+ - Security fix for loading untrusted inferiors, see "set auto-load" (BZ 756117).
+
+ * Fri Apr 13 2012 Jan Kratochvil - 7.4.50.20120120-39.fc17
+ - [RHEL7] Fix/remove readline-devel BuildRequires redundant distro suffic .fc17.
+
+ * Wed Apr 4 2012 Jan Kratochvil - 7.4.50.20120120-38.fc17
+ - Workaround crashes from stale frame_info pointer (BZ 804256).
+
+ * Wed Apr 4 2012 Jan Kratochvil - 7.4.50.20120120-37.fc17
+ - testsuite: Fix break-interp.exp expections for updated glibc (BZ 752834).
+
+ * Wed Apr 4 2012 Jan Kratochvil - 7.4.50.20120120-36.fc17
+ - [RHEL5,RHEL6] Reintroduce fix attaching to stopped processes.
+
+ * Fri Mar 30 2012 Jan Kratochvil - 7.4.50.20120120-35.fc17
+ - Fix performance regressions with .gdb_index (Tom Tromey, BZ 805274).
+
+ * Fri Mar 30 2012 Jan Kratochvil - 7.4.50.20120120-34.fc17
+ - Fixup %{_datadir}/gdb timestamps for multilib conflicts on RHELs.
+
+ * Mon Mar 26 2012 Jan Kratochvil - 7.4.50.20120120-33.fc17
+ - [vla] Fix regression on no type for subrange from IBM XLF Fortran (BZ 806920).
+
+ * Sat Mar 17 2012 Jan Kratochvil - 7.4.50.20120120-32.fc17
+ - Fix loading of core files without build-ids but with build-ids in executables.
+
+ * Fri Mar 9 2012 Jan Kratochvil - 7.4.50.20120120-31.fc17
+ - Fix an implied regression by the inferior calls fix below (BZ 799531).
+
+ * Fri Mar 9 2012 Jan Kratochvil - 7.4.50.20120120-30.fc17
+ - Fix SELinux deny_ptrace .spec build rules (BZ 786878).
+
+ * Tue Mar 6 2012 Jan Kratochvil - 7.4.50.20120120-29.fc17
+ - Fix inferior calls, particularly uncaught thrown exceptions (BZ 799531).
+ - Fix DWARF DIEs CU vs. section relative offsets (Joel Brobecker, me).
+
+ * Tue Mar 6 2012 Jan Kratochvil - 7.4.50.20120120-28.fc17
+ - Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878).
+
+ * Sun Mar 4 2012 Jan Kratochvil - 7.4.50.20120120-27.fc17
+ - [rhel5] Fix up the previous commit (BZ 799318).
+
+ * Sun Mar 4 2012 Jan Kratochvil - 7.4.50.20120120-26.fc17
+ - [rhel5] Fix up the previous commit (BZ 799318).
+
+ * Sun Mar 4 2012 Jan Kratochvil - 7.4.50.20120120-25.fc17
+ - [rhel5] Workaround rpmbuild to make the doc subpkg noarch again (BZ 799318).
+
+ * Fri Mar 2 2012 Jan Kratochvil - 7.4.50.20120120-24.fc17
+ - [vla] Fix crash for dynamic.exp with gcc-gfortran-4.1.2-51.el5.x86_64.
+ - Reintroduce RHEL-5 glibc workaround for bt-clone-stop.exp.
+ - testsuite: Update/fix rh634108-solib_address.exp for the upstreamed API.
+
+ * Wed Feb 29 2012 Jan Kratochvil - 7.4.50.20120120-23.fc17
+ - Add kernel vDSO workaround (`no loadable ...') on RHEL-5 (kernel BZ 765875).
+ - Fix skipping of prologues on RHEL-5 gcc-4.1 -O2 -g code (BZ 797889).
+ - Fix breakpoint warning during 'next' over exit() (Tom Tromey, BZ 797892).
+
+ * Tue Feb 28 2012 Jan Kratochvil - 7.4.50.20120120-22.fc17
+ - testsuite: Fix gdb.base/macscp.exp ccache workaround in SCL mode.
+ - Adjust the RHEL/F version string automatically (BZ 797651, BZ 797646).
+ - Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664).
+
+ * Fri Feb 24 2012 Jan Kratochvil - 7.4.50.20120120-21.fc17
+ - testsuite: Do not use gcc44/gfortran44 on RHEL-5 if in SCL mode.
+
+ * Wed Feb 22 2012 Jan Kratochvil - 7.4.50.20120120-20.fc17
+ - Fix libinproctrace.so build on RHEL-5 i386 (disable it on RHEL-5).
+
+ * Wed Feb 22 2012 Jan Kratochvil - 7.4.50.20120120-19.fc17
+ - Implement SCL (scl-utils-build) macros.
+
+ * Tue Feb 21 2012 Jan Kratochvil - 7.4.50.20120120-18.fc17
+ - Fix debuginfo gdb-gdb.py build without redhat-rpm-config and on RHEL-5.
+ - Provide precompiled variants of gdb-gdb.py.
+
+ * Mon Feb 13 2012 Jan Kratochvil - 7.4.50.20120120-17.fc17
+ - gstack: Turn off --readnever (suggested by Oliver Henshaw).
+
+ * Fri Feb 10 2012 Jan Kratochvil - 7.4.50.20120120-16.fc17
+ - [RHELs] Drop simulation of legacy behavior - new GDB should behave as new GDB.
+
+ * Fri Feb 10 2012 Jan Kratochvil - 7.4.50.20120120-15.fc17
+ - Simplify %%setup .spec rule.
+
+ * Fri Feb 10 2012 Jan Kratochvil - 7.4.50.20120120-14.fc17
+ - Drop --with upstream .spec rules.
+
+ * Fri Feb 10 2012 Jan Kratochvil - 7.4.50.20120120-13.fc17
+ - Drop --with debug .spec rules.
+
+ * Thu Feb 9 2012 Jan Kratochvil - 7.4.50.20120120-12.fc17
+ - Improve performance for C++ symbols expansion (Tom Tromey, BZ 787487).
+ - Install also gdb-gdb.py pretty printers.
+
+ * Thu Feb 9 2012 Jan Kratochvil - 7.4.50.20120120-11.fc17
+ - Fix possible NULL crash in find_charset_names (Tom Tromey, BZ 786091).
+ - [ppc*] Fix build failure due to GCC aliasing warning (BZ 786504).
+
+-------------------------------------------------------------------
+Tue Jun 12 07:41:22 UTC 2012 - cfarrell@suse.com
+
+- license update: GPL-3.0+ and GPL-3.0-with-GCC-exception and LGPL-2.1+ and
+ LGPL-3.0+
+ SPDX format
+
+-------------------------------------------------------------------
+Wed May 9 05:13:38 UTC 2012 - coolo@suse.com
+
+- Fix the minimum to get it through factory-auto
+
+-------------------------------------------------------------------
+Tue Apr 3 14:08:43 UTC 2012 - rguenther@suse.com
+
+- Fixup missed debuginfo handling SUSE specifics.
+
+-------------------------------------------------------------------
+Thu Jan 26 09:42:11 UTC 2012 - rguenther@suse.com
+
+- Merge from gdb-7.4.50.20120120-10.fc17.src.rpm.
+
+ * Sat Jan 21 2012 Jan Kratochvil - 7.4.50.20120120-10.fc17
+ - Rebase to FSF GDB 7.4.50.20120120.
+ - Drop the g77 .spec provisioning as it has been fixed in FSF GDB.
+
+ * Thu Jan 19 2012 Jan Kratochvil - 7.4.50.20120103-9.fc17
+ - Enable smaller %{_bindir}/gdb in future by no longer using -rdynamic.
+ - Make --enablerepo to use '*-debug*' for RHEL compatibility (BZ 781571).
+ - On older RHELs make readline bundled again (BZ 701131).
+ - Fix build compatibility with RHEL-5 due to false noarch build.
+
+ * Wed Jan 11 2012 Jan Kratochvil - 7.4.50.20120103-8.fc17
+ - Disable unexpected GDB directories relocatability.
+
+ * Wed Jan 11 2012 Jan Kratochvil - 7.4.50.20120103-7.fc17
+ - Fix BuildRequires for RHEL compatibility (BZ 701131).
+
+ * Wed Jan 11 2012 Jan Kratochvil - 7.4.50.20120103-6.fc17
+ - Provide %%snap timestamp for: Provides: bundled(librarypackage)
+ - Replace %%define by %%global.
+ - Replace Java in Summary with Fortran (only GCC-compiled Java is supported).
+ - Unbundle readline-6.2 with a workaround of skipped "ask" (BZ 701131).
+ - Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131).
+
+ * Sat Jan 7 2012 Jan Kratochvil - 7.4.50.20120103-5.fc17
+ - Mark %{_sysconfdir}/gdbinit as %%config(noreplace).
+ - Add appropriate: Provides: bundled(librarypackage).
+ - Remove excessive explicit Requires: librarypackage.
+
+ * Thu Jan 5 2012 Jan Kratochvil - 7.4.50.20120103-4.fc17
+ - Fix linking on non-x86* (such as s390*) after libgdb.a removal.
++++ 59 more lines (skipped)
++++ between /work/SRC/openSUSE:Factory/gdb/gdb.changes
++++ and /work/SRC/openSUSE:Factory/.gdb.new/gdb.changes
Old:
----
gdb-6.3-ppcdotsolib-20041022.patch
gdb-6.3-security-errata-20050610.patch
gdb-6.3-step-thread-exit-20050211-test.patch
gdb-6.6-bz247354-leader-exit-fix.patch
gdb-6.6-bz247354-leader-exit-test.patch
gdb-6.6-step-thread-exit.patch
gdb-6.8-attach-signalled-detach-stopped.patch
gdb-6.8-tui-singlebinary.patch
gdb-7.3.tar.bz2
gdb-bz562763-pretty-print-2d-vectors-libstdcxx.patch
gdb-bz562763-pretty-print-2d-vectors.patch
gdb-bz645773-case-insensitive-1of5.patch
gdb-bz645773-case-insensitive-2of5.patch
gdb-bz645773-case-insensitive-3of5.patch
gdb-bz645773-case-insensitive-4of5.patch
gdb-bz701131-readline62-1of3.patch
gdb-bz701131-readline62-2of3.patch
gdb-bz701131-readline62-3of3.patch
gdb-core-thread-internalerr-1of3.patch
gdb-core-thread-internalerr-2of3.patch
gdb-core-thread-internalerr-3of3.patch
gdb-gcc46-stdarg-prologue.patch
gdb-gcc46-typedef.patch
gdb-prelink-rela.patch
gdb-stap-double-free.patch
gdb-test-pp-hint-error.patch
gdb-unused-revert.patch
New:
----
gdb-6.6-bfd-vdso8k.patch
gdb-6.6-buildid-locate-solib-missing-ids.patch
gdb-7.4.50.20120603.tar.bz2
gdb-attach-fail-reasons-5of5.patch
gdb-attach-fail-reasons-5of5configure.patch
gdb-dejagnu-go.patch
gdb-disable-mcheck.patch
gdb-dlopen-stap-probe-test.patch
gdb-dlopen-stap-probe.patch
gdb-glibc-strstr-workaround.patch
gdb-glibc-vdso-workaround.patch
gdb-index-assert.patch
gdb-objfile-order.patch
gdb-ppc-ptrace.diff
gdb-python-rdynamic.patch
gdb-readline62-ask-more-rh.patch
gdb-runtest-pie-override.patch
gdb-stale-frame_info.patch
gdb-upstream.patch
gdb-x86-onstack-1of2.patch
gdb-x86-onstack-2of2.patch
gdbtui
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gdb.spec ++++++
++++ 993 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/gdb/gdb.spec
++++ and /work/SRC/openSUSE:Factory/.gdb.new/gdb.spec
++++++ gdb-6.3-bz231832-obstack-2gb.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -1,11 +1,11 @@
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832
-Index: gdb-7.2.50.20101116/gdb/symmisc.c
+Index: gdb-7.4.50.20111218/gdb/symmisc.c
===================================================================
---- gdb-7.2.50.20101116.orig/gdb/symmisc.c 2010-11-16 07:53:59.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/symmisc.c 2010-11-16 08:03:08.000000000 +0100
-@@ -186,8 +186,8 @@ print_objfile_statistics (void)
+--- gdb-7.4.50.20111218.orig/gdb/symmisc.c 2011-04-04 17:19:59.000000000 +0200
++++ gdb-7.4.50.20111218/gdb/symmisc.c 2011-12-19 00:28:18.189232014 +0100
+@@ -147,8 +147,8 @@ print_objfile_statistics (void)
if (OBJSTAT (objfile, sz_strtab) > 0)
printf_filtered (_(" Space used by a.out string tables: %d\n"),
OBJSTAT (objfile, sz_strtab));
@@ -16,10 +16,10 @@
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
bcache_memory_used (psymbol_bcache_get_bcache
(objfile->psymbol_cache)));
-Index: gdb-7.2.50.20101116/include/obstack.h
+Index: gdb-7.4.50.20111218/include/obstack.h
===================================================================
---- gdb-7.2.50.20101116.orig/include/obstack.h 2008-10-21 01:03:31.000000000 +0200
-+++ gdb-7.2.50.20101116/include/obstack.h 2010-11-16 08:02:37.000000000 +0100
+--- gdb-7.4.50.20111218.orig/include/obstack.h 2011-10-22 03:35:29.000000000 +0200
++++ gdb-7.4.50.20111218/include/obstack.h 2011-12-19 00:28:18.189232014 +0100
@@ -188,31 +188,31 @@ struct obstack /* control current objec
/* Declare the external functions we use; they are in obstack.c. */
@@ -125,19 +125,10 @@
if (__o->chunk_limit - __o->next_free < __len) \
_obstack_newchunk (__o, __len); \
obstack_blank_fast (__o, __len); \
-@@ -532,7 +532,7 @@ __extension__ \
- # define obstack_free(h,obj) \
- ( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
-- ? (int) ((h)->next_free = (h)->object_base \
-+ ? (PTR_INT_TYPE) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
-
-Index: gdb-7.2.50.20101116/libiberty/obstack.c
+Index: gdb-7.4.50.20111218/libiberty/obstack.c
===================================================================
---- gdb-7.2.50.20101116.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200
-+++ gdb-7.2.50.20101116/libiberty/obstack.c 2010-11-16 08:02:37.000000000 +0100
+--- gdb-7.4.50.20111218.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200
++++ gdb-7.4.50.20111218/libiberty/obstack.c 2011-12-19 00:28:18.191232006 +0100
@@ -44,9 +44,11 @@
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
#include
++++++ gdb-6.3-gstack-20050411.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -4,11 +4,11 @@
to install and uninstall.
* gstack.sh, gstack.1: New files.
-Index: gdb-7.2.50.20101116/gdb/Makefile.in
+Index: gdb-7.4.50.20120103/gdb/Makefile.in
===================================================================
---- gdb-7.2.50.20101116.orig/gdb/Makefile.in 2010-11-05 15:31:25.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/Makefile.in 2010-11-16 07:56:10.000000000 +0100
-@@ -972,7 +972,7 @@ gdb.z:gdb.1
+--- gdb-7.4.50.20120103.orig/gdb/Makefile.in 2012-01-03 05:52:15.000000000 +0100
++++ gdb-7.4.50.20120103/gdb/Makefile.in 2012-01-03 05:53:25.974210230 +0100
+@@ -1017,7 +1017,7 @@ gdb.z:gdb.1
install: all
@$(MAKE) $(FLAGS_TO_PASS) install-only
@@ -17,7 +17,7 @@
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
-@@ -1008,7 +1008,25 @@ install-tui:
+@@ -1039,7 +1039,25 @@ install-only: $(CONFIG_INSTALL)
install-python:
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
@@ -44,10 +44,10 @@
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \
-@@ -1030,6 +1048,17 @@ uninstall-tui:
- fi ; \
- rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
+@@ -1051,6 +1069,18 @@ uninstall: force $(CONFIG_UNINSTALL)
$(DESTDIR)$(man1dir)/$$transformed_name.1
+ @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
+
+.PHONY: uninstall-gstack
+uninstall-gstack:
+ transformed_name=`t='$(program_transform_name)'; \
@@ -59,14 +59,15 @@
+ fi ; \
+ rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
-
++
# The C++ name parser can be built standalone for testing.
test-cp-name-parser.o: cp-name-parser.c
-Index: gdb-7.2.50.20101116/gdb/gstack.sh
+ $(COMPILE) -DTEST_CPNAMES cp-name-parser.c
+Index: gdb-7.4.50.20120103/gdb/gstack.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/gstack.sh 2010-11-16 07:55:47.000000000 +0100
-@@ -0,0 +1,48 @@
++++ gdb-7.4.50.20120103/gdb/gstack.sh 2012-01-03 05:52:37.278385632 +0100
+@@ -0,0 +1,43 @@
+#!/bin/sh
+
+if test $# -ne 1; then
@@ -98,14 +99,9 @@
+
+GDB=${GDB:-/usr/bin/gdb}
+
-+if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
-+ readnever=--readnever
-+else
-+ readnever=
-+fi
-+
+# Run GDB, strip out unwanted noise.
-+$GDB --quiet $readnever -nx /proc/$1/exe $1 <&1 |
++# --readnever is no longer used since .gdb_index is now in use.
++$GDB --quiet -nx /proc/$1/exe $1 <&1 |
+set width 0
+set height 0
+set pagination no
@@ -115,12 +111,12 @@
+ -e 's/^\((gdb) \)*//' \
+ -e '/^#/p' \
+ -e '/^Thread/p'
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.exp
+Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.exp 2010-11-16 07:55:47.000000000 +0100
-@@ -0,0 +1,71 @@
-+# Copyright (C) 2010 Free Software Foundation, Inc.
++++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp 2012-01-03 05:52:37.279385629 +0100
+@@ -0,0 +1,66 @@
++# Copyright (C) 2012 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
@@ -150,6 +146,7 @@
+ fail $test
+ return
+}
++set use_gdb_stub 1
+set pid [exp_pid -i $res]
+gdb_expect {
+ -re "looping\r\n" {
@@ -177,24 +174,18 @@
+ fail $test
+}
+set pid [exp_pid -i $res]
-+gdb_expect {
-+ -re {^#0 +0x[0-9a-f]+ in \.?func \(\)\r\n#1 +0x[0-9a-f]+ in \.?main \(\)\r\nGSTACK-END\r\n$} {
++gdb_test_multiple "" $test {
++ -re "^#0 +(0x\[0-9a-f\]+ in )?\\.?func \\(\\) at \[^\r\n\]*\r\n#1 +0x\[0-9a-f\]+ in \\.?main \\(\\) at \[^\r\n\]*\r\nGSTACK-END\r\n\$" {
+ pass $test
+ }
-+ eof {
-+ fail "$test (eof)"
-+ }
-+ timeout {
-+ fail "$test (timeout)"
-+ }
+}
+gdb_exit
+
+remote_exec host "kill -9 $pid"
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.c
+Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/gstack.c 2010-11-16 07:55:47.000000000 +0100
++++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.c 2012-01-03 05:52:37.279385629 +0100
@@ -0,0 +1,43 @@
+/* This testcase is part of GDB, the GNU debugger.
+
++++++ gdb-6.3-ia64-sigill-20051115.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -12,10 +12,10 @@
* gdb.arch/ia64-sigill.c: New test.
* gdb.arch/ia64-sigill.exp: Ditto.
-Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.arch/ia64-sigill.exp
+Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101231/gdb/testsuite/gdb.arch/ia64-sigill.exp 2011-01-01 00:55:04.000000000 +0100
++++ gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.exp 2011-07-22 19:16:13.000000000 +0200
@@ -0,0 +1,49 @@
+# Copyright 2005 Free Software Foundation, Inc.
+
@@ -66,10 +66,10 @@
+gdb_test "handle SIGILL nostop noprint" "SIGILL.*No.*No.*Yes.*" "handle sigill"
+gdb_test "run" "Starting program.*ia64-sigill.*\[New thread.*\].*hello world.*Program exited normally." "run to exit"
+
-Index: gdb-7.2.50.20101231/gdb/testsuite/gdb.arch/ia64-sigill.c
+Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101231/gdb/testsuite/gdb.arch/ia64-sigill.c 2011-01-01 00:55:04.000000000 +0100
++++ gdb-7.3.50.20110722/gdb/testsuite/gdb.arch/ia64-sigill.c 2011-07-22 19:16:13.000000000 +0200
@@ -0,0 +1,8 @@
+#include
+
@@ -79,11 +79,11 @@
+ return 0;
+}
+
-Index: gdb-7.2.50.20101231/gdb/linux-nat.c
+Index: gdb-7.3.50.20110722/gdb/linux-nat.c
===================================================================
---- gdb-7.2.50.20101231.orig/gdb/linux-nat.c 2011-01-01 00:54:04.000000000 +0100
-+++ gdb-7.2.50.20101231/gdb/linux-nat.c 2011-01-01 00:55:58.000000000 +0100
-@@ -3652,7 +3652,8 @@ retry:
+--- gdb-7.3.50.20110722.orig/gdb/linux-nat.c 2011-07-22 19:15:05.000000000 +0200
++++ gdb-7.3.50.20110722/gdb/linux-nat.c 2011-07-22 19:16:13.000000000 +0200
+@@ -3733,7 +3733,8 @@ retry:
threads can be a bit time-consuming so if we want decent
performance with heavily multi-threaded programs, especially when
they're using a high frequency timer, we'd better avoid it if we
@@ -93,14 +93,3 @@
if (WIFSTOPPED (status))
{
-@@ -3670,7 +3671,9 @@ retry:
- && inf->control.stop_soon == NO_STOP_QUIETLY
- && signal_stop_state (signo) == 0
- && signal_print_state (signo) == 0
-- && signal_pass_state (signo) == 1)
-+ && signal_pass_state (signo) == 1
-+ && signo != TARGET_SIGNAL_ILL
-+ && signo != TARGET_SIGNAL_TRAP)
- {
- /* FIMXE: kettenis/2001-06-06: Should we resume all threads
- here? It is not clear we should. GDB may not expect
++++++ gdb-6.3-readnever-20050907.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -11,11 +11,11 @@
* gdb.texinfo (File Options): Document --readnever.
-Index: gdb-7.2.90.20110411/gdb/doc/gdb.texinfo
+Index: gdb-7.4.50.20120602/gdb/doc/gdb.texinfo
===================================================================
---- gdb-7.2.90.20110411.orig/gdb/doc/gdb.texinfo 2011-04-11 19:11:55.000000000 +0200
-+++ gdb-7.2.90.20110411/gdb/doc/gdb.texinfo 2011-04-11 19:15:51.000000000 +0200
-@@ -1007,6 +1007,12 @@ Read each symbol file's entire symbol ta
+--- gdb-7.4.50.20120602.orig/gdb/doc/gdb.texinfo 2012-06-02 18:16:36.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/doc/gdb.texinfo 2012-06-02 18:25:20.300254019 +0200
+@@ -1020,6 +1020,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,11 +28,11 @@
@end table
@node Mode Options
-Index: gdb-7.2.90.20110411/gdb/main.c
+Index: gdb-7.4.50.20120602/gdb/main.c
===================================================================
---- gdb-7.2.90.20110411.orig/gdb/main.c 2011-04-11 19:11:56.000000000 +0200
-+++ gdb-7.2.90.20110411/gdb/main.c 2011-04-11 19:15:51.000000000 +0200
-@@ -398,6 +398,7 @@ captured_main (void *data)
+--- gdb-7.4.50.20120602.orig/gdb/main.c 2012-06-02 18:16:36.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/main.c 2012-06-02 18:25:20.302254019 +0200
+@@ -414,6 +414,7 @@ captured_main (void *data)
{"xdb", no_argument, &xdb_commands, 1},
{"dbx", no_argument, &dbx_commands, 1},
{"readnow", no_argument, &readnow_symbol_files, 1},
@@ -40,7 +40,7 @@
{"r", no_argument, &readnow_symbol_files, 1},
{"quiet", no_argument, &quiet, 1},
{"q", no_argument, &quiet, 1},
-@@ -1064,6 +1065,7 @@ Options:\n\n\
+@@ -1131,6 +1132,7 @@ Options:\n\n\
fputs_unfiltered (_("\
--quiet Do not print version number on startup.\n\
--readnow Fully read symbol files on first access.\n\
@@ -48,11 +48,11 @@
"), stream);
fputs_unfiltered (_("\
--se=FILE Use FILE as symbol file and executable file.\n\
-Index: gdb-7.2.90.20110411/gdb/symfile.c
+Index: gdb-7.4.50.20120602/gdb/symfile.c
===================================================================
---- gdb-7.2.90.20110411.orig/gdb/symfile.c 2011-03-23 19:23:55.000000000 +0100
-+++ gdb-7.2.90.20110411/gdb/symfile.c 2011-04-11 19:15:51.000000000 +0200
-@@ -81,6 +81,7 @@ static void clear_symtab_users_cleanup (
+--- gdb-7.4.50.20120602.orig/gdb/symfile.c 2012-05-31 20:44:49.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/symfile.c 2012-06-02 18:25:20.334254013 +0200
+@@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup (
/* Global variables owned by this file. */
int readnow_symbol_files; /* Read full symbols immediately. */
@@ -60,20 +60,20 @@
/* External variables and functions referenced. */
-Index: gdb-7.2.90.20110411/gdb/dwarf2read.c
+Index: gdb-7.4.50.20120602/gdb/dwarf2read.c
===================================================================
---- gdb-7.2.90.20110411.orig/gdb/dwarf2read.c 2011-04-11 19:11:55.000000000 +0200
-+++ gdb-7.2.90.20110411/gdb/dwarf2read.c 2011-04-11 19:16:01.000000000 +0200
-@@ -58,6 +58,7 @@
- #include "c-lang.h"
+--- gdb-7.4.50.20120602.orig/gdb/dwarf2read.c 2012-06-02 18:16:36.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/dwarf2read.c 2012-06-02 18:25:32.837250535 +0200
+@@ -63,6 +63,7 @@
#include "valprint.h"
+ #include "gdbcore.h" /* for gnutarget */
#include
+#include "top.h"
#include
#include "gdb_string.h"
-@@ -1351,8 +1352,9 @@ dwarf2_has_info (struct objfile *objfile
- bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
+@@ -1514,8 +1515,9 @@ dwarf2_has_info (struct objfile *objfile
+ (void *) names);
dwarf2_per_objfile->objfile = objfile;
}
- return (dwarf2_per_objfile->info.asection != NULL
@@ -83,12 +83,12 @@
+ && dwarf2_per_objfile->abbrev.asection != NULL));
}
- /* When loading sections, we can either look for ".<name>", or for
-Index: gdb-7.2.90.20110411/gdb/top.h
+ /* When loading sections, we look either for uncompressed section or for
+Index: gdb-7.4.50.20120602/gdb/top.h
===================================================================
---- gdb-7.2.90.20110411.orig/gdb/top.h 2011-01-01 16:33:18.000000000 +0100
-+++ gdb-7.2.90.20110411/gdb/top.h 2011-04-11 19:15:51.000000000 +0200
-@@ -61,6 +61,7 @@ extern void set_prompt (char *);
+--- gdb-7.4.50.20120602.orig/gdb/top.h 2012-01-23 18:12:30.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/top.h 2012-06-02 18:25:20.367254001 +0200
+@@ -60,6 +60,7 @@ extern void set_prompt (const char *s);
/* From random places. */
extern int readnow_symbol_files;
++++++ gdb-6.3-test-dtorfix-20050121.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -1,32 +1,7 @@
-Index: gdb/testsuite/ChangeLog
-2005-01-21 Jeff Johnston
-
- * gdb.cp/constructortest.exp: New test.
- * gdb.cp/constructortest.cc: Ditto.
- * gdb.cp/templates.exp: Change break of dtor to be fully quoted.
-
-2007-09-22 Jan Kratochvil
-
- * gdb.cp/constructortest.exp, gdb.cp/constructortest.cc: Test also the
- `$delete' destructor variant.
-
-2007-09-25 Jan Kratochvil
-
- * gdb.cp/constructortest.exp: Delete the FIXME workaround of restarting
- the whole GDB.
-
-2007-10-05 Jan Kratochvil
-
- * gdb.cp/constructortest.exp: Test BREAKPOINT_RE_SET for multiple PCs
- by PIE.
- * gdb.cp/constructortest.exp: Handle the change of settings breakpoints
- always at all the ctor/dtor variants.
-
-[ Removed the `gdb.cp/templates.exp' patch. ]
-[ Updated the patch for "(X location") of GDB-6.8+. ]
-
---- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc.fix Fri Jan 21 17:06:56 2005
-+++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc Fri Jan 21 17:05:18 2005
+Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.cc 2011-12-19 22:05:02.825431735 +0100
@@ -0,0 +1,99 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@@ -127,8 +102,10 @@
+{
+ y = 2; /* First line D */
+}
---- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp.fix Fri Jan 21 17:07:02 2005
-+++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp Fri Jan 21 17:05:29 2005
+Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.exp 2011-12-19 23:07:24.148290893 +0100
@@ -0,0 +1,130 @@
+# This testcase is part of GDB, the GNU debugger.
+
@@ -232,7 +209,7 @@
+set define_line_dtor [gdb_get_line_number "Destructor C"]
+# Break on the various forms of the C::~C destructor
+# " ([23] locations)" is displayed depending on G++ version.
-+gdb_test "break C\:\:~C" "Breakpoint .*, line ($define_line_dtor|$define_line_dtor)\\..*" "breaking on C::~C"
++gdb_test "break C\:\:~C" "Breakpoint .*: C::~C\\. \\(2 locations\\)" "breaking on C::~C"
+gdb_continue_to_breakpoint "First line ~C"
+
+# Verify that we can break by line number in a destructor and find
++++++ gdb-6.3-test-pie-20050107.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -1,29 +1,29 @@
-Index: gdb-7.2.50.20110320/gdb/testsuite/configure.ac
+Index: gdb-7.4.50.20120602/gdb/testsuite/configure.ac
===================================================================
---- gdb-7.2.50.20110320.orig/gdb/testsuite/configure.ac 2011-03-03 17:57:55.000000000 +0100
-+++ gdb-7.2.50.20110320/gdb/testsuite/configure.ac 2011-03-20 20:21:43.000000000 +0100
-@@ -97,6 +97,6 @@ AC_OUTPUT([Makefile \
+--- gdb-7.4.50.20120602.orig/gdb/testsuite/configure.ac 2012-04-25 16:07:22.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/testsuite/configure.ac 2012-06-02 18:24:38.456266545 +0200
+@@ -96,6 +96,6 @@ AC_OUTPUT([Makefile \
gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \
- gdb.hp/gdb.defects/Makefile \
+ gdb.hp/gdb.defects/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.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
-Index: gdb-7.2.50.20110320/gdb/testsuite/configure
+Index: gdb-7.4.50.20120602/gdb/testsuite/configure
===================================================================
---- gdb-7.2.50.20110320.orig/gdb/testsuite/configure 2011-03-03 17:57:55.000000000 +0100
-+++ gdb-7.2.50.20110320/gdb/testsuite/configure 2011-03-20 20:21:43.000000000 +0100
+--- gdb-7.4.50.20120602.orig/gdb/testsuite/configure 2012-04-25 16:07:21.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/testsuite/configure 2012-06-02 18:25:06.200258240 +0200
@@ -3448,7 +3448,7 @@ done
--ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/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.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/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.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/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.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/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.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/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.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/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.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/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.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.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
-@@ -4173,6 +4173,7 @@ do
+@@ -4175,6 +4175,7 @@ do
"gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;;
"gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
"gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
@@ -31,10 +31,10 @@
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
"gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;;
-Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.c
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.c 2011-03-20 20:21:43.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach.c 2012-06-02 18:24:38.497266532 +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 +56,10 @@
+ }
+ return 0;
+}
-Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach2.c
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach2.c 2011-03-20 20:21:43.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach2.c 2012-06-02 18:24:38.504266529 +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 +85,10 @@
+ }
+ return (0);
+}
-Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.c
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.c 2011-03-20 20:21:43.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break.c 2012-06-02 18:24:38.505266529 +0200
@@ -0,0 +1,146 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@@ -236,10 +236,10 @@
+ }
+ return 0;
+}
-Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break1.c
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break1.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break1.c 2011-03-20 20:21:43.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break1.c 2012-06-02 18:24:38.506266530 +0200
@@ -0,0 +1,44 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@@ -285,10 +285,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.2.50.20110320/gdb/testsuite/gdb.pie/coremaker.c
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/coremaker.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/coremaker.c 2011-03-20 20:21:43.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/coremaker.c 2012-06-02 18:24:38.506266530 +0200
@@ -0,0 +1,142 @@
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
+ Free Software Foundation, Inc.
@@ -432,10 +432,10 @@
+ return 0;
+}
+
-Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.exp
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.exp 2011-03-20 20:25:53.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/attach.exp 2012-06-02 18:24:38.508266531 +0200
@@ -0,0 +1,417 @@
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
+
@@ -854,11 +854,11 @@
+do_call_attach_tests
+
+return 0
-Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.exp
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.exp 2011-03-20 20:21:43.000000000 +0100
-@@ -0,0 +1,966 @@
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/break.exp 2012-06-02 18:24:38.510266529 +0200
+@@ -0,0 +1,962 @@
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2002, 2003, 2004
+# Free Software Foundation, Inc.
@@ -1246,14 +1246,10 @@
+# Verify that GDB responds gracefully when asked to set a breakpoint
+# on a nonexistent source line.
+#
-+send_gdb "break 999\n"
-+gdb_expect {
-+ -re "No line 999 in file .*$gdb_prompt $"\
-+ {pass "break on non-existent source line"}
-+ -re "$gdb_prompt $"\
-+ {fail "break on non-existent source line"}
-+ timeout {fail "(timeout) break on non-existent source line"}
-+}
++gdb_test_no_output "set breakpoint pending off"
++gdb_test "break 999" \
++ "No line 999 in the current file." \
++ "break on non-existent source line"
+
+# Run to the desired default location. If not positioned here, the
+# tests below don't work.
@@ -1378,7 +1374,7 @@
+#
+send_gdb "break $bp_location12 foo\n"
+gdb_expect {
-+ -re "Junk at end of arguments..*$gdb_prompt $"\
++ -re "malformed linespec error: unexpected string, \"foo\"\r\n$gdb_prompt $"\
+ {pass "breakpoint with trailing garbage disallowed"}
+ -re "$gdb_prompt $"\
+ {fail "breakpoint with trailing garbage disallowed"}
@@ -1825,10 +1821,10 @@
+ send_gdb "set args main\n"
+ gdb_expect -re ".*$gdb_prompt $" {}
+}
-Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/corefile.exp
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/corefile.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/corefile.exp 2011-03-20 20:21:43.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/corefile.exp 2012-06-02 18:24:38.511266528 +0200
@@ -0,0 +1,233 @@
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc.
@@ -2063,10 +2059,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.2.50.20110320/gdb/testsuite/gdb.pie/Makefile.in
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/Makefile.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/Makefile.in 2011-03-20 20:21:43.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.pie/Makefile.in 2012-06-02 18:24:38.512266527 +0200
@@ -0,0 +1,19 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
++++++ gdb-6.3-threaded-watchpoints2-20050225.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -32,17 +32,20 @@
(amd64_linux_hw_breakpoint, amd64_linux_remove_hw_breakpoint): Ditto.
(amd64_linux_new_thread): Ditto.
(_initialize_amd64_linux_nat): Register linux new thread observer.
- * testsuite/gdb.threads/watchthreads2.c: New test case.
- * testsuite/gdb.threads/watchthreads2.exp: Ditto.
+ * testsuite/gdb.threads/watchthreads-threaded.c: New test case.
+ * testsuite/gdb.threads/watchthreads-threaded.exp: Ditto.
[ With recent upstream GDB (6.8) reduced only to the testcase. ]
+[ It was called watchthreads2.{exp,c} before but it conflicted with FSF GDB new
+ testcase of the same name. ]
+
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
-Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
+Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads-threaded.c 2006-07-12 01:54:29.000000000 -0300
++++ gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.c 2011-12-19 22:05:02.867431570 +0100
@@ -0,0 +1,66 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@@ -110,10 +113,10 @@
+ pthread_exit(NULL);
+}
+
-Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
+Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads-threaded.exp 2006-07-12 01:54:29.000000000 -0300
++++ gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.exp 2011-12-19 22:28:33.294911982 +0100
@@ -0,0 +1,126 @@
+# This testcase is part of GDB, the GNU debugger.
+
@@ -141,7 +144,7 @@
+ return 0;
+}
+
-+set testfile "watchthreads2"
++set testfile "watchthreads-threaded"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
@@ -198,13 +201,13 @@
+for {set i 0} {$i < 30} {incr i} {
+ set test_flag 0
+ gdb_test_multiple "continue" "threaded watch loop" {
-+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads2.c:$init_line.*$gdb_prompt $"
++ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
+ { set args_2 1; set test_flag 1 }
-+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads2.c:$init_line.*$gdb_prompt $"
++ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
+ { set args_3 1; set test_flag 1 }
-+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = $args_2.*New value = [expr $args_2+1].*in thread_function \\\(arg=0x2\\\) at .*watchthreads2.c:$inc_line.*$gdb_prompt $"
++ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = $args_2.*New value = [expr $args_2+1].*in thread_function \\\(arg=0x2\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
+ { set args_2 [expr $args_2+1]; set test_flag 1 }
-+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = $args_3.*New value = [expr $args_3+1].*in thread_function \\\(arg=0x3\\\) at .*watchthreads2.c:$inc_line.*$gdb_prompt $"
++ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = $args_3.*New value = [expr $args_3+1].*in thread_function \\\(arg=0x3\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
+ { set args_3 [expr $args_3+1]; set test_flag 1 }
+ }
+ # If we fail above, don't bother continuing loop
++++++ gdb-6.5-bz203661-emit-relocs.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -1,14 +1,14 @@
-Index: gdb-7.0.90.20100306/gdb/symfile.c
+Index: gdb-7.4.50.20120602/gdb/symfile.c
===================================================================
---- gdb-7.0.90.20100306.orig/gdb/symfile.c 2010-03-06 23:20:35.000000000 +0100
-+++ gdb-7.0.90.20100306/gdb/symfile.c 2010-03-06 23:26:25.000000000 +0100
-@@ -3642,6 +3642,12 @@ default_symfile_relocate (struct objfile
- {
- bfd *abfd = objfile->obfd;
+--- gdb-7.4.50.20120602.orig/gdb/symfile.c 2012-06-02 18:25:20.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/symfile.c 2012-06-02 18:26:36.145232057 +0200
+@@ -3630,6 +3630,12 @@ default_symfile_relocate (struct objfile
+ DWO file. */
+ bfd *abfd = sectp->owner;
+ /* Executable files have all the relocations already resolved.
-+ * Handle files linked with --emit-relocs.
-+ * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */
++ Handle files linked with --emit-relocs.
++ http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */
+ if ((abfd->flags & EXEC_P) != 0)
+ return NULL;
+
++++++ gdb-6.5-bz216711-clone-is-outermost.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -23,8 +23,325 @@
Port to GDB-6.7.
+Index: gdb-7.4.50.20120602/gdb/amd64-linux-tdep.c
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/amd64-linux-tdep.c 2012-06-02 21:05:45.352280128 +0200
++++ gdb-7.4.50.20120602/gdb/amd64-linux-tdep.c 2012-06-02 21:06:25.536265325 +0200
+@@ -271,6 +271,80 @@ amd64_linux_register_reggroup_p (struct
+
+ /* Set the program counter for process PTID to PC. */
+
++/* Detect the outermost frame; during unwind of
++ #5 0x000000305cec68c3 in clone () from /lib64/tls/libc.so.6
++ avoid the additional bogus frame
++ #6 0x0000000000000000 in ??
++ We compare if the `linux_clone_code' block is _before_ unwound PC. */
++
++static const unsigned char linux_clone_code[] =
++{
++/* libc/sysdeps/unix/sysv/linux/x86_64/clone.S */
++/* #ifdef RESET_PID */
++/* ... */
++/* mov $SYS_ify(getpid), %eax */
++/* 0xb8, 0x27, 0x00, 0x00, 0x00 */
++/* OR */
++/* mov $SYS_ify(getpid), %rax */
++/* 0x48, 0xc7, 0xc0, 0x27, 0x00, 0x00, 0x00 */
++/* so just: */
++ 0x27, 0x00, 0x00, 0x00,
++/* syscall */
++ 0x0f, 0x05,
++/* movl %eax, %fs:PID */
++ 0x64, 0x89, 0x04, 0x25, 0x94, 0x00, 0x00, 0x00,
++/* movl %eax, %fs:TID */
++ 0x64, 0x89, 0x04, 0x25, 0x90, 0x00, 0x00, 0x00,
++/* #endif */
++/* |* Set up arguments for the function call. *| */
++/* popq %rax |* Function to call. *| */
++ 0x58,
++/* popq %rdi |* Argument. *| */
++ 0x5f,
++/* call *%rax$ */
++ 0xff, 0xd0
++};
++
++#define LINUX_CLONE_LEN (sizeof linux_clone_code)
++
++static int
++amd64_linux_clone_running (struct frame_info *this_frame)
++{
++ CORE_ADDR pc = get_frame_pc (this_frame);
++ unsigned char buf[LINUX_CLONE_LEN];
++
++ if (!safe_frame_unwind_memory (this_frame, pc - LINUX_CLONE_LEN, buf,
++ LINUX_CLONE_LEN))
++ return 0;
++
++ if (memcmp (buf, linux_clone_code, LINUX_CLONE_LEN) != 0)
++ return 0;
++
++ return 1;
++}
++
++static int
++amd64_linux_outermost_frame (struct frame_info *this_frame)
++{
++ CORE_ADDR pc = get_frame_pc (this_frame);
++ const char *name;
++
++ find_pc_partial_function (pc, &name, NULL, NULL);
++
++ /* If we have NAME, we can optimize the search.
++ `clone' NAME still needs to have the code checked as its name may be
++ present in the user code.
++ `__clone' NAME should not be present in the user code but in the initial
++ parts of the `__clone' implementation the unwind still makes sense.
++ More detailed unwinding decision would be too much sensitive to possible
++ subtle changes in specific glibc revisions. */
++ if (name == NULL || strcmp (name, "clone") == 0
++ || strcmp ("__clone", name) == 0)
++ return (amd64_linux_clone_running (this_frame) != 0);
++
++ return 0;
++}
++
+ static void
+ amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
+ {
+@@ -1330,6 +1404,8 @@ amd64_linux_init_abi (struct gdbarch_inf
+
+ tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET;
+
++ tdep->outermost_frame_p = amd64_linux_outermost_frame;
++
+ /* GNU/Linux uses SVR4-style shared libraries. */
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, svr4_lp64_fetch_link_map_offsets);
+Index: gdb-7.4.50.20120602/gdb/amd64-tdep.c
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/amd64-tdep.c 2012-06-02 21:05:45.352280128 +0200
++++ gdb-7.4.50.20120602/gdb/amd64-tdep.c 2012-06-02 21:06:00.437274574 +0200
+@@ -2138,6 +2138,7 @@ amd64_frame_unwind_stop_reason (struct f
+ {
+ struct amd64_frame_cache *cache =
+ amd64_frame_cache (this_frame, this_cache);
++ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
+
+ if (!cache->base_p)
+ return UNWIND_UNAVAILABLE;
+@@ -2146,6 +2147,10 @@ amd64_frame_unwind_stop_reason (struct f
+ if (cache->base == 0)
+ return UNWIND_OUTERMOST;
+
++ /* Detect OS dependent outermost frames; such as `clone'. */
++ if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame))
++ return UNWIND_OUTERMOST;
++
+ return UNWIND_NO_REASON;
+ }
+
+@@ -2155,6 +2160,7 @@ amd64_frame_this_id (struct frame_info *
+ {
+ struct amd64_frame_cache *cache =
+ amd64_frame_cache (this_frame, this_cache);
++ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
+
+ if (!cache->base_p)
+ return;
+@@ -2163,6 +2169,10 @@ amd64_frame_this_id (struct frame_info *
+ if (cache->base == 0)
+ return;
+
++ /* Detect OS dependent outermost frames; such as `clone'. */
++ if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame))
++ return;
++
+ (*this_id) = frame_id_build (cache->base + 16, cache->pc);
+ }
+
+Index: gdb-7.4.50.20120602/gdb/i386-tdep.c
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/i386-tdep.c 2012-06-02 21:05:45.352280128 +0200
++++ gdb-7.4.50.20120602/gdb/i386-tdep.c 2012-06-02 21:06:00.466274562 +0200
+@@ -7639,6 +7639,9 @@ i386_gdbarch_init (struct gdbarch_info i
+
+ tdep->xsave_xcr0_offset = -1;
+
++ /* Unwinding stops on i386 automatically. */
++ tdep->outermost_frame_p = NULL;
++
+ tdep->record_regmap = i386_record_regmap;
+
+ set_gdbarch_long_long_align_bit (gdbarch, 32);
+Index: gdb-7.4.50.20120602/gdb/i386-tdep.h
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/i386-tdep.h 2012-06-02 21:05:45.352280128 +0200
++++ gdb-7.4.50.20120602/gdb/i386-tdep.h 2012-06-02 21:06:00.486274568 +0200
+@@ -219,6 +219,9 @@ struct gdbarch_tdep
+ int (*i386_sysenter_record) (struct regcache *regcache);
+ /* Parse syscall args. */
+ int (*i386_syscall_record) (struct regcache *regcache);
++
++ /* Detect OS dependent outermost frames; such as `clone'. */
++ int (*outermost_frame_p) (struct frame_info *this_frame);
+ };
+
+ /* Floating-point registers. */
+Index: gdb-7.4.50.20120602/gdb/ia64-tdep.c
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/ia64-tdep.c 2012-06-02 21:05:45.352280128 +0200
++++ gdb-7.4.50.20120602/gdb/ia64-tdep.c 2012-06-02 21:06:00.490274552 +0200
+@@ -2176,6 +2176,138 @@ static const struct frame_unwind ia64_fr
+ default_frame_sniffer
+ };
+
++/* Detect the outermost frame; during unwind of
++ #6 0x2000000000347100 in __clone2 () from /lib/libc.so.6.1
++ avoid the additional bogus frame
++ #7 0x0000000000000000 in ?? () */
++
++static char linux_clone2_code[] =
++{
++/* libc/sysdeps/unix/sysv/linux/ia64/clone2.S */
++ 0x09, 0x00, 0x20, 0x12, 0x90, 0x11, 0x00, 0x40,
++ 0x28, 0x20, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00,
++/* st4 [r9]=r8 */
++/* st4 [r10]=r8 */
++/* ;; */
++/* #endif */
++ 0x02, 0x50, 0x21, 0x40, 0x18, 0x14, 0x90, 0x02,
++ 0x90, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00,
++/* 1: ld8 out1=[in0],8 |* Retrieve code pointer. *| */
++/* mov out0=in4 |* Pass proper argument to fn *| */
++/* ;; */
++ 0x11, 0x08, 0x00, 0x40, 0x18, 0x10, 0x60, 0x50,
++ 0x05, 0x80, 0x03, 0x00, 0x68, 0x00, 0x80, 0x12,
++/* ld8 gp=[in0] |* Load function gp. *| */
++/* mov b6=out1 */
++/* br.call.dptk.many rp=b6 |* Call fn(arg) in the child *| */
++/* ;; */
++ 0x10, 0x48, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00,
++ 0xa0, 0x00, 0x42, 0x00, 0x98, 0xdf, 0xf7, 0x5b,
++/* mov out0=r8 |* Argument to _exit *| */
++/* mov gp=loc0 */
++/* .globl HIDDEN_JUMPTARGET(_exit) */
++/* br.call.dpnt.many rp=HIDDEN_JUMPTARGET(_exit) */
++/* |* call _exit with result from fn. *| */
++ 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
++ 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x84, 0x00
++/* ret |* Not reached. *| */
++};
++
++#define LINUX_CLONE_PRE_SLOTS 3 /* Number of slots before PC. */
++#define LINUX_CLONE_LEN (sizeof linux_clone2_code)
++
++static int
++ia64_linux_clone2_running (struct frame_info *this_frame)
++{
++ CORE_ADDR pc = get_frame_pc (this_frame);
++ char buf[LINUX_CLONE_LEN];
++ struct minimal_symbol *minsym;
++ long long instr;
++
++ if (!safe_frame_unwind_memory (this_frame, pc - LINUX_CLONE_PRE_SLOTS * 16,
++ buf, LINUX_CLONE_LEN))
++ return 0;
++
++ if (memcmp (buf, linux_clone2_code, LINUX_CLONE_PRE_SLOTS * 16) != 0)
++ return 0;
++
++ /* Adjust the expected "_exit" address. */
++ minsym = lookup_minimal_symbol_text ("_exit", NULL);
++ if (minsym == NULL)
++ return 0;
++
++ instr = slotN_contents (&linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16], 2);
++ instr &= ~(((1L << 20) - 1) << 13);
++ /* Address is relative to the jump instruction slot, not the next one. */
++ instr |= (((SYMBOL_VALUE_ADDRESS (minsym) - (pc & ~0xfL)) >> 4)
++ & ((1L << 20) - 1)) << 13;
++ replace_slotN_contents (&linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16], instr,
++ 2);
++
++ if (memcmp (&buf[LINUX_CLONE_PRE_SLOTS * 16],
++ &linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16],
++ LINUX_CLONE_LEN - (LINUX_CLONE_PRE_SLOTS * 16)) != 0)
++ return 0;
++
++ return 1;
++}
++
++static int
++ia64_outermost_frame (struct frame_info *this_frame)
++{
++ CORE_ADDR pc = get_frame_pc (this_frame);
++ char *name;
++
++ find_pc_partial_function (pc, &name, NULL, NULL);
++
++ /* If we have NAME, we can optimize the search.
++ `clone' NAME still needs to have the code checked as its name may be
++ present in the user code.
++ `__clone' NAME should not be present in the user code but in the initial
++ parts of the `__clone' implementation the unwind still makes sense.
++ More detailed unwinding decision would be too much sensitive to possible
++ subtle changes in specific glibc revisions. */
++ if (name == NULL || strcmp (name, "clone2") == 0
++ || strcmp ("__clone2", name) == 0)
++ return (ia64_linux_clone2_running (this_frame) != 0);
++
++ return 0;
++}
++
++static void
++ia64_clone2_frame_this_id (struct frame_info *this_frame, void **this_cache,
++ struct frame_id *this_id)
++{
++ /* Leave the default outermost frame at *THIS_ID. */
++}
++
++static struct value *
++ia64_clone2_frame_prev_register (struct frame_info *this_frame,
++ void **this_cache, int regnum)
++{
++ return frame_unwind_got_register (this_frame, regnum, regnum);
++}
++
++static int
++ia64_clone2_frame_sniffer (const struct frame_unwind *self,
++ struct frame_info *this_frame,
++ void **this_prologue_cache)
++{
++ if (ia64_outermost_frame (this_frame))
++ return 1;
++
++ return 0;
++}
++
++static const struct frame_unwind ia64_clone2_frame_unwind =
++{
++ NORMAL_FRAME,
++ &ia64_clone2_frame_this_id,
++ &ia64_clone2_frame_prev_register,
++ NULL,
++ &ia64_clone2_frame_sniffer
++};
++
+ /* Signal trampolines. */
+
+ static void
+@@ -4146,6 +4278,7 @@ ia64_gdbarch_init (struct gdbarch_info i
+ set_gdbarch_dummy_id (gdbarch, ia64_dummy_id);
+
+ set_gdbarch_unwind_pc (gdbarch, ia64_unwind_pc);
++ frame_unwind_append_unwinder (gdbarch, &ia64_clone2_frame_unwind);
+ #ifdef HAVE_LIBUNWIND_IA64_H
+ frame_unwind_append_unwinder (gdbarch,
+ &ia64_libunwind_sigtramp_frame_unwind);
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/bt-clone-stop.c
+===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.threads/bt-clone-stop.c 2009-08-03 15:50:08.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/bt-clone-stop.c 2012-06-02 21:06:00.514274544 +0200
@@ -0,0 +1,39 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@@ -65,10 +382,10 @@
+ for (;;)
+ pause();
+}
-Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.threads/bt-clone-stop.exp
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/bt-clone-stop.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2009-08-03 15:50:08.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2012-06-02 21:06:00.515274547 +0200
@@ -0,0 +1,61 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
++++++ gdb-6.6-bfd-vdso8k.patch ++++++
2007-09-23 Jan Kratochvil
* elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New variables
X_SHDR_SHSTRTAB and I_SHDR_SHSTRTAB. Fixed the CONTENTS_SIZE trimming
check for its aligned size between the last segment and still before
the section header end. Added variables check to cover also the
section header string table.
--- gdb-7.4.50.20120120-orig/bfd/elfcode.h 2012-02-29 09:17:08.000000000 +0100
+++ gdb-7.4.50.20120120/bfd/elfcode.h 2012-02-29 10:23:03.000000000 +0100
@@ -1621,6 +1621,8 @@ NAME(_bfd_elf,bfd_from_remote_memory)
Elf_Internal_Ehdr i_ehdr; /* Elf file header, internal form */
Elf_External_Phdr *x_phdrs;
Elf_Internal_Phdr *i_phdrs, *last_phdr;
+ Elf_External_Shdr *x_shdrs;
+ Elf_Internal_Shdr *i_shdrs;
bfd *nbfd;
struct bfd_in_memory *bim;
int contents_size;
@@ -1740,24 +1742,46 @@ NAME(_bfd_elf,bfd_from_remote_memory)
/* Trim the last segment so we don't bother with zeros in the last page
that are off the end of the file. However, if the extra bit in that
- page includes the section headers, keep them. */
- if ((bfd_vma) contents_size > last_phdr->p_offset + last_phdr->p_filesz
- && (bfd_vma) contents_size >= (i_ehdr.e_shoff
- + i_ehdr.e_shnum * i_ehdr.e_shentsize))
+ page includes the section headers os the section header string table,
+ keep them. */
+ if ((bfd_vma) contents_size > last_phdr->p_offset + last_phdr->p_filesz)
+ contents_size = last_phdr->p_offset + last_phdr->p_filesz;
+
+ if ((bfd_vma) contents_size < i_ehdr.e_shoff
+ + i_ehdr.e_shnum * i_ehdr.e_shentsize)
+ contents_size = i_ehdr.e_shoff + i_ehdr.e_shnum * i_ehdr.e_shentsize;
+
+ /* Verify also all the sections fit into CONTENTS_SIZE. */
+
+ x_shdrs = bfd_malloc (i_ehdr.e_shnum * (sizeof *x_shdrs + sizeof *i_shdrs));
+ if (x_shdrs == NULL)
{
- contents_size = last_phdr->p_offset + last_phdr->p_filesz;
- if ((bfd_vma) contents_size < (i_ehdr.e_shoff
- + i_ehdr.e_shnum * i_ehdr.e_shentsize))
- contents_size = i_ehdr.e_shoff + i_ehdr.e_shnum * i_ehdr.e_shentsize;
+ free (x_phdrs);
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
}
+ err = target_read_memory (ehdr_vma + i_ehdr.e_shoff, (bfd_byte *) x_shdrs,
+ i_ehdr.e_shnum * sizeof *x_shdrs);
+ if (err)
+ i_shdrs = NULL;
else
- contents_size = last_phdr->p_offset + last_phdr->p_filesz;
+ {
+ i_shdrs = (Elf_Internal_Shdr *) &x_shdrs[i_ehdr.e_shnum];
+ for (i = 0; i < i_ehdr.e_shnum; ++i)
+ {
+ elf_swap_shdr_in (templ, &x_shdrs[i], &i_shdrs[i]);
+
+ if ((bfd_vma) contents_size < i_shdrs[i].sh_offset + i_shdrs[i].sh_size)
+ contents_size = i_shdrs[i].sh_offset + i_shdrs[i].sh_size;
+ }
+ }
/* Now we know the size of the whole image we want read in. */
contents = (bfd_byte *) bfd_zmalloc (contents_size);
if (contents == NULL)
{
free (x_phdrs);
+ free (x_shdrs);
bfd_set_error (bfd_error_no_memory);
return NULL;
}
@@ -1776,6 +1800,7 @@ NAME(_bfd_elf,bfd_from_remote_memory)
if (err)
{
free (x_phdrs);
+ free (x_shdrs);
free (contents);
bfd_set_error (bfd_error_system_call);
errno = err;
@@ -1784,10 +1809,32 @@ NAME(_bfd_elf,bfd_from_remote_memory)
}
free (x_phdrs);
- /* If the segments visible in memory didn't include the section headers,
+ if (i_shdrs)
+ {
+ memcpy (contents + i_ehdr.e_shoff, x_shdrs,
+ i_ehdr.e_shnum * sizeof *x_shdrs);
+
+ for (i = 0; i < i_ehdr.e_shnum; ++i)
+ {
+ bfd_vma start = i_shdrs[i].sh_offset;
+ bfd_vma end = i_shdrs[i].sh_offset + i_shdrs[i].sh_size;
+
+ if (end > (bfd_vma) contents_size)
+ end = contents_size;
+ err = target_read_memory (ehdr_vma + start, contents + start,
+ end - start);
+ if (err)
+ {
+ i_shdrs = NULL;
+ break;
+ }
+ }
+ }
+ free (x_shdrs);
+
+ /* If the segments readable in memory didn't include the section headers,
then clear them from the file header. */
- if ((bfd_vma) contents_size < (i_ehdr.e_shoff
- + i_ehdr.e_shnum * i_ehdr.e_shentsize))
+ if (i_shdrs == NULL)
{
memset (&x_ehdr.e_shoff, 0, sizeof x_ehdr.e_shoff);
memset (&x_ehdr.e_shnum, 0, sizeof x_ehdr.e_shnum);
++++++ gdb-6.6-buildid-locate-rpm-librpm-workaround.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -1,6 +1,8 @@
---- ./gdb/elfread.c 2010-10-14 17:07:45.000000000 +0200
-+++ ./gdb/elfread.c 2010-10-14 17:06:30.000000000 +0200
-@@ -1382,6 +1382,18 @@ build_id_to_filename (struct build_id *b
+Index: gdb-7.4.50.20120602/gdb/elfread.c
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/elfread.c 2012-06-02 21:35:09.669510757 +0200
++++ gdb-7.4.50.20120602/gdb/elfread.c 2012-06-02 21:35:31.106502660 +0200
+@@ -1658,6 +1658,19 @@ build_id_to_filename (struct build_id *b
#include
#endif
@@ -10,6 +12,7 @@
+ Enable or disable a signal handler. SIGNUM: signal to enable (or disable
+ if negative). HANDLER: sa_sigaction handler (or NULL to use
+ rpmsqHandler()). Returns: no. of refs, -1 on error. */
++extern int rpmsqEnable (int signum, /* rpmsqAction_t handler */ void *handler);
+int
+rpmsqEnable (int signum, /* rpmsqAction_t handler */ void *handler)
+{
@@ -19,8 +22,10 @@
/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files
and avoid their duplicities during a single inferior run. */
---- ./gdb/proc-service.list 2010-05-28 20:50:30.000000000 +0200
-+++ ./gdb/proc-service.list 2010-10-14 17:06:30.000000000 +0200
+Index: gdb-7.4.50.20120602/gdb/proc-service.list
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/proc-service.list 2012-06-02 21:35:09.669510757 +0200
++++ gdb-7.4.50.20120602/gdb/proc-service.list 2012-06-02 21:35:14.296508989 +0200
@@ -37,4 +37,7 @@
ps_pstop;
ps_ptread;
++++++ gdb-6.6-buildid-locate-rpm-suse.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -1,28 +1,105 @@
-Index: gdb-7.1/gdb/elfread.c
+Index: gdb-7.4.50.20120603/gdb/elfread.c
===================================================================
-*** gdb-7.1.orig/gdb/elfread.c 2010-04-15 14:46:14.000000000 +0200
---- gdb-7.1/gdb/elfread.c 2010-04-15 14:50:17.000000000 +0200
-*************** debug_print_missing (const char *binary,
-*** 1625,1633 ****
- fprintf_unfiltered (gdb_stdlog,
- _("Missing separate debuginfo for %s\n"), binary);
- if (debug != NULL)
-! fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
-! "yum --disablerepo='*' --enablerepo='*-debuginfo'"
-! " install", debug);
- }
- }
-
---- 1625,1636 ----
- fprintf_unfiltered (gdb_stdlog,
- _("Missing separate debuginfo for %s\n"), binary);
- if (debug != NULL)
-! {
-! const char *p = strrchr (debug, '/');
-! fprintf_unfiltered (gdb_stdlog, _("Try: %s%.2s%.38s\"\n"),
-! "zypper install -C \"debuginfo(build-id)=",
-! p - 2, p + 1);
-! }
- }
- }
-
+--- gdb-7.4.50.20120603.orig/gdb/elfread.c 2012-06-12 15:12:05.000000000 +0200
++++ gdb-7.4.50.20120603/gdb/elfread.c 2012-06-12 15:13:39.678712939 +0200
+@@ -1809,9 +1809,9 @@ missing_rpm_enlist (const char *filename
+ if (h == NULL)
+ break;
+
+- /* Verify the debuginfo file is not already installed. */
+-
+- debuginfo = headerFormat_p (h, "%{sourcerpm}-debuginfo.%{arch}",
++ /* The allocated memory gets utilized below for MISSING_RPM_HASH. */
++ debuginfo = headerFormat_p (h,
++ "%{name}-debuginfo-%{version}-%{release}.%{arch}",
+ &err);
+ if (!debuginfo)
+ {
+@@ -1819,60 +1819,19 @@ missing_rpm_enlist (const char *filename
+ err);
+ continue;
+ }
+- /* s = `.src.rpm-debuginfo.%{arch}' */
+- s = strrchr (debuginfo, '-') - srcrpmlen;
+- s2 = NULL;
+- if (s > debuginfo && memcmp (s, ".src.rpm", srcrpmlen) == 0)
+- {
+- /* s2 = `-%{release}.src.rpm-debuginfo.%{arch}' */
+- s2 = memrchr (debuginfo, '-', s - debuginfo);
+- }
+- if (s2)
+- {
+- /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
+- s2 = memrchr (debuginfo, '-', s2 - debuginfo);
+- }
+- if (!s2)
+- {
+- warning (_("Error querying the rpm file `%s': %s"), filename,
+- debuginfo);
+- xfree (debuginfo);
+- continue;
+- }
+- /* s = `.src.rpm-debuginfo.%{arch}' */
+- /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
+- memmove (s2 + debuginfolen, s2, s - s2);
+- memcpy (s2, "-debuginfo", debuginfolen);
+- /* s = `XXXX.%{arch}' */
+- /* strlen ("XXXX") == srcrpmlen + debuginfolen */
+- /* s2 = `-debuginfo-%{version}-%{release}XX.%{arch}' */
+- /* strlen ("XX") == srcrpmlen */
+- memmove (s + debuginfolen, s + srcrpmlen + debuginfolen,
+- strlen (s + srcrpmlen + debuginfolen) + 1);
+- /* s = `-debuginfo-%{version}-%{release}.%{arch}' */
+
++ /* Verify the debuginfo file is not already installed. */
+ /* RPMDBI_PACKAGES requires keylen == sizeof (int). */
+ /* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */
+ mi_debuginfo = rpmtsInitIterator_p (ts, RPMDBI_LABEL, debuginfo, 0);
+- xfree (debuginfo);
+ if (mi_debuginfo)
+ {
++ xfree (debuginfo);
+ rpmdbFreeIterator_p (mi_debuginfo);
+ count = 0;
+ break;
+ }
+
+- /* The allocated memory gets utilized below for MISSING_RPM_HASH. */
+- debuginfo = headerFormat_p (h,
+- "%{name}-%{version}-%{release}.%{arch}",
+- &err);
+- if (!debuginfo)
+- {
+- warning (_("Error querying the rpm file `%s': %s"), filename,
+- err);
+- continue;
+- }
+-
+ /* Base package name for `debuginfo-install'. We do not use the
+ `yum' command directly as the line
+ yum --disablerepo='*' --enablerepo='*debug*' \
+@@ -1958,7 +1917,7 @@ missing_rpm_list_print (void)
+ (int (*) (const void *, const void *)) missing_rpm_list_compar);
+
+ printf_unfiltered (_("Missing separate debuginfos, use: %s"),
+- "debuginfo-install");
++ "zypper install");
+ for (array_iter = array; array_iter < array + missing_rpm_list_entries;
+ array_iter++)
+ {
+@@ -2171,9 +2130,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 --disablerepo='*' --enablerepo='*debug*'"
+- " install", debug);
++ {
++ const char *p = strrchr (debug, '/');
++ fprintf_unfiltered (gdb_stdlog, _("Try: %s%.2s%.38s\"\n"),
++ "zypper install -C \"debuginfo(build-id)=",
++ p - 2, p + 1);
++ }
+ }
+ }
+
++++++ gdb-6.6-buildid-locate-rpm.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -1,25 +1,25 @@
-Index: gdb-7.2.90.20110429/gdb/event-top.c
+Index: gdb-7.4.50.20120602/gdb/event-top.c
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/event-top.c 2011-03-16 16:18:58.000000000 +0100
-+++ gdb-7.2.90.20110429/gdb/event-top.c 2011-05-03 05:21:11.000000000 +0200
-@@ -33,6 +33,7 @@
- #include "cli/cli-script.h" /* for reset_command_nest_depth */
- #include "main.h"
- #include "gdbthread.h"
+--- gdb-7.4.50.20120602.orig/gdb/event-top.c 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/event-top.c 2012-06-02 21:08:23.479221885 +0200
+@@ -36,6 +36,7 @@
+ #include "observer.h"
+ #include "continuations.h"
+ #include "gdbcmd.h" /* for dont_repeat() */
+#include "symfile.h"
- #include "gdbcmd.h" /* for dont_repeat() */
+ /* readline include files. */
+ #include "readline/readline.h"
+@@ -176,6 +177,8 @@ rl_callback_read_char_wrapper (gdb_clien
+ void
+ cli_command_loop (void)
+ {
++ debug_flush_missing ();
++
+ display_gdb_prompt (0);
-@@ -192,6 +193,8 @@ cli_command_loop (void)
- char *a_prompt;
- char *gdb_prompt = get_prompt ();
-
-+ debug_flush_missing ();
-+
- /* Tell readline what the prompt to display is and what function
- it will need to call after a whole line is read. This also
- displays the first prompt. */
-@@ -263,6 +266,8 @@ display_gdb_prompt (char *new_prompt)
+ /* Now it's time to start the event loop. */
+@@ -241,6 +244,8 @@ display_gdb_prompt (char *new_prompt)
/* Reset the nesting depth used when trace-commands is set. */
reset_command_nest_depth ();
@@ -28,11 +28,11 @@
/* Each interpreter has its own rules on displaying the command
prompt. */
if (!current_interp_display_prompt_p ())
-Index: gdb-7.2.90.20110429/gdb/elfread.c
+Index: gdb-7.4.50.20120602/gdb/elfread.c
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/elfread.c 2011-05-03 05:19:27.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/elfread.c 2011-05-03 05:21:22.000000000 +0200
-@@ -53,6 +53,7 @@
+--- gdb-7.4.50.20120602.orig/gdb/elfread.c 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/elfread.c 2012-06-02 21:08:23.482221882 +0200
+@@ -48,6 +48,7 @@
#include "gdbcore.h"
#include "gdbcmd.h"
#include "observer.h"
@@ -40,7 +40,7 @@
#include
extern void _initialize_elfread (void);
-@@ -1655,8 +1656,361 @@ build_id_to_filename (struct build_id *b
+@@ -1647,8 +1648,361 @@ build_id_to_filename (struct build_id *b
return retval;
}
@@ -258,7 +258,7 @@
+
+ /* Base package name for `debuginfo-install'. We do not use the
+ `yum' command directly as the line
-+ yum --disablerepo='*' --enablerepo='*-debuginfo' \
++ yum --disablerepo='*' --enablerepo='*debug*' \
+ install NAME-debuginfo.ARCH
+ would be more complicated than just:
+ debuginfo-install NAME-VERSION-RELEASE.ARCH
@@ -399,11 +399,11 @@
+
/* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages
- Try to install the hash file ...
-+ yum --disablerepo='*' --enablerepo='*-debuginfo' install ...
++ yum --disablerepo='*' --enablerepo='*debug*' install ...
avoidance. */
struct missing_filepair
-@@ -1710,11 +2064,17 @@ missing_filepair_change (void)
+@@ -1702,11 +2056,17 @@ missing_filepair_change (void)
/* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL;
}
@@ -421,7 +421,7 @@
missing_filepair_change ();
}
-@@ -1781,14 +2141,35 @@ debug_print_missing (const char *binary,
+@@ -1773,14 +2133,35 @@ debug_print_missing (const char *binary,
*slot = missing_filepair;
@@ -458,17 +458,17 @@
+ _("Missing separate debuginfo for %s\n"), binary);
+ if (debug != NULL)
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
-+ "yum --disablerepo='*' --enablerepo='*-debuginfo'"
++ "yum --disablerepo='*' --enablerepo='*debug*'"
+ " install", debug);
+ }
}
static char *
-Index: gdb-7.2.90.20110429/gdb/symfile.h
+Index: gdb-7.4.50.20120602/gdb/symfile.h
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/symfile.h 2011-05-03 05:14:57.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/symfile.h 2011-05-03 05:21:11.000000000 +0200
-@@ -611,6 +611,8 @@ extern struct build_id *build_id_addr_ge
+--- gdb-7.4.50.20120602.orig/gdb/symfile.h 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/symfile.h 2012-06-02 21:08:23.499221877 +0200
+@@ -621,6 +621,8 @@ extern struct build_id *build_id_addr_ge
extern char *build_id_to_filename (struct build_id *build_id,
char **link_return, int add_debug_suffix);
extern void debug_print_missing (const char *binary, const char *debug);
@@ -477,11 +477,11 @@
/* From dwarf2read.c */
-Index: gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/testsuite/lib/gdb.exp 2011-05-03 05:14:57.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp 2011-05-03 05:21:11.000000000 +0200
-@@ -1381,7 +1381,7 @@ proc default_gdb_start { } {
+--- gdb-7.4.50.20120602.orig/gdb/testsuite/lib/gdb.exp 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp 2012-06-02 21:08:23.510221873 +0200
+@@ -1388,7 +1388,7 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
}
@@ -490,24 +490,24 @@
send_gdb "set build-id-verbose 0\n"
gdb_expect 10 {
-re "$gdb_prompt $" {
-Index: gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.4.50.20120602/gdb/testsuite/lib/mi-support.exp
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/testsuite/lib/mi-support.exp 2011-05-03 05:14:57.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp 2011-05-03 05:21:11.000000000 +0200
-@@ -221,7 +221,7 @@ proc default_mi_gdb_start { args } {
- }
- }
+--- gdb-7.4.50.20120602.orig/gdb/testsuite/lib/mi-support.exp 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/testsuite/lib/mi-support.exp 2012-06-02 21:08:23.523221869 +0200
+@@ -213,7 +213,7 @@ proc default_mi_gdb_start { args } {
+ warning "Couldn't set the width to 0."
+ }
}
- # Turn off the missing warnings as the testsuite does not expect it.
+ # Turn off the missing RPMs warnings as the testsuite does not expect it.
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.2.90.20110429/gdb/tui/tui-interp.c
+Index: gdb-7.4.50.20120602/gdb/tui/tui-interp.c
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/tui/tui-interp.c 2011-01-01 16:33:52.000000000 +0100
-+++ gdb-7.2.90.20110429/gdb/tui/tui-interp.c 2011-05-03 05:21:11.000000000 +0200
-@@ -31,6 +31,7 @@
+--- gdb-7.4.50.20120602.orig/gdb/tui/tui-interp.c 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/tui/tui-interp.c 2012-06-02 21:08:23.524221869 +0200
+@@ -30,6 +30,7 @@
#include "tui/tui.h"
#include "tui/tui-io.h"
#include "exceptions.h"
@@ -515,24 +515,16 @@
/* Set to 1 when the TUI mode must be activated when we first start
gdb. */
-@@ -147,6 +148,8 @@ tui_command_loop (void *data)
- char *a_prompt;
- char *gdb_prompt = get_prompt ();
-
-+ debug_flush_missing ();
-+
- /* Tell readline what the prompt to display is and what function
- it will need to call after a whole line is read. This also
- displays the first prompt. */
-Index: gdb-7.2.90.20110429/gdb/aclocal.m4
+Index: gdb-7.4.50.20120602/gdb/aclocal.m4
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/aclocal.m4 2011-02-15 22:05:53.000000000 +0100
-+++ gdb-7.2.90.20110429/gdb/aclocal.m4 2011-05-03 05:21:11.000000000 +0200
-@@ -19,6 +19,162 @@ You have another version of autoconf. I
- If you have problems, you may need to regenerate the build system entirely.
- To do so, use the procedure documented by the package, typically `autoreconf'.])])
+--- gdb-7.4.50.20120602.orig/gdb/aclocal.m4 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/aclocal.m4 2012-06-02 21:08:23.545221858 +0200
+@@ -11,6 +11,164 @@
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
++# serial 1 (pkg-config-0.24)
+#
+# Copyright © 2004 Scott James Remnant .
+#
@@ -560,7 +552,10 @@
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
++AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
++AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
++AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
++
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
@@ -573,7 +568,6 @@
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
-+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
@@ -582,21 +576,20 @@
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
-+#
-+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-+# this or PKG_CHECK_MODULES is called, or make sure to call
-+# PKG_CHECK_EXISTS manually
++# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
++# only at the first occurence in configure.ac, so if the first place
++# it's called might be skipped (such as if it is within an "if", you
++# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-+ m4_ifval([$2], [$2], [:])
++ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
-+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
@@ -649,6 +642,7 @@
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
++ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
@@ -658,7 +652,7 @@
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
-+ ifelse([$4], , [AC_MSG_ERROR(dnl
++ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
@@ -666,36 +660,35 @@
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
-+_PKG_TEXT
-+])],
-+ [AC_MSG_RESULT([no])
-+ $4])
++_PKG_TEXT])
++ ])
+elif test $pkg_failed = untried; then
-+ ifelse([$4], , [AC_MSG_FAILURE(dnl
++ AC_MSG_RESULT([no])
++ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
-+To get pkg-config, see http://pkg-config.freedesktop.org/.])],
-+ [$4])
++To get pkg-config, see http://pkg-config.freedesktop.org/.])
++ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
-+ ifelse([$3], , :, [$3])
++ $3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
- # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
- #
- # This file is free software; the Free Software Foundation
-Index: gdb-7.2.90.20110429/gdb/config.in
+ # AM_CONDITIONAL -*- Autoconf -*-
+
+ # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+Index: gdb-7.4.50.20120602/gdb/config.in
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/config.in 2011-03-17 14:19:09.000000000 +0100
-+++ gdb-7.2.90.20110429/gdb/config.in 2011-05-03 05:21:11.000000000 +0200
-@@ -46,6 +46,9 @@
+--- gdb-7.4.50.20120602.orig/gdb/config.in 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/config.in 2012-06-02 21:08:23.546221859 +0200
+@@ -36,6 +36,9 @@
/* Define to BFD's default target vector. */
#undef DEFAULT_BFD_VEC
@@ -705,70 +698,78 @@
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
-@@ -233,6 +236,9 @@
+@@ -216,6 +219,9 @@
/* Define if Python 2.7 is being used. */
#undef HAVE_LIBPYTHON2_7
+/* Define if librpm library is being used. */
+#undef HAVE_LIBRPM
+
- /* Define if libunwind library is being used. */
- #undef HAVE_LIBUNWIND
+ /* Define to 1 if you have the header file. */
+ #undef HAVE_LIBUNWIND_IA64_H
-Index: gdb-7.2.90.20110429/gdb/configure
+Index: gdb-7.4.50.20120602/gdb/configure
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/configure 2011-04-03 18:32:40.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/configure 2011-05-03 05:21:11.000000000 +0200
-@@ -682,6 +682,9 @@ REPORT_BUGS_TO
+--- gdb-7.4.50.20120602.orig/gdb/configure 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/configure 2012-06-02 21:20:53.245838121 +0200
+@@ -680,6 +680,11 @@ REPORT_BUGS_TO
PKGVERSION
TARGET_OBS
subdirs
+RPM_LIBS
+RPM_CFLAGS
++PKG_CONFIG_LIBDIR
++PKG_CONFIG_PATH
+PKG_CONFIG
GDB_DATADIR
DEBUGDIR
- am__fastdepCC_FALSE
-@@ -948,6 +951,7 @@ enable_dependency_tracking
- with_separate_debug_dir
- with_gdb_datadir
+ MAKEINFO_EXTRA_FLAGS
+@@ -780,6 +785,7 @@ with_gdb_datadir
with_relocated_sources
+ with_auto_load_dir
+ with_auto_load_safe_path
+with_rpm
enable_targets
enable_64_bit_bfd
enable_gdbcli
-@@ -989,6 +993,9 @@ LDFLAGS
- LIBS
- CPPFLAGS
+@@ -825,6 +831,11 @@ CPPFLAGS
CPP
+ MAKEINFO
+ MAKEINFOFLAGS
+PKG_CONFIG
++PKG_CONFIG_PATH
++PKG_CONFIG_LIBDIR
+RPM_CFLAGS
+RPM_LIBS
YACC
YFLAGS
XMKMF'
-@@ -1652,6 +1659,8 @@ Optional Packages:
- [DATADIR/gdb]
- --with-relocated-sources=PATH
- automatically relocate this path for source files
+@@ -1494,6 +1505,8 @@ Optional Packages:
+ [--with-auto-load-dir]
+ --without-auto-load-safe-path
+ do not restrict auto-loaded files locations
+ --with-rpm query rpm database for missing debuginfos (yes/no,
+ def. auto=librpm.so)
- --with-libunwind use libunwind frame unwinding support
+ --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
--with-curses use the curses library instead of the termcap
library
-@@ -1687,6 +1696,9 @@ Some influential environment variables:
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
- CPP C preprocessor
+@@ -1535,6 +1548,13 @@ Some influential environment variables:
+ MAKEINFO Parent configure detects if it is of sufficient version.
+ MAKEINFOFLAGS
+ Parameters for MAKEINFO.
+ PKG_CONFIG path to pkg-config utility
++ PKG_CONFIG_PATH
++ directories to add to pkg-config's search path
++ PKG_CONFIG_LIBDIR
++ path overriding pkg-config's built-in search path
+ RPM_CFLAGS C compiler flags for RPM, overriding pkg-config
+ RPM_LIBS linker flags for RPM, overriding pkg-config
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.
-@@ -7884,6 +7896,486 @@ _ACEOF
- fi
-
+@@ -5015,6 +5035,491 @@ _ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
+ $as_echo "$with_auto_load_safe_path" >&6; }
+# Integration with rpm library to support missing debuginfo suggestions.
+# --without-rpm: Disable any rpm support.
@@ -997,6 +998,10 @@
+ fi
+
+
++
++
++
++
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@@ -1109,7 +1114,6 @@
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
-+
+fi
+
+pkg_failed=no
@@ -1152,6 +1156,8 @@
+
+
+if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
@@ -1166,10 +1172,10 @@
+ # Put the nasty error message in config.log where it belongs
+ echo "$RPM_PKG_ERRORS" >&5
+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+ HAVE_LIBRPM=false
++ HAVE_LIBRPM=false
+elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ HAVE_LIBRPM=false
+else
+ RPM_CFLAGS=$pkg_cv_RPM_CFLAGS
@@ -1253,13 +1259,13 @@
subdirs="$subdirs testsuite"
-Index: gdb-7.2.90.20110429/gdb/configure.ac
+Index: gdb-7.4.50.20120602/gdb/configure.ac
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/configure.ac 2011-04-03 18:32:40.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/configure.ac 2011-05-03 05:21:11.000000000 +0200
-@@ -108,6 +108,199 @@ AS_HELP_STRING([--with-relocated-sources
- [Relocated directory for source files. ])
- ])
+--- gdb-7.4.50.20120602.orig/gdb/configure.ac 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/configure.ac 2012-06-02 21:08:23.560221855 +0200
+@@ -166,6 +166,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
+ [Directories safe to hold auto-loaded files.])
+ AC_MSG_RESULT([$with_auto_load_safe_path])
+# Integration with rpm library to support missing debuginfo suggestions.
+# --without-rpm: Disable any rpm support.
@@ -1457,30 +1463,11 @@
AC_CONFIG_SUBDIRS(testsuite)
# Check whether to support alternative target configurations
-Index: gdb-7.2.90.20110429/gdb/acinclude.m4
-===================================================================
---- gdb-7.2.90.20110429.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/acinclude.m4 2011-05-03 05:21:11.000000000 +0200
-@@ -1,3 +1,5 @@
-+# serial 1
-+
- dnl written by Rob Savoye for Cygnus Support
- dnl major rewriting for Tcl 7.5 by Don Libes
-
-@@ -81,8 +83,6 @@ AC_MSG_RESULT(yes)
- # Foundation, Inc., 51 Franklin Street, Fifth Floor,
- # Boston, MA 02110-1301, USA.
-
--# serial 1
--
- # @defmac AC_PROG_CC_STDC
- # @maindex PROG_CC_STDC
- # @ovindex CC
-Index: gdb-7.2.90.20110429/gdb/corelow.c
+Index: gdb-7.4.50.20120602/gdb/corelow.c
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/corelow.c 2011-05-03 05:14:57.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/corelow.c 2011-05-03 05:21:11.000000000 +0200
-@@ -320,7 +320,7 @@ build_id_locate_exec (int from_tty)
+--- gdb-7.4.50.20120602.orig/gdb/corelow.c 2012-06-02 21:08:08.651227347 +0200
++++ gdb-7.4.50.20120602/gdb/corelow.c 2012-06-02 21:08:23.561221855 +0200
+@@ -317,7 +317,7 @@ build_id_locate_exec (int from_tty)
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
}
else
++++++ gdb-6.6-buildid-locate-solib-missing-ids.patch ++++++
--- gdb-7.4.50.20120120/gdb/solib-svr4.c.orig 2012-03-17 10:23:11.000000000 +0100
+++ gdb-7.4.50.20120120/gdb/solib-svr4.c 2012-03-17 10:36:22.265628529 +0100
@@ -1228,14 +1228,27 @@ svr4_read_so_list (CORE_ADDR lm, struct
}
{
- struct build_id *build_id;
+ struct 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';
/* May get overwritten below. */
strcpy (new->so_name, new->so_original_name);
- build_id = build_id_addr_get (new->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.
+
+ It suppresses bogus backtraces (and prints "??" there instead) if
+ the on-disk files no longer match the running program version.
+
+ If the main executable was not loaded according to its build-id do
+ not do any build-id checking of the libraries. There may be missing
+ build-ids dumped in the core file and we would map all the libraries
+ 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);
if (build_id != NULL)
{
char *name, *build_id_filename;
@@ -1250,23 +1263,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
xfree (name);
}
else
- {
- debug_print_missing (new->so_name, build_id_filename);
-
- /* 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.
-
- It suppresses bogus backtraces (and prints "??" there
- instead) if the on-disk files no longer match the
- running program version. */
-
- if (symfile_objfile != NULL
- && (symfile_objfile->flags
- & OBJF_BUILD_ID_CORE_LOADED) != 0)
- new->so_name[0] = 0;
- }
+ debug_print_missing (new->so_name, build_id_filename);
xfree (build_id_filename);
xfree (build_id);
++++++ gdb-6.6-buildid-locate.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -1,8 +1,8 @@
-Index: gdb-7.2.90.20110429/gdb/corelow.c
+Index: gdb-7.4.50.20120602/gdb/corelow.c
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/corelow.c 2011-02-26 03:07:07.000000000 +0100
-+++ gdb-7.2.90.20110429/gdb/corelow.c 2011-05-03 05:14:57.000000000 +0200
-@@ -47,6 +47,9 @@
+--- gdb-7.4.50.20120602.orig/gdb/corelow.c 2012-06-02 21:07:03.695251272 +0200
++++ gdb-7.4.50.20120602/gdb/corelow.c 2012-06-02 21:07:16.464246569 +0200
+@@ -46,6 +46,9 @@
#include "filenames.h"
#include "progspace.h"
#include "objfiles.h"
@@ -10,9 +10,9 @@
+#include "elf/common.h"
+#include "gdbcmd.h"
-
#ifndef O_LARGEFILE
-@@ -278,6 +281,52 @@ add_to_thread_list (bfd *abfd, asection
+ #define O_LARGEFILE 0
+@@ -275,6 +278,52 @@ add_to_thread_list (bfd *abfd, asection
inferior_ptid = ptid; /* Yes, make it current. */
}
@@ -65,7 +65,7 @@
/* This routine opens and sets up the core file bfd. */
static void
-@@ -379,6 +428,12 @@ core_open (char *filename, int from_tty)
+@@ -377,6 +426,12 @@ core_open (char *filename, int from_tty)
push_target (&core_ops);
discard_cleanups (old_chain);
@@ -78,7 +78,7 @@
/* Do this before acknowledging the inferior, so if
post_create_inferior throws (can happen easilly if you're loading
a core file with the wrong exec), we aren't left with threads
-@@ -932,4 +987,11 @@ _initialize_corelow (void)
+@@ -935,4 +990,11 @@ _initialize_corelow (void)
init_core_ops ();
add_target (&core_ops);
@@ -90,11 +90,11 @@
+ NULL, NULL, NULL,
+ &setlist, &showlist);
}
-Index: gdb-7.2.90.20110429/gdb/doc/gdb.texinfo
+Index: gdb-7.4.50.20120602/gdb/doc/gdb.texinfo
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/doc/gdb.texinfo 2011-05-03 05:14:56.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/doc/gdb.texinfo 2011-05-03 05:14:57.000000000 +0200
-@@ -15356,6 +15356,27 @@ information files.
+--- gdb-7.4.50.20120602.orig/gdb/doc/gdb.texinfo 2012-06-02 21:07:03.695251272 +0200
++++ gdb-7.4.50.20120602/gdb/doc/gdb.texinfo 2012-06-02 21:07:16.480246563 +0200
+@@ -16502,6 +16502,27 @@ information files.
@end table
@@ -122,71 +122,74 @@
@cindex @code{.gnu_debuglink} sections
@cindex debug link sections
A debug link is a special section of the executable file named
-Index: gdb-7.2.90.20110429/gdb/solib-svr4.c
+Index: gdb-7.4.50.20120602/gdb/solib-svr4.c
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/solib-svr4.c 2011-05-03 05:14:56.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/solib-svr4.c 2011-05-03 05:14:57.000000000 +0200
-@@ -1179,9 +1179,49 @@ svr4_current_sos (void)
- safe_strerror (errcode));
- else
- {
-- 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);
-+ struct 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';
-+ /* May get overwritten below. */
-+ strcpy (new->so_name, new->so_original_name);
-+
-+ build_id = build_id_addr_get (LM_DYNAMIC_FROM_LINK_MAP (new));
-+ if (build_id != NULL)
-+ {
-+ char *name, *build_id_filename;
-+
-+ /* Missing the build-id matching separate debug info file
-+ would be handled while SO_NAME gets loaded. */
-+ name = build_id_to_filename (build_id, &build_id_filename, 0);
-+ if (name != NULL)
-+ {
-+ strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
-+ new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
-+ xfree (name);
-+ }
-+ else
-+ {
-+ debug_print_missing (new->so_name, build_id_filename);
-+
-+ /* 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.
-+
-+ It suppresses bogus backtraces (and prints "??" there
-+ instead) if the on-disk files no longer match the
-+ running program version. */
-+
-+ if (symfile_objfile != NULL
-+ && (symfile_objfile->flags
-+ & OBJF_BUILD_ID_CORE_LOADED) != 0)
-+ new->so_name[0] = 0;
-+ }
-+
-+ xfree (build_id_filename);
-+ xfree (build_id);
-+ }
- }
- xfree (buffer);
+--- gdb-7.4.50.20120602.orig/gdb/solib-svr4.c 2012-06-02 21:07:03.695251272 +0200
++++ gdb-7.4.50.20120602/gdb/solib-svr4.c 2012-06-02 21:07:16.510246552 +0200
+@@ -1227,9 +1227,52 @@ svr4_read_so_list (CORE_ADDR lm, struct
+ 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);
++ {
++ struct 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';
++ /* May get overwritten below. */
++ strcpy (new->so_name, new->so_original_name);
++
++ build_id = build_id_addr_get (new->lm_info->l_ld);
++ if (build_id != NULL)
++ {
++ char *name, *build_id_filename;
++
++ /* Missing the build-id matching separate debug info file
++ would be handled while SO_NAME gets loaded. */
++ name = build_id_to_filename (build_id, &build_id_filename, 0);
++ if (name != NULL)
++ {
++ strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
++ new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
++ xfree (name);
++ }
++ else
++ {
++ debug_print_missing (new->so_name, build_id_filename);
++
++ /* 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.
++
++ It suppresses bogus backtraces (and prints "??" there
++ instead) if the on-disk files no longer match the
++ running program version. */
++
++ if (symfile_objfile != NULL
++ && (symfile_objfile->flags
++ & OBJF_BUILD_ID_CORE_LOADED) != 0)
++ new->so_name[0] = 0;
++ }
++
++ xfree (build_id_filename);
++ xfree (build_id);
++ }
++ }
++
+ xfree (buffer);
-Index: gdb-7.2.90.20110429/gdb/elfread.c
+ /* If this entry has no name, or its name matches the name
+Index: gdb-7.4.50.20120602/gdb/elfread.c
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/elfread.c 2011-05-03 05:14:56.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/elfread.c 2011-05-03 05:19:27.000000000 +0200
-@@ -49,6 +49,11 @@
- #include "infcall.h"
+--- gdb-7.4.50.20120602.orig/gdb/elfread.c 2012-06-02 21:07:03.695251272 +0200
++++ gdb-7.4.50.20120602/gdb/elfread.c 2012-06-02 21:07:56.264232049 +0200
+@@ -44,6 +44,11 @@
#include "gdbthread.h"
#include "regcache.h"
+ #include "bcache.h"
+#include "libbfd.h"
+#include "gdbcore.h"
+#include "gdbcmd.h"
@@ -195,7 +198,7 @@
extern void _initialize_elfread (void);
-@@ -1077,16 +1082,65 @@ elf_gnu_ifunc_resolver_return_stop (stru
+@@ -1072,16 +1077,65 @@ elf_gnu_ifunc_resolver_return_stop (stru
update_breakpoint_locations (b, sals, sals_end);
}
@@ -220,8 +223,9 @@
-/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
-+
-+struct build_id *
+
+ static struct build_id *
+-build_id_bfd_get (bfd *abfd)
+build_id_buf_get (bfd *templ, gdb_byte *buf, bfd_size_type size)
+{
+ bfd_byte *p;
@@ -256,14 +260,13 @@
+
+/* Separate debuginfo files have corrupted PHDR but SHDR is correct there.
+ Locate NT_GNU_BUILD_ID from ABFD and return its content. */
-
- static struct build_id *
--build_id_bfd_get (bfd *abfd)
++
++static struct build_id *
+build_id_bfd_shdr_get (bfd *abfd)
{
struct build_id *retval;
-@@ -1102,6 +1156,348 @@ build_id_bfd_get (bfd *abfd)
+@@ -1097,6 +1151,348 @@ build_id_bfd_get (bfd *abfd)
return retval;
}
@@ -359,7 +362,7 @@
+/* Translate an ELF program header table entry in external format into an
+ ELF program header table entry in internal format. */
+
-+void
++static void
+elf_swap_phdr_in (bfd *abfd,
+ const Elf64_External_Phdr *src64,
+ Elf_Internal_Phdr *dst)
@@ -612,7 +615,7 @@
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
static int
-@@ -1116,7 +1512,7 @@ build_id_verify (const char *filename, s
+@@ -1111,7 +1507,7 @@ build_id_verify (const char *filename, s
if (abfd == NULL)
return 0;
@@ -621,7 +624,7 @@
if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"), filename);
-@@ -1134,14 +1530,15 @@ build_id_verify (const char *filename, s
+@@ -1129,17 +1525,18 @@ build_id_verify (const char *filename, s
return retval;
}
@@ -633,6 +636,9 @@
{
char *link, *debugdir, *retval = NULL;
+ char *link_all = NULL;
+ VEC (char_ptr) *debugdir_vec;
+ struct cleanup *back_to;
+ int ix;
/* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
- link = alloca (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
@@ -642,29 +648,25 @@
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
cause "/.build-id/..." lookups. */
@@ -1152,6 +1549,8 @@ build_id_to_debug_filename (struct build
- char *s, *debugdir_end;
+ size_t debugdir_len = strlen (debugdir);
gdb_byte *data = build_id->data;
size_t size = build_id->size;
+ unsigned seqno;
+ struct stat statbuf_trash;
+ char *s;
- while (*debugdir == DIRNAME_SEPARATOR)
- debugdir++;
-@@ -1172,39 +1571,242 @@ build_id_to_debug_filename (struct build
+ memcpy (link, debugdir, debugdir_len);
+@@ -1166,37 +1565,240 @@ build_id_to_debug_filename (struct build
*s++ = '/';
while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++);
- strcpy (s, ".debug");
--
+
- /* lrealpath() is expensive even for the usually non-existent files. */
- if (access (link, F_OK) == 0)
- retval = lrealpath (link);
-
-- if (retval != NULL && !build_id_verify (retval, build_id))
+ for (seqno = 0;; seqno++)
- {
-- xfree (retval);
-- retval = NULL;
++ {
+ char *s2;
+
+ if (seqno)
@@ -682,7 +684,8 @@
+ strcpy (s2, ".debug");
+ else
+ *s2 = 0;
-+
+
+- if (retval != NULL && !build_id_verify (retval, build_id))
+ /* `access' automatically dereferences LINK. */
+ if (lstat (link, &statbuf_trash) != 0)
+ {
@@ -700,15 +703,16 @@
+
+ if (retval)
+ break;
- }
-
- if (retval != NULL)
-- break;
-+ {
-+ /* LINK_ALL is not used below in this non-NULL RETVAL case. */
-+ break;
+ }
+
++ if (retval != NULL)
+ {
+- xfree (retval);
+- retval = NULL;
++ /* LINK_ALL is not used below in this non-NULL RETVAL case. */
++ break;
+ }
+
+ if (link_all == NULL)
+ link_all = xstrdup (link);
+ else
@@ -723,14 +727,12 @@
+
+ strcpy (&link_all[len_orig + 1], link);
+ }
-
- debugdir = debugdir_end;
- }
- while (*debugdir != 0);
-
++ }
++
+ if (link_return != NULL)
+ {
-+ if (retval != NULL)
+ if (retval != NULL)
+- break;
+ {
+ *link_return = link;
+ link = NULL;
@@ -740,13 +742,14 @@
+ *link_return = link_all;
+ link_all = NULL;
+ }
-+ }
+ }
+ xfree (link);
+ xfree (link_all);
-+
-+ return retval;
-+}
-+
+
+ do_cleanups (back_to);
+ return retval;
+ }
+
+/* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages
+ Try to install the hash file ...
+ avoidance. */
@@ -769,9 +772,9 @@
+
+ retval = obstack_alloc (&missing_filepair_obstack, size);
+ memset (retval, 0, size);
- return retval;
- }
-
++ return retval;
++}
++
+static hashval_t
+missing_filepair_hash_func (const struct missing_filepair *elem)
+{
@@ -905,7 +908,7 @@
xfree (build_id);
/* Prevent looping on a stripped .debug file. */
if (build_id_name != NULL
-@@ -1215,7 +1817,7 @@ find_separate_debug_file_by_buildid (str
+@@ -1207,7 +1809,7 @@ find_separate_debug_file_by_buildid (str
xfree (build_id_name);
}
else if (build_id_name != NULL)
@@ -914,7 +917,7 @@
}
return NULL;
}
-@@ -1418,9 +2020,10 @@ elf_symfile_read (struct objfile *objfil
+@@ -1427,9 +2029,10 @@ elf_symfile_read (struct objfile *objfil
`.note.gnu.build-id'. */
else if (!objfile_has_partial_symbols (objfile))
{
@@ -927,7 +930,7 @@
if (debugfile == NULL)
debugfile = find_separate_debug_file_by_debuglink (objfile);
-@@ -1432,6 +2035,12 @@ elf_symfile_read (struct objfile *objfil
+@@ -1441,6 +2044,12 @@ elf_symfile_read (struct objfile *objfil
symbol_file_add_separate (abfd, symfile_flags, objfile);
xfree (debugfile);
}
@@ -940,7 +943,7 @@
}
}
-@@ -1911,4 +2520,16 @@ _initialize_elfread (void)
+@@ -1770,4 +2379,16 @@ _initialize_elfread (void)
elf_objfile_gnu_ifunc_cache_data = register_objfile_data ();
gnu_ifunc_fns_p = &elf_gnu_ifunc_fns;
@@ -957,11 +960,11 @@
+
+ observer_attach_executable_changed (debug_print_executable_changed);
}
-Index: gdb-7.2.90.20110429/gdb/symfile.h
+Index: gdb-7.4.50.20120602/gdb/symfile.h
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/symfile.h 2011-05-03 05:14:56.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/symfile.h 2011-05-03 05:14:57.000000000 +0200
-@@ -605,6 +605,13 @@ void free_symfile_segment_data (struct s
+--- gdb-7.4.50.20120602.orig/gdb/symfile.h 2012-06-02 21:07:03.695251272 +0200
++++ gdb-7.4.50.20120602/gdb/symfile.h 2012-06-02 21:07:16.524246547 +0200
+@@ -615,6 +615,13 @@ void free_symfile_segment_data (struct s
extern struct cleanup *increment_reading_symtab (void);
@@ -974,12 +977,12 @@
+
/* From dwarf2read.c */
- extern int dwarf2_has_info (struct objfile *);
-Index: gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp
+ /* Names for a dwarf2 debugging section. The field NORMAL is the normal
+Index: gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/testsuite/lib/gdb.exp 2011-05-03 05:14:56.000000000 +0200
-+++ gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp 2011-05-03 05:14:57.000000000 +0200
-@@ -1381,6 +1381,16 @@ proc default_gdb_start { } {
+--- gdb-7.4.50.20120602.orig/gdb/testsuite/lib/gdb.exp 2012-06-02 21:07:03.695251272 +0200
++++ gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp 2012-06-02 21:07:16.526246546 +0200
+@@ -1388,6 +1388,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
}
@@ -996,13 +999,13 @@
return 0;
}
-Index: gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.4.50.20120602/gdb/testsuite/lib/mi-support.exp
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/testsuite/lib/mi-support.exp 2011-03-07 17:03:04.000000000 +0100
-+++ gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp 2011-05-03 05:14:57.000000000 +0200
-@@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } {
- }
- }
+--- gdb-7.4.50.20120602.orig/gdb/testsuite/lib/mi-support.exp 2012-06-02 21:07:03.695251272 +0200
++++ gdb-7.4.50.20120602/gdb/testsuite/lib/mi-support.exp 2012-06-02 21:07:16.535246544 +0200
+@@ -213,6 +213,16 @@ proc default_mi_gdb_start { args } {
+ warning "Couldn't set the width to 0."
+ }
}
+ # Turn off the missing warnings as the testsuite does not expect it.
+ send_gdb "190-gdb-set build-id-verbose 0\n"
@@ -1014,16 +1017,16 @@
+ warning "Could not disable the missing debug infos warnings.."
+ }
+ }
-
- detect_async
-
-Index: gdb-7.2.90.20110429/gdb/objfiles.h
+ # 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.4.50.20120602/gdb/objfiles.h
===================================================================
---- gdb-7.2.90.20110429.orig/gdb/objfiles.h 2011-03-07 17:17:29.000000000 +0100
-+++ gdb-7.2.90.20110429/gdb/objfiles.h 2011-05-03 05:14:57.000000000 +0200
-@@ -441,6 +441,10 @@ struct objfile
+--- gdb-7.4.50.20120602.orig/gdb/objfiles.h 2012-06-02 21:07:03.695251272 +0200
++++ gdb-7.4.50.20120602/gdb/objfiles.h 2012-06-02 21:07:16.539246541 +0200
+@@ -432,6 +432,10 @@ struct objfile
- #define OBJF_PSYMTABS_READ (1 << 4)
+ #define OBJF_MAINLINE (1 << 5)
+/* This file was loaded according to the BUILD_ID_CORE_LOADS rules. */
+
++++++ gdb-6.6-scheduler_locking-step-is-default.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:36.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:36.000000000 +0200
@@ -1,8 +1,8 @@
-Index: gdb-7.1.90.20100711/gdb/infrun.c
+Index: gdb-7.3.50.20110722/gdb/infrun.c
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/infrun.c 2010-07-12 10:05:26.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/infrun.c 2010-07-12 10:58:56.000000000 +0200
-@@ -1491,7 +1491,7 @@ static const char *scheduler_enums[] = {
+--- gdb-7.3.50.20110722.orig/gdb/infrun.c 2011-07-22 19:12:56.000000000 +0200
++++ gdb-7.3.50.20110722/gdb/infrun.c 2011-07-22 19:17:06.000000000 +0200
+@@ -1549,7 +1549,7 @@ static const char *scheduler_enums[] = {
schedlock_step,
NULL
};
@@ -11,10 +11,10 @@
static void
show_scheduler_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
-Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi-console.exp
+Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi-console.exp
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.mi/mi-console.exp 2010-01-01 08:32:03.000000000 +0100
-+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi-console.exp 2010-07-12 10:58:56.000000000 +0200
+--- gdb-7.3.50.20110722.orig/gdb/testsuite/gdb.mi/mi-console.exp 2011-01-01 16:33:47.000000000 +0100
++++ gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi-console.exp 2011-07-22 19:17:06.000000000 +0200
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
mi_run_to_main
@@ -25,10 +25,10 @@
# Next over the hello() call which will produce lots of output
mi_gdb_test "220-exec-next" \
"220\\^running(\r\n\\*running,thread-id=\"all\")?" \
-Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi2-console.exp
+Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi2-console.exp
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.mi/mi2-console.exp 2010-05-26 20:12:13.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi2-console.exp 2010-07-12 10:59:14.000000000 +0200
+--- gdb-7.3.50.20110722.orig/gdb/testsuite/gdb.mi/mi2-console.exp 2011-06-23 11:40:50.000000000 +0200
++++ gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi2-console.exp 2011-07-22 19:17:27.000000000 +0200
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
mi_run_to_main
@@ -37,12 +37,12 @@
+mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
+
# Next over the hello() call which will produce lots of output
- gdb_test_multiple "220-exec-next" "Started step over hello" {
- -re "220\\^running\r\n(\\*running,thread-id=\"all\"\r\n)?$mi_gdb_prompt" {
-Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi-cli.exp
+ mi_gdb_test "220-exec-next" "220\\^running(\r\n)?(\\*running,thread-id=\"all\")?" \
+ "Started step over hello"
+Index: gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi-cli.exp
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2010-01-19 09:00:39.000000000 +0100
-+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.mi/mi-cli.exp 2010-07-12 10:58:56.000000000 +0200
+--- gdb-7.3.50.20110722.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2011-04-27 12:17:38.000000000 +0200
++++ gdb-7.3.50.20110722/gdb/testsuite/gdb.mi/mi-cli.exp 2011-07-22 19:17:06.000000000 +0200
@@ -176,7 +176,7 @@ mi_execute_to "exec-continue" "breakpoin
# Test that the token is output even for CLI commands
# Also test that *stopped includes frame information.
++++++ gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -21,15 +21,15 @@
Port to GDB-6.8pre.
-Index: gdb-7.2.50.20110117/gdb/inferior.h
+Index: gdb-7.4.50.20120602/gdb/inferior.h
===================================================================
---- gdb-7.2.50.20110117.orig/gdb/inferior.h 2011-01-09 04:08:56.000000000 +0100
-+++ gdb-7.2.50.20110117/gdb/inferior.h 2011-01-17 15:48:39.000000000 +0100
-@@ -186,7 +186,15 @@ extern void reopen_exec_file (void);
+--- gdb-7.4.50.20120602.orig/gdb/inferior.h 2012-05-24 18:39:09.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/inferior.h 2012-06-02 18:24:12.875274179 +0200
+@@ -159,7 +159,15 @@ extern void reopen_exec_file (void);
/* The `resume' routine should only be called in special circumstances.
Normally, use `proceed', which handles a lot of bookkeeping. */
--extern void resume (int, enum target_signal);
+-extern void resume (int, enum gdb_signal);
+enum resume_step
+ {
+ /* currently_stepping () should return non-zero for non-continue. */
@@ -38,15 +38,15 @@
+ RESUME_STEP_NEEDED /* Stepping only for software watchpoints. */
+ };
+
-+extern void resume (enum resume_step, enum target_signal);
++extern void resume (enum resume_step, enum gdb_signal);
- /* From misc files */
+ extern ptid_t user_visible_resume_ptid (int step);
-Index: gdb-7.2.50.20110117/gdb/infrun.c
+Index: gdb-7.4.50.20120602/gdb/infrun.c
===================================================================
---- gdb-7.2.50.20110117.orig/gdb/infrun.c 2011-01-09 04:08:56.000000000 +0100
-+++ gdb-7.2.50.20110117/gdb/infrun.c 2011-01-17 15:49:40.000000000 +0100
-@@ -76,7 +76,7 @@ static int follow_fork (void);
+--- gdb-7.4.50.20120602.orig/gdb/infrun.c 2012-05-28 22:43:26.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/infrun.c 2012-06-02 18:23:59.339278268 +0200
+@@ -79,7 +79,7 @@ static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c);
@@ -55,46 +55,42 @@
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
void *data);
-@@ -1577,7 +1577,7 @@ maybe_software_singlestep (struct gdbarc
+@@ -1687,7 +1687,8 @@ user_visible_resume_ptid (int step)
+ }
+ else if ((scheduler_mode == schedlock_on)
+ || (scheduler_mode == schedlock_step
+- && (step || singlestep_breakpoints_inserted_p)))
++ && (step == RESUME_STEP_USER
++ || singlestep_breakpoints_inserted_p)))
+ {
+ /* User-settable 'scheduler' mode requires solo thread resume. */
+ resume_ptid = inferior_ptid;
+@@ -1705,7 +1706,7 @@ user_visible_resume_ptid (int step)
STEP nonzero if we should step (zero to continue instead).
SIG is the signal to give the inferior (zero for none). */
void
--resume (int step, enum target_signal sig)
-+resume (enum resume_step step, enum target_signal sig)
+-resume (int step, enum gdb_signal sig)
++resume (enum resume_step step, enum gdb_signal sig)
{
int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
-@@ -1609,10 +1609,12 @@ resume (int step, enum target_signal sig
- }
+@@ -1738,9 +1739,13 @@ resume (int step, enum gdb_signal sig)
if (debug_infrun)
-- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
- "infrun: resume (step=%d, signal=%d), "
-- "trap_expected=%d\n",
-- step, sig, tp->control.trap_expected);
-+ fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%s, signal=%d), "
-+ "trap_expected=%d\n",
-+ (step == RESUME_STEP_CONTINUE ? "RESUME_STEP_CONTINUE"
-+ : (step == RESUME_STEP_USER ? "RESUME_STEP_USER"
-+ : "RESUME_STEP_NEEDED")),
-+ sig, tp->control.trap_expected);
-
- /* Normally, by the time we reach `resume', the breakpoints are either
- removed or inserted, as appropriate. The exception is if we're sitting
-@@ -1730,9 +1732,10 @@ a command like `return' or `jump' to con
- individually. */
- resume_ptid = inferior_ptid;
- }
-- else if ((scheduler_mode == schedlock_on)
-+ else if (scheduler_mode == schedlock_on
- || (scheduler_mode == schedlock_step
-- && (step || singlestep_breakpoints_inserted_p)))
-+ && (step == RESUME_STEP_USER
-+ || singlestep_breakpoints_inserted_p)))
- {
- /* User-settable 'scheduler' mode requires solo thread resume. */
- resume_ptid = inferior_ptid;
-@@ -1941,7 +1944,7 @@ proceed (CORE_ADDR addr, enum target_sig
++ "infrun: resume (step=%s, signal=%d), "
+ "trap_expected=%d, current thread [%s] at %s\n",
+- step, sig, tp->control.trap_expected,
++ (step == RESUME_STEP_CONTINUE
++ ? "RESUME_STEP_CONTINUE"
++ : (step == RESUME_STEP_USER ? "RESUME_STEP_USER"
++ : "RESUME_STEP_NEEDED")),
++ sig, tp->control.trap_expected,
+ target_pid_to_str (inferior_ptid),
+ paddress (gdbarch, pc));
+
+@@ -2117,7 +2122,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
struct thread_info *tp;
CORE_ADDR pc;
struct address_space *aspace;
@@ -103,7 +99,7 @@
/* If we're stopped at a fork/vfork, follow the branch set by the
"set follow-fork-mode" command; otherwise, we'll just proceed
-@@ -1976,13 +1979,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -2157,13 +2162,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */
@@ -119,7 +115,7 @@
}
else
{
-@@ -2023,13 +2026,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -2194,13 +2199,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
is required it returns TRUE and sets the current thread to
the old thread. */
if (prepare_to_proceed (step))
@@ -135,7 +131,7 @@
{
tp->control.trap_expected = 1;
/* If displaced stepping is enabled, we can step over the
-@@ -2116,8 +2119,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -2287,8 +2292,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
/* Reset to normal state. */
init_infwait_state ();
@@ -150,7 +146,7 @@
/* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */
-@@ -4957,14 +4965,19 @@ process_event_stop_test:
+@@ -5249,13 +5259,18 @@ process_event_stop_test:
/* Is thread TP in the middle of single-stepping? */
@@ -161,12 +157,10 @@
- return ((tp->control.step_range_end
- && tp->control.step_resume_breakpoint == NULL)
- || tp->control.trap_expected
-- || tp->stepping_through_solib_after_catch
- || bpstat_should_step ());
+ if ((tp->control.step_range_end
+ && tp->control.step_resume_breakpoint == NULL)
-+ || tp->control.trap_expected
-+ || tp->stepping_through_solib_after_catch)
++ || tp->control.trap_expected)
+ return RESUME_STEP_USER;
+
+ if (bpstat_should_step ())
@@ -176,27 +170,28 @@
}
/* Returns true if any thread *but* the one passed in "data" is in the
-Index: gdb-7.2.50.20110117/gdb/linux-nat.c
+Index: gdb-7.4.50.20120602/gdb/linux-nat.c
===================================================================
---- gdb-7.2.50.20110117.orig/gdb/linux-nat.c 2011-01-17 15:47:37.000000000 +0100
-+++ gdb-7.2.50.20110117/gdb/linux-nat.c 2011-01-17 15:48:39.000000000 +0100
-@@ -2928,7 +2928,10 @@ count_events_callback (struct lwp_info *
- static int
+--- gdb-7.4.50.20120602.orig/gdb/linux-nat.c 2012-05-24 18:51:34.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/linux-nat.c 2012-06-02 18:23:07.409293800 +0200
+@@ -3051,7 +3051,11 @@ static int
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
{
-- if (lp->step && lp->status != 0)
-+ /* We do not focus on software watchpoints as we would not catch
-+ STEPPING_PAST_SINGLESTEP_BREAKPOINT breakpoints in some other thread
-+ as they would remain pending due to `Push back breakpoint for %s'. */
-+ if (lp->step == RESUME_STEP_USER && lp->status != 0)
+ if (lp->last_resume_kind == resume_step
+- && lp->status != 0)
++ && lp->status != 0
++ /* We do not focus on software watchpoints as we would not catch
++ STEPPING_PAST_SINGLESTEP_BREAKPOINT breakpoints in some other thread
++ as they would remain pending due to `Push back breakpoint for %s'. */
++ && lp->step == RESUME_STEP_USER)
return 1;
else
return 0;
-Index: gdb-7.2.50.20110117/gdb/linux-nat.h
+Index: gdb-7.4.50.20120602/gdb/linux-nat.h
===================================================================
---- gdb-7.2.50.20110117.orig/gdb/linux-nat.h 2011-01-17 15:47:37.000000000 +0100
-+++ gdb-7.2.50.20110117/gdb/linux-nat.h 2011-01-17 15:48:39.000000000 +0100
-@@ -55,8 +55,8 @@ struct lwp_info
+--- gdb-7.4.50.20120602.orig/gdb/linux-nat.h 2012-03-21 14:43:54.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/linux-nat.h 2012-06-02 18:23:07.411293798 +0200
+@@ -73,8 +73,8 @@ struct lwp_info
/* If non-zero, a pending wait status. */
int status;
++++++ gdb-6.6-testsuite-timeouts.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,42 +1,26 @@
---- ./gdb/testsuite/gdb.base/annota1.exp 10 Jan 2007 03:23:04 -0000 1.23
-+++ ./gdb/testsuite/gdb.base/annota1.exp 10 May 2007 12:54:11 -0000
-@@ -57,6 +57,8 @@ if [target_info exists gdb_stub] {
- gdb_step_for_stub;
- }
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota1.exp
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/testsuite/gdb.base/annota1.exp 2012-03-16 17:47:33.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota1.exp 2012-06-02 18:27:46.623210711 +0200
+@@ -45,6 +45,8 @@ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions"
+
- #
- # the line at which break main will put the breakpoint
- #
---- ./gdb/testsuite/gdb.base/annota3.exp 9 Jan 2007 17:59:09 -0000 1.12
-+++ ./gdb/testsuite/gdb.base/annota3.exp 10 May 2007 12:54:11 -0000
-@@ -56,6 +56,8 @@ if [target_info exists gdb_stub] {
- gdb_step_for_stub;
- }
+ # The commands we test here produce many lines of output; disable "press
+ # <return> to continue" prompts.
+ gdb_test_no_output "set height 0"
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota3.exp
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/testsuite/gdb.base/annota3.exp 2012-02-28 23:40:48.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.base/annota3.exp 2012-06-02 18:28:00.375206457 +0200
+@@ -45,6 +45,8 @@ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions"
+
- #
- # the line at which break main will put the breakpoint
- #
---- gdb-6.6/gdb/testsuite/gdb.threads/step-thread-exit.exp-orig 2007-05-10 15:03:15.000000000 +0200
-+++ gdb-6.6/gdb/testsuite/gdb.threads/step-thread-exit.exp 2007-05-10 15:04:24.000000000 +0200
-@@ -58,6 +58,9 @@ gdb_test "continue" "Break.*thread_funct
- # thread to be stopped and a message printed to tell us we have stepped
- # over the thread exit.
- set test "step over thread exit 1"
-+# ppc64 is currently failing:
-+set timeout_old $timeout
-+set timeout 60
- gdb_test_multiple "next" "$test" {
- -re "\}.*$gdb_prompt $" {
- send_gdb "next\n"
-@@ -71,6 +74,7 @@ gdb_test_multiple "next" "$test" {
- exp_continue
- }
- }
-+set timeout $timeout_old
-
- # Without this fixup we could end up in:
- # #0 0x00110416 in __kernel_vsyscall ()
+ # The commands we test here produce many lines of output; disable "press
+ # <return> to continue" prompts.
+ gdb_test_no_output "set height 0"
++++++ gdb-6.6-threads-static-test.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,8 +1,8 @@
-Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.threads/staticthreads.exp
+Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/staticthreads.exp
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.threads/staticthreads.exp 2010-06-02 23:53:28.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.threads/staticthreads.exp 2010-07-12 11:43:26.000000000 +0200
-@@ -44,6 +44,18 @@ gdb_test_no_output "set print sevenbit-s
+--- gdb-7.4.50.20111219.orig/gdb/testsuite/gdb.threads/staticthreads.exp 2011-12-19 21:07:01.436475201 +0100
++++ gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/staticthreads.exp 2011-12-19 22:08:55.444514127 +0100
+@@ -45,6 +45,13 @@ gdb_test_no_output "set print sevenbit-s
# See if the static multi-threaded program runs.
runto_main
@@ -11,12 +11,7 @@
+# * 2 Thread 135661664 (LWP 3856) main () at threadloop.c:41
+# 1 process 3856 main () at threadloop.c:41
+
-+set test "info threads on start"
-+gdb_test_multiple "info threads" "$test" {
-+ -re "^info threads\r?\n\[^\r\n\]* Thread \[^\r\n\]*\r?\n$gdb_prompt" {
-+ pass "$test"
-+ }
-+}
++gdb_test "info threads" "^info threads\r\n\[ \t\]*Id\[ \t\]+Target Id\[ \t\]+Frame\[ \t\]*\r\n\[^\r\n\]* Thread \[^\r\n\]*" "info threads on start"
+
gdb_test "break sem_post"
set test "Continue to main's call of sem_post"
++++++ gdb-6.7-testsuite-stable-results.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -20,10 +20,10 @@
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp:
frames-invalid can happen asynchronously.
-Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/fileio.c
+Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.c
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.base/fileio.c 2009-10-01 17:39:13.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/fileio.c 2010-07-12 11:41:43.000000000 +0200
+--- gdb-7.4.50.20120103.orig/gdb/testsuite/gdb.base/fileio.c 2009-10-01 17:39:13.000000000 +0200
++++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.c 2012-01-03 15:21:28.122729249 +0100
@@ -58,6 +58,8 @@ system (const char * string);
1) Invalid string/command. - returns 127. */
static const char *strerrno (int err);
@@ -71,10 +71,10 @@
/* Don't change the order of the calls. They partly depend on each other */
test_open ();
test_write ();
-Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/fileio.exp
+Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.base/fileio.exp 2010-06-09 00:58:03.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/fileio.exp 2010-07-12 11:42:07.000000000 +0200
+--- gdb-7.4.50.20120103.orig/gdb/testsuite/gdb.base/fileio.exp 2011-12-26 12:24:55.000000000 +0100
++++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/fileio.exp 2012-01-03 15:22:02.716601956 +0100
@@ -42,8 +42,8 @@ if [get_compiler_info ${binfile}] {
return -1;
}
@@ -95,9 +95,9 @@
gdb_test continue \
"Continuing\\..*open 5:.*EACCES$stop_msg" \
-@@ -250,8 +250,8 @@ gdb_test continue \
- send_gdb "quit\n"
- send_gdb "y\n"
+@@ -251,8 +251,8 @@ gdb_exit
+ # Wait till GDB really exits.
+ sleep 1
-remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test}
-remote_exec build {sh -xc rm\ -rf\ *.fileio.test}
++++++ gdb-6.8-bz254229-gcore-prpsinfo.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,8 +1,8 @@
-Index: gdb-7.2.50.20110320/bfd/elf-bfd.h
+Index: gdb-7.4.50.20120602/bfd/elf-bfd.h
===================================================================
---- gdb-7.2.50.20110320.orig/bfd/elf-bfd.h 2011-03-20 15:17:42.000000000 +0100
-+++ gdb-7.2.50.20110320/bfd/elf-bfd.h 2011-03-20 15:24:02.000000000 +0100
-@@ -2193,8 +2193,10 @@ extern Elf_Internal_Phdr * _bfd_elf_find
+--- gdb-7.4.50.20120602.orig/bfd/elf-bfd.h 2012-06-02 21:26:09.928717069 +0200
++++ gdb-7.4.50.20120602/bfd/elf-bfd.h 2012-06-02 21:27:21.727689625 +0200
+@@ -2221,8 +2221,10 @@ extern Elf_Internal_Phdr * _bfd_elf_find
/* Exported interface for writing elf corefile notes. */
extern char *elfcore_write_note
(bfd *, char *, int *, const char *, int, const void *, int);
@@ -14,17 +14,11 @@
extern char *elfcore_write_prstatus
(bfd *, char *, int *, long, int, const void *);
extern char * elfcore_write_pstatus
-Index: gdb-7.2.50.20110320/bfd/elf.c
+Index: gdb-7.4.50.20120602/bfd/elf.c
===================================================================
---- gdb-7.2.50.20110320.orig/bfd/elf.c 2011-03-20 15:17:42.000000000 +0100
-+++ gdb-7.2.50.20110320/bfd/elf.c 2011-03-20 15:24:02.000000000 +0100
-@@ -8814,13 +8814,12 @@ elfcore_write_note (bfd *abfd,
- return buf;
- }
-
--#if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
-+#if defined (HAVE_PRPSINFO_T)
- char *
+--- gdb-7.4.50.20120602.orig/bfd/elf.c 2012-06-02 21:26:09.928717069 +0200
++++ gdb-7.4.50.20120602/bfd/elf.c 2012-06-02 21:27:21.732689623 +0200
+@@ -8917,56 +8917,61 @@ char *
elfcore_write_prpsinfo (bfd *abfd,
char *buf,
int *bufsiz,
@@ -32,9 +26,8 @@
- const char *psargs)
+ const prpsinfo_t *input)
{
- const char *note_name = "CORE";
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
-@@ -8828,48 +8827,55 @@ elfcore_write_prpsinfo (bfd *abfd,
+
if (bed->elf_backend_write_core_note != NULL)
{
char *ret;
@@ -52,7 +45,9 @@
return ret;
}
+-#if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
-#if defined (HAVE_PRPSINFO32_T) || defined (HAVE_PSINFO32_T)
++#if defined (HAVE_PRPSINFO_T)
+#if defined (HAVE_PRPSINFO32_T)
if (bed->s->elfclass == ELFCLASS32)
{
@@ -64,7 +59,7 @@
int note_type = NT_PRPSINFO;
-#endif
- memset (&data, 0, sizeof (data));
+- memset (&data, 0, sizeof (data));
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ data.pr_state = input->pr_state;
@@ -83,7 +78,7 @@
+ BFD_ASSERT (sizeof (data.pr_psargs) == sizeof (input->pr_psargs));
+ memcpy (data.pr_psargs, input->pr_psargs, sizeof (data.pr_psargs));
return elfcore_write_note (abfd, buf, bufsiz,
- note_name, note_type, &data, sizeof (data));
+ "CORE", note_type, &data, sizeof (data));
}
else
#endif
@@ -100,21 +95,40 @@
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
return elfcore_write_note (abfd, buf, bufsiz,
-- note_name, note_type, &data, sizeof (data));
-+ note_name, note_type, input, sizeof (*input));
+- "CORE", note_type, &data, sizeof (data));
++ "CORE", note_type, input, sizeof (*input));
}
- }
-#endif /* PSINFO_T or PRPSINFO_T */
+#endif /* PRPSINFO_T */
- #if defined (HAVE_PRSTATUS_T)
- char *
-Index: gdb-7.2.50.20110320/gdb/linux-nat.c
+ free (buf);
+ return NULL;
+Index: gdb-7.4.50.20120602/gdb/procfs.c
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/procfs.c 2012-06-02 21:26:09.928717069 +0200
++++ gdb-7.4.50.20120602/gdb/procfs.c 2012-06-02 21:27:21.745689618 +0200
+@@ -5541,6 +5541,7 @@ procfs_make_note_section (bfd *obfd, int
+ note_data = (char *) elfcore_write_prpsinfo (obfd,
+ note_data,
+ note_size,
++ NULL,
+ fname,
+ psargs);
+
+Index: gdb-7.4.50.20120602/gdb/linux-tdep.c
===================================================================
---- gdb-7.2.50.20110320.orig/gdb/linux-nat.c 2011-03-20 15:17:46.000000000 +0100
-+++ gdb-7.2.50.20110320/gdb/linux-nat.c 2011-03-20 15:25:36.000000000 +0100
-@@ -4603,6 +4603,131 @@ linux_spu_make_corefile_notes (bfd *obfd
- return args.note_data;
+--- gdb-7.4.50.20120602.orig/gdb/linux-tdep.c 2012-06-02 21:26:09.928717069 +0200
++++ gdb-7.4.50.20120602/gdb/linux-tdep.c 2012-06-02 21:31:12.051601510 +0200
+@@ -30,6 +30,7 @@
+ #include "elf-bfd.h" /* for elfcore_write_* */
+ #include "inferior.h"
+ #include "cli/cli-utils.h"
++#include
+
+ #include
+
+@@ -769,6 +770,131 @@ linux_corefile_thread_callback (struct t
+ return !args->note_data;
}
+/* Should be always true for Linux */
@@ -245,45 +259,22 @@
/* Fills the "to_make_corefile_note" target vector. Builds the note
section for a corefile, and returns it in a malloc buffer. */
-@@ -4621,26 +4746,11 @@ linux_nat_make_corefile_notes (bfd *obfd
-
+@@ -784,16 +910,9 @@ linux_make_corefile_notes (struct gdbarc
+ /* Process information. */
if (get_exec_file (0))
{
-- strncpy (fname, lbasename (get_exec_file (0)), sizeof (fname));
-- strncpy (psargs, get_exec_file (0), sizeof (psargs));
-- if (get_inferior_args ())
-- {
-- char *string_end;
-- char *psargs_end = psargs + sizeof (psargs);
--
-- /* linux_elfcore_write_prpsinfo () handles zero unterminated
-- strings fine. */
-- string_end = memchr (psargs, 0, sizeof (psargs));
-- if (string_end != NULL)
-- {
-- *string_end++ = ' ';
-- strncpy (string_end, get_inferior_args (),
-- psargs_end - string_end);
-- }
-- }
+- const char *fname = lbasename (get_exec_file (0));
+- char *psargs = xstrdup (fname);
+ const prpsinfo_t *data = fill_prpsinfo ();
-+
- note_data = (char *) elfcore_write_prpsinfo (obfd,
- note_data,
-- note_size, fname, psargs);
-+ note_size, data);
- }
- /* Dump information for threads. */
-Index: gdb-7.2.50.20110320/gdb/procfs.c
-===================================================================
---- gdb-7.2.50.20110320.orig/gdb/procfs.c 2011-03-09 13:48:55.000000000 +0100
-+++ gdb-7.2.50.20110320/gdb/procfs.c 2011-03-20 15:24:02.000000000 +0100
-@@ -5752,6 +5752,7 @@ procfs_make_note_section (bfd *obfd, int
- note_data = (char *) elfcore_write_prpsinfo (obfd,
- note_data,
- note_size,
-+ NULL,
- fname,
- psargs);
+- if (get_inferior_args ())
+- psargs = reconcat (psargs, psargs, " ", get_inferior_args (),
+- (char *) NULL);
+-
+- note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
+- fname, psargs);
+- xfree (psargs);
++ note_data = elfcore_write_prpsinfo (obfd, note_data, note_size, data);
+ if (!note_data)
+ return NULL;
++++++ gdb-6.8-sparc64-silence-memcpy-check.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,8 +1,9 @@
-diff -up gdb-6.8/gdb/sparc-tdep.c.BAD gdb-6.8/gdb/sparc-tdep.c
---- gdb-6.8/gdb/sparc-tdep.c.BAD 2008-05-15 16:12:58.000000000 -0500
-+++ gdb-6.8/gdb/sparc-tdep.c 2008-05-15 16:13:41.000000000 -0500
-@@ -1122,6 +1122,7 @@ sparc32_store_return_value (struct type
- if (sparc_floating_p (type))
+Index: gdb-7.4.50.20111218/gdb/sparc-tdep.c
+===================================================================
+--- gdb-7.4.50.20111218.orig/gdb/sparc-tdep.c 2011-09-28 19:59:42.000000000 +0200
++++ gdb-7.4.50.20111218/gdb/sparc-tdep.c 2011-12-19 01:25:29.294046199 +0100
+@@ -1316,6 +1316,7 @@ sparc32_store_return_value (struct type
+ if (sparc_floating_p (type) || sparc_complex_floating_p (type))
{
/* Floating return values. */
+ len = (len <= 8) ? len : 8;
++++++ gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,6 +1,8 @@
---- gdb-7.2.50.20110328.orig/gdb/dwarf2read.c 2011-03-30 12:52:20.395450001 +0200
-+++ gdb-7.2.50.20110328/gdb/dwarf2read.c 2011-03-30 13:41:55.485450006 +0200
-@@ -66,12 +66,14 @@
+Index: gdb-7.3.50.20110722/gdb/dwarf2read.c
+===================================================================
+--- gdb-7.3.50.20110722.orig/gdb/dwarf2read.c 2011-07-22 19:37:15.000000000 +0200
++++ gdb-7.3.50.20110722/gdb/dwarf2read.c 2011-07-22 19:44:42.000000000 +0200
+@@ -67,12 +67,14 @@
#ifdef HAVE_ZLIB_H
#include
#endif
@@ -15,7 +17,7 @@
typedef struct symbol *symbolp;
DEF_VEC_P (symbolp);
-@@ -1563,6 +1565,7 @@
+@@ -1618,6 +1620,7 @@ dwarf2_read_section (struct objfile *obj
}
}
@@ -23,7 +25,7 @@
#ifdef HAVE_MMAP
if (pagesize == 0)
pagesize = getpagesize ();
-@@ -1589,6 +1592,7 @@
+@@ -1641,6 +1644,7 @@ dwarf2_read_section (struct objfile *obj
}
}
#endif
@@ -31,15 +33,15 @@
/* If we get here, we are a normal, not-compressed section. */
info->buffer = buf
-@@ -15439,6 +15443,7 @@
+@@ -15983,6 +15987,7 @@ munmap_section_buffer (struct dwarf2_sec
{
- if (info->was_mmapped)
+ if (info->map_addr != NULL)
{
+#ifndef __sparc__
#ifdef HAVE_MMAP
- intptr_t begin = (intptr_t) info->buffer;
- intptr_t map_begin = begin & ~(pagesize - 1);
-@@ -15449,6 +15454,7 @@
+ int res;
+
+@@ -15992,6 +15997,7 @@ munmap_section_buffer (struct dwarf2_sec
/* Without HAVE_MMAP, we should never be here to begin with. */
gdb_assert_not_reached ("no mmap support");
#endif
++++++ gdb-7.3.tar.bz2 -> gdb-7.4.50.20120603.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/gdb/gdb-7.3.tar.bz2 /work/SRC/openSUSE:Factory/.gdb.new/gdb-7.4.50.20120603.tar.bz2 differ: char 11, line 1
++++++ gdb-archer-pie-addons-keep-disabled.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,12 +1,11 @@
-Index: gdb-7.2.90.20110411/gdb/breakpoint.c
+Index: gdb-7.4.50.20120602/gdb/breakpoint.c
===================================================================
---- gdb-7.2.90.20110411.orig/gdb/breakpoint.c 2011-04-11 19:11:55.000000000 +0200
-+++ gdb-7.2.90.20110411/gdb/breakpoint.c 2011-04-11 19:18:10.000000000 +0200
-@@ -11233,6 +11233,50 @@ re_set_breakpoint (struct breakpoint *b)
- do_cleanups (cleanups);
+--- gdb-7.4.50.20120602.orig/gdb/breakpoint.c 2012-06-02 19:11:54.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/breakpoint.c 2012-06-02 19:52:58.161226506 +0200
+@@ -15495,6 +15495,50 @@ initialize_breakpoint_ops (void)
}
-+void
+ void
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
+{
+ struct bp_location *bl, **blp_tmp;
@@ -50,26 +49,27 @@
+ bp_location_compare);
+}
+
- /* Reset a breakpoint given it's struct breakpoint * BINT.
- The value we return ends up being the return value from catch_errors.
- Unused in this case. */
-Index: gdb-7.2.90.20110411/gdb/breakpoint.h
++void
+ _initialize_breakpoint (void)
+ {
+ struct cmd_list_element *c;
+Index: gdb-7.4.50.20120602/gdb/breakpoint.h
===================================================================
---- gdb-7.2.90.20110411.orig/gdb/breakpoint.h 2011-04-11 19:11:55.000000000 +0200
-+++ gdb-7.2.90.20110411/gdb/breakpoint.h 2011-04-11 19:17:53.000000000 +0200
-@@ -1245,4 +1245,7 @@ extern int user_breakpoint_p (struct bre
+--- gdb-7.4.50.20120602.orig/gdb/breakpoint.h 2012-05-16 16:35:03.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/breakpoint.h 2012-06-02 19:53:09.268223263 +0200
+@@ -1503,4 +1503,7 @@ extern struct gdbarch *get_sal_arch (str
- extern void modify_semaphore (struct bp_location *location, int set);
+ extern void handle_solib_event (void);
+extern void breakpoints_relocate (struct objfile *objfile,
+ struct section_offsets *delta);
+
#endif /* !defined (BREAKPOINT_H) */
-Index: gdb-7.2.90.20110411/gdb/objfiles.c
+Index: gdb-7.4.50.20120602/gdb/objfiles.c
===================================================================
---- gdb-7.2.90.20110411.orig/gdb/objfiles.c 2011-04-11 19:11:55.000000000 +0200
-+++ gdb-7.2.90.20110411/gdb/objfiles.c 2011-04-11 19:17:53.000000000 +0200
-@@ -851,6 +851,11 @@ objfile_relocate1 (struct objfile *objfi
+--- gdb-7.4.50.20120602.orig/gdb/objfiles.c 2012-05-10 21:50:08.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/objfiles.c 2012-06-02 19:52:58.202226502 +0200
+@@ -802,6 +802,11 @@ objfile_relocate1 (struct objfile *objfi
objfile->sf->sym_probe_fns->sym_relocate_probe (objfile,
new_offsets, delta);
++++++ gdb-archer-pie-addons.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,8 +1,8 @@
-Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
+Index: gdb-7.4.50.20120602/gdb/dwarf2read.c
===================================================================
---- gdb-7.2.90.20110525.orig/gdb/dwarf2read.c 2011-05-25 17:10:46.000000000 +0200
-+++ gdb-7.2.90.20110525/gdb/dwarf2read.c 2011-05-25 17:12:35.000000000 +0200
-@@ -7675,7 +7675,12 @@ read_common_block (struct die_info *die,
+--- gdb-7.4.50.20120602.orig/gdb/dwarf2read.c 2012-06-02 19:14:38.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/dwarf2read.c 2012-06-02 19:51:29.977252338 +0200
+@@ -9746,7 +9746,12 @@ read_common_block (struct die_info *die,
{
struct attribute *attr;
struct symbol *sym;
@@ -16,7 +16,7 @@
attr = dwarf2_attr (die, DW_AT_location, cu);
if (attr)
-@@ -7684,6 +7689,7 @@ read_common_block (struct die_info *die,
+@@ -9755,6 +9760,7 @@ read_common_block (struct die_info *die,
if (attr_form_is_block (attr))
{
base = decode_locdesc (DW_BLOCK (attr), cu);
@@ -24,7 +24,7 @@
}
else if (attr_form_is_section_offset (attr))
{
-@@ -7736,12 +7742,15 @@ read_common_block (struct die_info *die,
+@@ -9807,12 +9813,15 @@ read_common_block (struct die_info *die,
if (sym != NULL
&& handle_data_member_location (child_die, cu, &offset))
{
@@ -42,7 +42,7 @@
else
SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
-@@ -7755,7 +7764,7 @@ read_common_block (struct die_info *die,
+@@ -9826,7 +9835,7 @@ read_common_block (struct die_info *die,
sym = new_symbol (die, type, cu);
/* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static. */
@@ -51,35 +51,35 @@
set_die_type (die, type, cu);
}
-Index: gdb-7.2.90.20110525/gdb/gdbtypes.h
+Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
===================================================================
---- gdb-7.2.90.20110525.orig/gdb/gdbtypes.h 2011-05-25 17:05:21.000000000 +0200
-+++ gdb-7.2.90.20110525/gdb/gdbtypes.h 2011-05-25 17:11:10.000000000 +0200
-@@ -396,6 +396,7 @@ enum type_instance_flag_value
- enum field_loc_kind
+--- gdb-7.4.50.20120602.orig/gdb/gdbtypes.h 2012-06-02 19:11:54.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/gdbtypes.h 2012-06-02 19:52:44.990230200 +0200
+@@ -401,6 +401,7 @@ enum field_loc_kind
{
FIELD_LOC_KIND_BITPOS, /* bitpos */
+ FIELD_LOC_KIND_ENUMVAL, /* enumval */
+ /* This address is unrelocated by the objfile's ANOFFSET. */
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
- FIELD_LOC_KIND_PHYSNAME /* physname */
- };
-@@ -580,6 +581,7 @@ struct main_type
+ FIELD_LOC_KIND_PHYSNAME, /* physname */
+ FIELD_LOC_KIND_DWARF_BLOCK /* dwarf_block */
+@@ -595,6 +596,7 @@ struct main_type
is the location (in the target) of the static field.
Otherwise, physname is the mangled label of the static field. */
+ /* This address is unrelocated by the objfile's ANOFFSET. */
CORE_ADDR physaddr;
- char *physname;
- }
-@@ -1106,6 +1108,7 @@ extern void allocate_gnat_aux_type (stru
- #define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
- #define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
+ const char *physname;
+
+@@ -1200,6 +1202,7 @@ extern void allocate_gnat_aux_type (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)
+/* This address is unrelocated by the objfile's ANOFFSET. */
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
+ #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
#define SET_FIELD_BITPOS(thisfld, bitpos) \
- (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS, \
-@@ -1113,6 +1116,7 @@ extern void allocate_gnat_aux_type (stru
+@@ -1211,6 +1214,7 @@ extern void allocate_gnat_aux_type (stru
#define SET_FIELD_PHYSNAME(thisfld, name) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
FIELD_STATIC_PHYSNAME (thisfld) = (name))
@@ -87,19 +87,19 @@
#define SET_FIELD_PHYSADDR(thisfld, addr) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
-@@ -1125,6 +1129,7 @@ extern void allocate_gnat_aux_type (stru
- #define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n))
+@@ -1227,6 +1231,7 @@ extern void allocate_gnat_aux_type (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))
+/* This address is unrelocated by the objfile's ANOFFSET. */
#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))
- #define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
-Index: gdb-7.2.90.20110525/gdb/jv-lang.c
+Index: gdb-7.4.50.20120602/gdb/jv-lang.c
===================================================================
---- gdb-7.2.90.20110525.orig/gdb/jv-lang.c 2011-03-02 01:42:53.000000000 +0100
-+++ gdb-7.2.90.20110525/gdb/jv-lang.c 2011-05-25 17:11:10.000000000 +0200
-@@ -414,7 +414,8 @@ java_link_class_type (struct gdbarch *gd
+--- gdb-7.4.50.20120602.orig/gdb/jv-lang.c 2012-05-10 21:59:12.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/jv-lang.c 2012-06-02 19:51:53.286245280 +0200
+@@ -431,7 +431,8 @@ java_link_class_type (struct gdbarch *gd
fields = NULL;
nfields--; /* First set up dummy "class" field. */
@@ -109,7 +109,7 @@
TYPE_FIELD_NAME (type, nfields) = "class";
TYPE_FIELD_TYPE (type, nfields) = value_type (clas);
SET_TYPE_FIELD_PRIVATE (type, nfields);
-@@ -462,7 +463,8 @@ java_link_class_type (struct gdbarch *gd
+@@ -479,7 +480,8 @@ java_link_class_type (struct gdbarch *gd
SET_TYPE_FIELD_PROTECTED (type, i);
}
if (accflags & 0x0008) /* ACC_STATIC */
@@ -117,13 +117,13 @@
+ SET_FIELD_PHYSADDR (TYPE_FIELD (type, i), boffset
+ - (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type)))));
else
- TYPE_FIELD_BITPOS (type, i) = 8 * boffset;
+ SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset);
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
-Index: gdb-7.2.90.20110525/gdb/value.c
+Index: gdb-7.4.50.20120602/gdb/value.c
===================================================================
---- gdb-7.2.90.20110525.orig/gdb/value.c 2011-05-25 17:05:21.000000000 +0200
-+++ gdb-7.2.90.20110525/gdb/value.c 2011-05-25 17:11:10.000000000 +0200
-@@ -2492,7 +2492,8 @@ value_static_field (struct type *type, i
+--- gdb-7.4.50.20120602.orig/gdb/value.c 2012-06-02 19:11:55.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/value.c 2012-06-02 19:51:30.031252317 +0200
+@@ -2592,7 +2592,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 ++++++
++++ 16364 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/gdb/gdb-archer.patch
++++ and /work/SRC/openSUSE:Factory/.gdb.new/gdb-archer.patch
++++++ gdb-attach-fail-reasons-5of5.patch ++++++
http://sourceware.org/ml/gdb-patches/2012-03/msg00171.html
Subject: [patch 3/3] attach-fail-reasons: SELinux deny_ptrace
Hi,
and here is the last bit for new SELinux 'deny_ptrace':
https://bugzilla.redhat.com/show_bug.cgi?id=786878
As even PTRACE_TRACEME fails in such case it needs to install hook for even
that event.
Thanks,
Jan
gdb/
2012-03-06 Jan Kratochvil
* common/linux-ptrace.c [HAVE_SELINUX_SELINUX_H]: include
selinux/selinux.h.
(linux_ptrace_attach_warnings): Call linux_ptrace_create_warnings.
(linux_ptrace_create_warnings): New.
* common/linux-ptrace.h (linux_ptrace_create_warnings): New declaration.
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Check selinux/selinux.h and the selinux library.
* inf-ptrace.c (inf_ptrace_me): Check the ptrace result.
* linux-nat.c (linux_nat_create_inferior): New variable ex. Wrap
to_create_inferior into TRY_CATCH, call linux_ptrace_create_warnings.
gdb/gdbserver/
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Check selinux/selinux.h and the selinux library.
* linux-low.c (linux_traceme): New function.
(linux_create_inferior, linux_tracefork_child): Call it instead of
direct ptrace.
Index: gdb-7.4.50.20120602/gdb/common/linux-ptrace.c
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/common/linux-ptrace.c 2012-03-13 16:02:23.000000000 +0100
+++ gdb-7.4.50.20120602/gdb/common/linux-ptrace.c 2012-06-02 20:37:53.933828570 +0200
@@ -27,6 +27,10 @@
#include "linux-procfs.h"
#include "buffer.h"
+#ifdef HAVE_SELINUX_SELINUX_H
+# include
+#endif /* HAVE_SELINUX_SELINUX_H */
+
/* Find all possible reasons we could fail to attach PID and append these
newline terminated reason strings to initialized BUFFER. '\0' termination
of BUFFER must be done by the caller. */
@@ -46,4 +50,22 @@ linux_ptrace_attach_warnings (pid_t pid,
buffer_xml_printf (buffer, _("warning: process %d is a zombie "
"- the process has already terminated\n"),
(int) pid);
+
+ linux_ptrace_create_warnings (buffer);
+}
+
+/* Print all possible reasons we could fail to create a traced process. */
+
+void
+linux_ptrace_create_warnings (struct buffer *buffer)
+{
+#ifdef HAVE_LIBSELINUX
+ /* -1 is returned for errors, 0 if it has no effect, 1 if PTRACE_ATTACH is
+ forbidden. */
+ if (security_get_boolean_active ("deny_ptrace") == 1)
+ buffer_xml_printf (buffer,
+ _("the SELinux boolean 'deny_ptrace' is enabled, "
+ "you can disable this process attach protection by: "
+ "(gdb) shell sudo setsebool deny_ptrace=0"));
+#endif /* HAVE_LIBSELINUX */
}
Index: gdb-7.4.50.20120602/gdb/common/linux-ptrace.h
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/common/linux-ptrace.h 2012-03-13 16:02:23.000000000 +0100
+++ gdb-7.4.50.20120602/gdb/common/linux-ptrace.h 2012-06-02 20:37:46.565831956 +0200
@@ -68,5 +68,6 @@ struct buffer;
#endif
extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer);
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
#endif /* COMMON_LINUX_PTRACE_H */
Index: gdb-7.4.50.20120602/gdb/configure.ac
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/configure.ac 2012-06-02 20:05:08.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/configure.ac 2012-06-02 20:35:06.379798726 +0200
@@ -2002,6 +2002,10 @@ then
[Define if you support the personality syscall.])
fi
+dnl Check security_get_boolean_active availability.
+AC_CHECK_HEADERS(selinux/selinux.h)
+AC_CHECK_LIB(selinux, security_get_boolean_active)
+
dnl Handle optional features that can be enabled.
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
Index: gdb-7.4.50.20120602/gdb/gdbserver/configure.ac
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/gdbserver/configure.ac 2012-04-19 21:34:51.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/gdbserver/configure.ac 2012-06-02 20:35:06.408797663 +0200
@@ -438,6 +438,10 @@ if $want_ipa ; then
fi
fi
+dnl Check security_get_boolean_active availability.
+AC_CHECK_HEADERS(selinux/selinux.h)
+AC_CHECK_LIB(selinux, security_get_boolean_active)
+
AC_SUBST(GDBSERVER_DEPFILES)
AC_SUBST(GDBSERVER_LIBS)
AC_SUBST(USE_THREAD_DB)
Index: gdb-7.4.50.20120602/gdb/gdbserver/linux-low.c
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/gdbserver/linux-low.c 2012-05-30 21:51:38.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/gdbserver/linux-low.c 2012-06-02 20:39:49.886785355 +0200
@@ -601,6 +601,28 @@ add_lwp (ptid_t ptid)
return lwp;
}
+/* Execute PTRACE_TRACEME with error checking. */
+
+static void
+linux_traceme (const char *program)
+{
+ int save_errno;
+ struct buffer buffer;
+
+ errno = 0;
+ if (ptrace (PTRACE_TRACEME, 0, NULL, NULL) == 0)
+ return;
+
+ save_errno = errno;
+ buffer_init (&buffer);
+ linux_ptrace_create_warnings (&buffer);
+ buffer_grow_str0 (&buffer, "");
+ fprintf (stderr, _("%sCannot trace created process %s: %s.\n"),
+ buffer_finish (&buffer), program, strerror (save_errno));
+ fflush (stderr);
+ _exit (0177);
+}
+
/* Start an inferior process and returns its pid.
ALLARGS is a vector of program-name and args. */
@@ -641,7 +663,7 @@ linux_create_inferior (char *program, ch
if (pid == 0)
{
- ptrace (PTRACE_TRACEME, 0, 0, 0);
+ linux_traceme (program);
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
signal (__SIGRTMIN + 1, SIG_DFL);
@@ -4567,7 +4589,7 @@ linux_tracefork_grandchild (void *arg)
static int
linux_tracefork_child (void *arg)
{
- ptrace (PTRACE_TRACEME, 0, 0, 0);
+ linux_traceme ("PTRACE_O_TRACEFORK test");
kill (getpid (), SIGSTOP);
#if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
Index: gdb-7.4.50.20120602/gdb/inf-ptrace.c
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/inf-ptrace.c 2012-05-24 18:51:34.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/inf-ptrace.c 2012-06-02 20:35:06.428797311 +0200
@@ -105,7 +105,15 @@ static void
inf_ptrace_me (void)
{
/* "Trace me, Dr. Memory!" */
+ errno = 0;
ptrace (PT_TRACE_ME, 0, (PTRACE_TYPE_ARG3)0, 0);
+ if (errno != 0)
+ {
+ fprintf_unfiltered (gdb_stderr, _("Cannot create process: %s\n"),
+ safe_strerror (errno));
+ gdb_flush (gdb_stderr);
+ _exit (0177);
+ }
}
/* Start a new inferior Unix child process. EXEC_FILE is the file to
Index: gdb-7.4.50.20120602/gdb/linux-nat.c
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/linux-nat.c 2012-06-02 20:01:38.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/linux-nat.c 2012-06-02 20:41:18.101751186 +0200
@@ -1572,6 +1572,7 @@ linux_nat_create_inferior (struct target
#ifdef HAVE_PERSONALITY
int personality_orig = 0, personality_set = 0;
#endif /* HAVE_PERSONALITY */
+ volatile struct gdb_exception ex;
/* The fork_child mechanism is synchronous and calls target_wait, so
we have to mask the async mode. */
@@ -1596,7 +1597,10 @@ linux_nat_create_inferior (struct target
/* Make sure we report all signals during startup. */
linux_nat_pass_signals (0, NULL);
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
+ TRY_CATCH (ex, RETURN_MASK_ERROR)
+ {
+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
+ }
#ifdef HAVE_PERSONALITY
if (personality_set)
@@ -1608,6 +1612,24 @@ linux_nat_create_inferior (struct target
safe_strerror (errno));
}
#endif /* HAVE_PERSONALITY */
+
+ if (ex.reason < 0)
+ {
+ struct buffer buffer;
+ char *message, *buffer_s;
+
+ message = xstrdup (ex.message);
+ make_cleanup (xfree, message);
+
+ buffer_init (&buffer);
+ linux_ptrace_create_warnings (&buffer);
+
+ buffer_grow_str0 (&buffer, "");
+ buffer_s = buffer_finish (&buffer);
+ make_cleanup (xfree, buffer_s);
+
+ throw_error (ex.error, "%s%s", buffer_s, message);
+ }
}
static void
++++++ gdb-attach-fail-reasons-5of5configure.patch ++++++
Index: gdb-7.4.50.20120602/gdb/config.in
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/config.in 2012-06-02 21:49:26.147399232 +0200
+++ gdb-7.4.50.20120602/gdb/config.in 2012-06-02 21:49:27.206398845 +0200
@@ -222,6 +222,9 @@
/* Define if librpm library is being used. */
#undef HAVE_LIBRPM
+/* Define to 1 if you have the `selinux' library (-lselinux). */
+#undef HAVE_LIBSELINUX
+
/* Define to 1 if you have the header file. */
#undef HAVE_LIBUNWIND_IA64_H
@@ -363,6 +366,9 @@
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
+/* Define to 1 if you have the header file. */
+#undef HAVE_SELINUX_SELINUX_H
+
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
Index: gdb-7.4.50.20120602/gdb/configure
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/configure 2012-06-02 21:49:27.139398869 +0200
+++ gdb-7.4.50.20120602/gdb/configure 2012-06-02 21:49:50.890390179 +0200
@@ -12745,6 +12745,64 @@ $as_echo "#define HAVE_PERSONALITY 1" >>
fi
+for ac_header in selinux/selinux.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SELINUX_SELINUX_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lselinux $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char security_get_boolean_active ();
+int
+main ()
+{
+return security_get_boolean_active ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_selinux_security_get_boolean_active=yes
+else
+ ac_cv_lib_selinux_security_get_boolean_active=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSELINUX 1
+_ACEOF
+
+ LIBS="-lselinux $LIBS"
+
+fi
+
+
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
# except that the argument to --with-sysroot is optional.
Index: gdb-7.4.50.20120602/gdb/gdbserver/config.in
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/gdbserver/config.in 2012-04-19 21:34:51.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/gdbserver/config.in 2012-06-02 21:49:55.945388329 +0200
@@ -69,6 +69,9 @@
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
+/* Define to 1 if you have the `selinux' library (-lselinux). */
+#undef HAVE_LIBSELINUX
+
/* Define to 1 if you have the header file. */
#undef HAVE_LINUX_ELF_H
@@ -130,6 +133,9 @@
/* Define to 1 if you have the `readlink' function. */
#undef HAVE_READLINK
+/* Define to 1 if you have the header file. */
+#undef HAVE_SELINUX_SELINUX_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_SGTTY_H
Index: gdb-7.4.50.20120602/gdb/gdbserver/configure
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/gdbserver/configure 2012-04-20 19:58:49.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/gdbserver/configure 2012-06-02 21:49:54.485388864 +0200
@@ -5532,6 +5532,64 @@ if $want_ipa ; then
fi
fi
+for ac_header in selinux/selinux.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SELINUX_SELINUX_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lselinux $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char security_get_boolean_active ();
+int
+main ()
+{
+return security_get_boolean_active ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_selinux_security_get_boolean_active=yes
+else
+ ac_cv_lib_selinux_security_get_boolean_active=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSELINUX 1
+_ACEOF
+
+ LIBS="-lselinux $LIBS"
+
+fi
+
+
++++++ gdb-bz533176-fortran-omp-step.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -68,7 +68,7 @@
+
+set testfile "omp-step"
+set srcfile ${testfile}.f90
-+if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77 additional_flags=-fopenmp}] } {
++if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 additional_flags=-fopenmp}] } {
+ return -1
+}
+
++++++ gdb-bz541866-rwatch-before-run.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,18 +1,20 @@
-Index: gdb-7.2.50.20110117/gdb/config/i386/linux64.mh
+Index: gdb-7.4.50.20120602/gdb/config/i386/linux64.mh
===================================================================
---- gdb-7.2.50.20110117.orig/gdb/config/i386/linux64.mh 2010-05-28 20:50:31.000000000 +0200
-+++ gdb-7.2.50.20110117/gdb/config/i386/linux64.mh 2011-01-17 16:01:48.000000000 +0100
-@@ -2,7 +2,7 @@
- NATDEPFILES= inf-ptrace.o fork-child.o \
- i386-nat.o amd64-nat.o amd64-linux-nat.o linux-nat.o \
- proc-service.o linux-thread-db.o linux-fork.o
+--- gdb-7.4.50.20120602.orig/gdb/config/i386/linux64.mh 2012-03-13 16:00:34.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/config/i386/linux64.mh 2012-06-02 19:56:03.196172503 +0200
+@@ -4,7 +4,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
+ linux-nat.o linux-osdata.o \
+ proc-service.o linux-thread-db.o linux-fork.o \
+ linux-procfs.o linux-ptrace.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
---- gdb-7.2/gdb/config/i386/linux.mh-orig 2010-06-11 14:08:51.000000000 +0200
-+++ gdb-7.2/gdb/config/i386/linux.mh 2011-03-18 12:00:32.000000000 +0100
+Index: gdb-7.4.50.20120602/gdb/config/i386/linux.mh
+===================================================================
+--- gdb-7.4.50.20120602.orig/gdb/config/i386/linux.mh 2012-03-13 16:00:33.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/config/i386/linux.mh 2012-06-02 19:55:42.418178412 +0200
@@ -1,6 +1,6 @@
# Host: Intel 386 running GNU/Linux.
@@ -21,8 +23,10 @@
NATDEPFILES= inf-ptrace.o fork-child.o \
i386-nat.o i386-linux-nat.o \
proc-service.o linux-thread-db.o \
+Index: gdb-7.4.50.20120602/gdb/config/i386/nm-linux.h
+===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.1.90.20100711/gdb/config/i386/nm-linux.h 2010-07-13 19:02:28.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/config/i386/nm-linux.h 2012-06-02 19:55:42.433178408 +0200
@@ -0,0 +1,28 @@
+/* Native support for GNU/Linux i386.
+
@@ -52,10 +56,10 @@
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
+
+#endif /* NM_LINUX64_H */
-Index: gdb-7.2.50.20110117/gdb/config/i386/nm-linux64.h
+Index: gdb-7.4.50.20120602/gdb/config/i386/nm-linux64.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110117/gdb/config/i386/nm-linux64.h 2011-01-17 16:01:48.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/config/i386/nm-linux64.h 2012-06-02 19:55:42.434178407 +0200
@@ -0,0 +1,28 @@
+/* Native support for GNU/Linux amd64.
+
@@ -85,11 +89,11 @@
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
+
+#endif /* NM_LINUX64_H */
-Index: gdb-7.2.50.20110117/gdb/target.h
+Index: gdb-7.4.50.20120602/gdb/target.h
===================================================================
---- gdb-7.2.50.20110117.orig/gdb/target.h 2011-01-14 14:47:15.000000000 +0100
-+++ gdb-7.2.50.20110117/gdb/target.h 2011-01-17 16:02:08.000000000 +0100
-@@ -1318,8 +1318,10 @@ extern char *normal_pid_to_str (ptid_t p
+--- gdb-7.4.50.20120602.orig/gdb/target.h 2012-06-01 18:37:59.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/target.h 2012-06-02 19:55:42.436178407 +0200
+@@ -1470,8 +1470,10 @@ 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... */
@@ -100,10 +104,10 @@
/* Returns the number of debug registers needed to watch the given
memory region, or zero if not supported. */
-Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2011-01-17 16:01:48.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2012-06-02 19:55:42.442178406 +0200
@@ -0,0 +1,40 @@
+# Copyright 2009, 2010 Free Software Foundation, Inc.
+
++++++ gdb-bz568248-oom-is-error.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -46,24 +46,23 @@
* utils.c (nomem): Change internal_error to error.
---- a/gdb/utils.c
-+++ b/gdb/utils.c
-@@ -1265,15 +1265,9 @@ void
- nomem (long size)
+Index: gdb-7.3.50.20110722/gdb/utils.c
+===================================================================
+--- gdb-7.3.50.20110722.orig/gdb/utils.c 2011-07-22 19:28:58.000000000 +0200
++++ gdb-7.3.50.20110722/gdb/utils.c 2011-07-22 19:34:25.000000000 +0200
+@@ -1219,13 +1219,11 @@ malloc_failure (long size)
{
if (size > 0)
-- {
+ {
- internal_error (__FILE__, __LINE__,
- _("virtual memory exhausted: can't allocate %ld bytes."),
- size);
-- }
-+ error (_("virtual memory exhausted: can't allocate %ld bytes."), size);
++ error (_("virtual memory exhausted: can't allocate %ld bytes."), size);
+ }
else
-- {
+ {
- internal_error (__FILE__, __LINE__, _("virtual memory exhausted."));
-- }
-+ error (_("virtual memory exhausted."));
++ error (_("virtual memory exhausted."));
+ }
}
- /* The xmalloc() (libiberty.h) family of memory management routines.
-
++++++ gdb-bz592031-siginfo-lost-4of5.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -78,11 +78,11 @@
* gdb.threads/sigstep-threads.exp: New file.
* gdb.threads/sigstep-threads.c: New file.
-Index: gdb-7.2.50.20110117/gdb/linux-nat.c
+Index: gdb-7.4.50.20120602/gdb/linux-nat.c
===================================================================
---- gdb-7.2.50.20110117.orig/gdb/linux-nat.c 2011-01-17 15:53:14.000000000 +0100
-+++ gdb-7.2.50.20110117/gdb/linux-nat.c 2011-01-17 16:05:57.000000000 +0100
-@@ -2803,6 +2803,8 @@ stop_wait_callback (struct lwp_info *lp,
+--- gdb-7.4.50.20120602.orig/gdb/linux-nat.c 2012-06-02 21:34:51.999517510 +0200
++++ gdb-7.4.50.20120602/gdb/linux-nat.c 2012-06-02 21:35:59.930491577 +0200
+@@ -2856,6 +2856,8 @@ stop_wait_callback (struct lwp_info *lp,
{
int status;
@@ -91,7 +91,7 @@
status = wait_lwp (lp);
if (status == 0)
return 0;
-@@ -2828,110 +2830,61 @@ stop_wait_callback (struct lwp_info *lp,
+@@ -2881,110 +2883,61 @@ stop_wait_callback (struct lwp_info *lp,
if (WSTOPSIG (status) != SIGSTOP)
{
@@ -146,9 +146,7 @@
- status_to_str ((int) status));
- kill_lwp (GET_LWP (lp->ptid), WSTOPSIG (lp->status));
- }
-+ /* Save the trap's siginfo in case we need it later. */
-+ save_siginfo (lp);
-
+-
- /* Save the sigtrap event. */
- lp->status = status;
- return 0;
@@ -157,7 +155,8 @@
- {
- /* The thread was stopped with a signal other than
- SIGSTOP, and didn't accidentally trip a breakpoint. */
-+ save_sigtrap (lp);
++ /* Save the trap's siginfo in case we need it later. */
++ save_siginfo (lp);
- if (debug_linux_nat)
- {
@@ -174,7 +173,8 @@
- "SWC: PTRACE_CONT %s, 0, 0 (%s)\n",
- target_pid_to_str (lp->ptid),
- errno ? safe_strerror (errno) : "OK");
--
++ save_sigtrap (lp);
+
- /* Hold this event/waitstatus while we check to see if
- there are any more (we still want to get that SIGSTOP). */
- stop_wait_callback (lp, NULL);
@@ -228,7 +228,7 @@
+
+ registers_changed ();
+ linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
-+ 1, TARGET_SIGNAL_0);
++ 1, GDB_SIGNAL_0);
+ if (debug_linux_nat)
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: %s %s, 0, 0 (discard SIGSTOP)\n",
@@ -248,11 +248,11 @@
lp->signalled = 0;
}
}
-@@ -3514,52 +3467,6 @@ retry:
+@@ -3616,54 +3569,6 @@ retry:
lp = NULL;
}
-- if (lp && lp->signalled)
+- if (lp && lp->signalled && lp->last_resume_kind != resume_stop)
- {
- /* A pending SIGSTOP may interfere with the normal stream of
- events. In a typical case where interference is a problem,
@@ -266,8 +266,10 @@
- /* Resume the thread. It should halt immediately returning the
- pending SIGSTOP. */
- registers_changed ();
+- if (linux_nat_prepare_to_resume != NULL)
+- linux_nat_prepare_to_resume (lp);
- linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
-- lp->step, TARGET_SIGNAL_0);
+- lp->step, GDB_SIGNAL_0);
- if (debug_linux_nat)
- fprintf_unfiltered (gdb_stdlog,
- "LLW: %s %s, 0, 0 (expect SIGSTOP)\n",
@@ -301,10 +303,10 @@
if (!target_can_async_p ())
{
/* Causes SIGINT to be passed on to the attached process. */
-Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.c
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/siginfo-threads.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.c 2011-01-17 16:02:40.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/siginfo-threads.c 2012-06-02 21:35:40.268499060 +0200
@@ -0,0 +1,447 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@@ -753,10 +755,10 @@
+
+ return EXIT_SUCCESS;
+}
-Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.exp
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/siginfo-threads.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.exp 2011-01-17 16:02:40.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/siginfo-threads.exp 2012-06-02 21:35:40.296499050 +0200
@@ -0,0 +1,94 @@
+# Copyright 2010 Free Software Foundation, Inc.
+
@@ -852,10 +854,10 @@
+}
+
+gdb_continue_to_breakpoint break-at-exit ".*break-at-exit.*"
-Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.c
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/sigstep-threads.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.c 2011-01-17 16:02:40.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/sigstep-threads.c 2012-06-02 21:35:40.297499050 +0200
@@ -0,0 +1,54 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@@ -911,10 +913,10 @@
+ start (NULL); /* main-start */
+ return 0;
+}
-Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.exp
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/sigstep-threads.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.exp 2011-01-17 16:02:40.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/sigstep-threads.exp 2012-06-02 21:35:40.297499050 +0200
@@ -0,0 +1,74 @@
+# Copyright 2010 Free Software Foundation, Inc.
+
++++++ gdb-bz592031-siginfo-lost-5of5.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -26,27 +26,27 @@
(linux_nat_set_siginfo_fixup): Use PTRACE_GETSIGINFO.
* linux-nat.h (struct lwp_info) <siginfo>: Remove.
-Index: gdb-7.2.50.20101116/gdb/linux-nat.c
+Index: gdb-7.4.50.20120602/gdb/linux-nat.c
===================================================================
---- gdb-7.2.50.20101116.orig/gdb/linux-nat.c 2010-11-16 09:12:26.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/linux-nat.c 2010-11-16 09:13:21.000000000 +0100
-@@ -1850,7 +1850,6 @@ resume_callback (struct lwp_info *lp, vo
- target_pid_to_str (lp->ptid));
- lp->stopped = 0;
- lp->step = 0;
-- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
- lp->stopped_by_watchpoint = 0;
- }
- else if (lp->stopped && debug_linux_nat)
-@@ -1993,7 +1992,6 @@ linux_nat_resume (struct target_ops *ops
- ptid = pid_to_ptid (GET_LWP (lp->ptid));
-
+--- gdb-7.4.50.20120602.orig/gdb/linux-nat.c 2012-06-02 21:36:21.067483466 +0200
++++ gdb-7.4.50.20120602/gdb/linux-nat.c 2012-06-02 21:37:55.345447402 +0200
+@@ -1929,7 +1929,6 @@ resume_lwp (struct lwp_info *lp, int ste
+ step, GDB_SIGNAL_0);
+ lp->stopped = 0;
+ lp->step = step;
+- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
+ lp->stopped_by_watchpoint = 0;
+ }
+ else
+@@ -2071,7 +2070,6 @@ linux_nat_resume (struct target_ops *ops
+ if (linux_nat_prepare_to_resume != NULL)
+ linux_nat_prepare_to_resume (lp);
linux_ops->to_resume (linux_ops, ptid, step, signo);
- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
lp->stopped_by_watchpoint = 0;
if (debug_linux_nat)
-@@ -2503,22 +2501,6 @@ wait_lwp (struct lwp_info *lp)
+@@ -2625,22 +2623,6 @@ wait_lwp (struct lwp_info *lp)
return status;
}
@@ -69,7 +69,7 @@
/* Send a SIGSTOP to LP. */
static int
-@@ -2787,9 +2769,6 @@ stop_wait_callback (struct lwp_info *lp,
+@@ -2885,9 +2867,6 @@ stop_wait_callback (struct lwp_info *lp,
{
/* The thread was stopped with a signal other than SIGSTOP. */
@@ -79,7 +79,7 @@
save_sigtrap (lp);
if (debug_linux_nat)
-@@ -3155,12 +3134,7 @@ linux_nat_filter_event (int lwpid, int s
+@@ -3291,12 +3270,7 @@ linux_nat_filter_event (int lwpid, int s
}
if (linux_nat_status_is_event (status))
@@ -93,20 +93,20 @@
/* Check if the thread has exited. */
if ((WIFEXITED (status) || WIFSIGNALED (status))
-@@ -3763,7 +3737,6 @@ resume_stopped_resumed_lwps (struct lwp_
+@@ -3950,7 +3924,6 @@ resume_stopped_resumed_lwps (struct lwp_
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
- lp->step, TARGET_SIGNAL_0);
+ lp->step, GDB_SIGNAL_0);
lp->stopped = 0;
- memset (&lp->siginfo, 0, sizeof (lp->siginfo));
lp->stopped_by_watchpoint = 0;
}
-@@ -5932,11 +5905,19 @@ linux_nat_set_siginfo_fixup (struct targ
- struct siginfo *
+@@ -5227,11 +5200,19 @@ linux_nat_set_prepare_to_resume (struct
+ siginfo_t *
linux_nat_get_siginfo (ptid_t ptid)
{
- struct lwp_info *lp = find_lwp_pid (ptid);
-+ static struct siginfo siginfo;
++ static siginfo_t siginfo;
+ int pid;
- gdb_assert (lp != NULL);
@@ -124,17 +124,17 @@
}
/* Provide a prototype to silence -Wmissing-prototypes. */
-Index: gdb-7.2.50.20101116/gdb/linux-nat.h
+Index: gdb-7.4.50.20120602/gdb/linux-nat.h
===================================================================
---- gdb-7.2.50.20101116.orig/gdb/linux-nat.h 2010-11-16 07:54:36.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/linux-nat.h 2010-11-16 09:12:44.000000000 +0100
-@@ -58,10 +58,6 @@ struct lwp_info
+--- gdb-7.4.50.20120602.orig/gdb/linux-nat.h 2012-06-02 21:36:21.067483466 +0200
++++ gdb-7.4.50.20120602/gdb/linux-nat.h 2012-06-02 21:36:27.140481144 +0200
+@@ -76,10 +76,6 @@ struct lwp_info
/* The kind of stepping of this LWP. */
enum resume_step step;
- /* Non-zero si_signo if this LWP stopped with a trap. si_addr may
- be the address of a hardware watchpoint. */
-- struct siginfo siginfo;
+- siginfo_t siginfo;
-
/* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
watchpoint trap. */
++++++ gdb-bz634108-solib_address.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,5 +1,7 @@
Fix gdb.solib_address (fix by Phil Muldoon).
+s/solib_address/solib_name/ during upstreaming.
+
--- /dev/null
+++ b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
@@ -0,0 +1,24 @@
@@ -26,4 +28,4 @@
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
+
-+gdb_test "python print gdb.solib_address(-1)" "None" "gdb.solib_address exists"
++gdb_test "python print gdb.solib_name(-1)" "None" "gdb.solib_name exists"
++++++ gdb-ccache-workaround.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -7,8 +7,8 @@
+# Workaround ccache making lineno non-zero for command-line definitions.
+if {[find_gcc] == "gcc" && [file executable "/usr/bin/gcc"]} {
+ set result [catch "exec which gcc" output]
-+ if {$result == 0 && [string first "/ccache/" $output] >= -1} {
-+ lappend options "compiler=/usr/bin/gcc"
++ if {$result == 0 && [string first "/ccache/" $output] > -1} {
++ lappend options "compiler=/usr/bin/gcc"
+ }
+}
+
++++++ gdb-core-open-vdso-warning.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -33,36 +33,35 @@
[ Context backport. ]
-Index: gdb-7.1.90.20100711/gdb/solib-svr4.c
+Index: gdb-7.4.50.20111218/gdb/solib-svr4.c
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/solib-svr4.c 2010-07-12 23:07:35.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/solib-svr4.c 2010-07-13 00:19:03.000000000 +0200
-@@ -1177,8 +1177,18 @@ svr4_current_sos (void)
- target_read_string (LM_NAME (new), &buffer,
- SO_NAME_MAX_PATH_SIZE - 1, &errcode);
- if (errcode != 0)
-- warning (_("Can't read pathname for load map: %s."),
-- safe_strerror (errcode));
-+ {
-+ /* During the first ever DSO list reading some strings may be
-+ unreadable as residing in the ld.so readonly memory not being
-+ present in a dumped core file. Delay the error check after
-+ the first pass of DSO list scanning when ld.so should be
-+ already mapped in and all the DSO list l_name memory gets
-+ readable. */
+--- gdb-7.4.50.20111218.orig/gdb/solib-svr4.c 2011-12-19 01:14:31.000000000 +0100
++++ gdb-7.4.50.20111218/gdb/solib-svr4.c 2011-12-19 01:31:10.106752164 +0100
+@@ -1222,8 +1222,17 @@ svr4_read_so_list (CORE_ADDR lm, struct
+ SO_NAME_MAX_PATH_SIZE - 1, &errcode);
+ if (errcode != 0)
+ {
+- warning (_("Can't read pathname for load map: %s."),
+- safe_strerror (errcode));
++ /* During the first ever DSO list reading some strings may be
++ unreadable as residing in the ld.so readonly memory not being
++ present in a dumped core file. Delay the error check after
++ the first pass of DSO list scanning when ld.so should be
++ already mapped in and all the DSO list l_name memory gets
++ readable. */
+
-+ if (master_so_list () != NULL)
-+ warning (_("Can't read pathname for load map: %s."),
-+ safe_strerror (errcode));
-+ }
- else
- {
- struct build_id *build_id;
-Index: gdb-7.1.90.20100711/gdb/solib.c
++ if (master_so_list () != NULL)
++ warning (_("Can't read pathname for load map: %s."),
++ safe_strerror (errcode));
++
+ do_cleanups (old_chain);
+ continue;
+ }
+Index: gdb-7.4.50.20111218/gdb/solib.c
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/solib.c 2010-05-17 01:49:58.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/solib.c 2010-07-13 00:21:01.000000000 +0200
-@@ -705,6 +705,7 @@ update_solib_list (int from_tty, struct
+--- gdb-7.4.50.20111218.orig/gdb/solib.c 2011-09-12 21:00:22.000000000 +0200
++++ gdb-7.4.50.20111218/gdb/solib.c 2011-12-19 01:29:04.815227898 +0100
+@@ -676,6 +676,7 @@ update_solib_list (int from_tty, struct
struct target_so_ops *ops = solib_ops (target_gdbarch);
struct so_list *inferior = ops->current_sos();
struct so_list *gdb, **gdb_link;
@@ -70,7 +69,7 @@
/* We can reach here due to changing solib-search-path or the
sysroot, before having any inferior. */
-@@ -844,6 +845,12 @@ Error while mapping shared library secti
+@@ -817,6 +818,12 @@ update_solib_list (int from_tty, struct
observer_notify_solib_loaded (i);
}
++++++ gdb-dejagnu-go.patch ++++++
http://sourceware.org/ml/gdb-patches/2012-06/msg00050.html
Subject: [patch] dejagnu compat. - missing find_go_linker [Re: [patch, doc RFA] Go language support]
On Wed, 25 Apr 2012 04:17:35 +0200, Doug Evans wrote:
+if {[info procs find_go_linker] == ""} {
+ rename gdb_find_go find_go
+ rename gdb_find_go_linker find_go_linker
+ # No need to set use_gdb_compile.
+}
Is there a reason for it? With recent Fedora 17 update
https://bugzilla.redhat.com/show_bug.cgi?id=635651
dejagnu has started to support 'find_gfortran'. But it still does not support
'find_go_linker'. This has resulted in regression failing to compile any
gdb.go/*.exp files.
Thanks,
Jan
gdb/testsuite/
2012-06-02 Jan Kratochvil
* lib/future.exp: Set $use_gdb_compile even if only find_go_linker is
missing.
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
index 40456c0..bf47988 100644
--- a/gdb/testsuite/lib/future.exp
+++ b/gdb/testsuite/lib/future.exp
@@ -514,7 +514,7 @@ if {[info procs find_gfortran] == ""} {
if {[info procs find_go_linker] == ""} {
rename gdb_find_go find_go
rename gdb_find_go_linker find_go_linker
- # No need to set use_gdb_compile.
+ set use_gdb_compile 1
}
if {$use_gdb_compile} {
++++++ gdb-disable-mcheck.patch ++++++
diff -dup -rup gdb-7.4.50.20120603-orig/gdb/configure gdb-7.4.50.20120603/gdb/configure
--- gdb-7.4.50.20120603-orig/gdb/configure 2012-06-06 19:08:32.824824699 +0200
+++ gdb-7.4.50.20120603/gdb/configure 2012-06-06 19:12:12.346992423 +0200
@@ -2706,7 +2706,7 @@ fi
# Provide more thorough testing by -lmcheck.
# Set it to 'true' for development snapshots, 'false' for releases or
# pre-releases.
-development=true
+development=false
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
diff -dup -rup gdb-7.4.50.20120603-orig/gdb/configure.ac gdb-7.4.50.20120603/gdb/configure.ac
--- gdb-7.4.50.20120603-orig/gdb/configure.ac 2012-06-06 19:08:32.817824693 +0200
+++ gdb-7.4.50.20120603/gdb/configure.ac 2012-06-06 19:12:05.545987227 +0200
@@ -26,7 +26,7 @@ AM_MAINTAINER_MODE
# Provide more thorough testing by -lmcheck.
# Set it to 'true' for development snapshots, 'false' for releases or
# pre-releases.
-development=true
+development=false
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS
++++++ gdb-dlopen-stap-probe-test.patch ++++++
commit 5bfdc32cd3bf373c3b02e1fd864ed8ceab0292b2
Author: Jan Kratochvil
Date: Mon Aug 8 12:08:53 2011 +0200
+testcase
Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c 2012-06-02 20:03:42.711393776 +0200
@@ -0,0 +1,40 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2011 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
+#include
+
+static void *
+tfunc (void *arg)
+{
+ void (*notifyp) (void) = arg;
+
+ notifyp ();
+}
+
+void
+f (void (*notifyp) (void))
+{
+ pthread_t t;
+ int i;
+
+ i = pthread_create (&t, NULL, tfunc, notifyp);
+ assert (i == 0);
+
+ i = pthread_join (t, NULL);
+ assert (i == 0);
+}
Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/dlopen-libpthread.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/dlopen-libpthread.c 2012-06-02 20:03:42.712393775 +0200
@@ -0,0 +1,46 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2011 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
+#include
+#include
+
+static const char *volatile filename;
+
+static void
+notify (void)
+{
+ filename = NULL; /* notify-here */
+}
+
+int
+main (void)
+{
+ void *h;
+ void (*fp) (void (*) (void));
+
+ assert (filename != NULL);
+ h = dlopen (filename, RTLD_LAZY);
+ assert (h != NULL);
+
+ fp = dlsym (h, "f");
+ assert (fp != NULL);
+
+ fp (notify);
+
+ return 0;
+}
Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.threads/dlopen-libpthread.exp 2012-06-02 20:03:42.724393771 +0200
@@ -0,0 +1,74 @@
+# Copyright 2011 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/.
+
+if {![istarget *-linux*] || [skip_shlib_tests]} {
+ return 0
+}
+
+load_lib prelink-support.exp
+
+set testfile "dlopen-libpthread"
+set srcmainfile ${testfile}.c
+set srclibfile ${testfile}-lib.c
+set executable ${testfile}
+set binfile_lib ${objdir}/${subdir}/${executable}.so
+set binfile ${objdir}/${subdir}/${executable}
+set lib_dlopen [shlib_target_file ${executable}.so]
+
+# Use build_executable_own_libs as prelinked libpthread.so can produce false
+# PASS - it is OK if GDB processes it still before relocation.
+
+set relink_args [build_executable_own_libs ${testfile}.exp ${executable}.so $srclibfile {debug shlib_pthreads} no]
+if {$relink_args == "" || ![prelink_no $relink_args]
+ || [prepare_for_testing ${testfile}.exp ${executable} ${srcmainfile} {debug shlib_load}] } {
+ return -1
+}
+gdb_load_shlibs $binfile_lib
+
+if { ![runto_main] } {
+ return -1
+}
+
+set test "print _dl_debug_notify"
+gdb_test_multiple $test $test {
+ -re " 0x\[0-9a-f\]+ <_dl_debug_notify>\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "No symbol \"_dl_debug_notify\" in current context\\.\r\n$gdb_prompt $" {
+ xfail $test
+ untested ${testfile}.exp
+ return
+ }
+}
+
+set test "libpthread.so not found"
+gdb_test_multiple "info sharedlibrary" $test {
+ -re "/libpthread\\.so.*\r\n$gdb_prompt $" {
+ fail $test
+ }
+ -re "/libc\\.so.*\r\n$gdb_prompt $" {
+ pass $test
+ }
+}
+
+gdb_test "set variable filename=\"$lib_dlopen\""
+
+gdb_breakpoint "notify"
+
+# The error was:
+# Cannot find new threads: generic error
+gdb_continue_to_breakpoint "notify" ".* notify-here .*"
+
+gdb_test "info sharedlibrary" {/libpthread\.so.*} "libpthread.so found"
Index: gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/testsuite/lib/gdb.exp 2012-06-02 19:11:56.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/testsuite/lib/gdb.exp 2012-06-02 20:03:42.727393770 +0200
@@ -3693,30 +3693,49 @@ proc build_executable { testname executa
set sources ${executable}.c
}
- set binfile ${objdir}/${subdir}/${executable}
-
- set objects {}
- for {set i 0} "\$i<[llength $sources]" {incr i} {
- set s [lindex $sources $i]
- if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $options] != "" } {
- untested $testname
- return -1
- }
- lappend objects "${binfile}${i}.o"
+ # get_compiler_info by gdb_compile_shlib and gdb_compile_shlib_pthreads.
+ set info_options ""
+ if { [lsearch -exact $options "c++"] >= 0 } {
+ set info_options "c++"
}
-
- if { [gdb_compile $objects "${binfile}" executable $options] != "" } {
- untested $testname
+ if [get_compiler_info binfile_unused ${info_options}] {
return -1
}
- set info_options ""
- if { [lsearch -exact $options "c++"] >= 0 } {
- set info_options "c++"
+ set binfile ${objdir}/${subdir}/${executable}
+
+ set func gdb_compile
+ set func_index [lsearch -regexp $options {^(pthreads|shlib|shlib_pthreads)$}]
+ if {$func_index != -1} {
+ set func "${func}_[lindex $options $func_index]"
}
- if [get_compiler_info ${binfile} ${info_options}] {
+
+ # gdb_compile_shlib and gdb_compile_shlib_pthreads do not use the 3rd
+ # parameter. They also requires $sources while gdb_compile and
+ # gdb_compile_pthreads require $objects.
+ if [string match gdb_compile_shlib* $func] {
+ set sources_path {}
+ foreach s $sources {
+ lappend sources_path "${srcdir}/${subdir}/${s}"
+ }
+ set ret [$func $sources_path "${binfile}" $options]
+ } else {
+ set objects {}
+ for {set i 0} "\$i<[llength $sources]" {incr i} {
+ set s [lindex $sources $i]
+ if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $options] != "" } {
+ untested $testname
+ return -1
+ }
+ lappend objects "${binfile}${i}.o"
+ }
+ set ret [$func $objects "${binfile}" executable $options]
+ }
+ if { $ret != "" } {
+ untested $testname
return -1
}
+
return 0
}
Index: gdb-7.4.50.20120602/gdb/testsuite/lib/prelink-support.exp
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/testsuite/lib/prelink-support.exp 2012-01-04 09:27:56.000000000 +0100
+++ gdb-7.4.50.20120602/gdb/testsuite/lib/prelink-support.exp 2012-06-02 20:03:42.733393768 +0200
@@ -95,8 +95,9 @@ proc file_copy {src dest} {
# Wrap function build_executable so that the resulting executable is fully
# self-sufficient (without dependencies on system libraries). Parameter
# INTERP may be used to specify a loader (ld.so) to be used that is
-# different from the default system one. Libraries on which the executable
-# depends are copied into directory DIR. Default DIR value to
+# different from the default system one. INTERP can be set to "no" if no ld.so
+# copy should be made. Libraries on which the executable depends are copied
+# into directory DIR. Default DIR value to
# `${objdir}/${subdir}/${EXECUTABLE}.d'.
#
# In case of success, return a string containing the arguments to be used
@@ -151,8 +152,15 @@ proc build_executable_own_libs {testname
if {$interp == ""} {
set interp_system [section_get $binfile .interp]
- set interp ${dir}/[file tail $interp_system]
- file_copy $interp_system $interp
+ if {$interp_system == ""} {
+ fail "$test could not find .interp"
+ } else {
+ set interp ${dir}/[file tail $interp_system]
+ file_copy $interp_system $interp
+ }
+ }
+ if {$interp == "no"} {
+ set interp ""
}
set dests {}
@@ -164,13 +172,19 @@ proc build_executable_own_libs {testname
# Do not lappend it so that "-rpath $dir" overrides any possible "-rpath"s
# specified by the caller to be able to link it for ldd" above.
- set options [linsert $options 0 "ldflags=-Wl,--dynamic-linker,$interp,-rpath,$dir"]
+ set options [linsert $options 0 "ldflags=-Wl,-rpath,$dir"]
+ if {$interp != ""} {
+ set options [linsert $options 0 "ldflags=-Wl,--dynamic-linker,$interp"]
+ }
if {[build_executable $testname $executable $sources $options] == -1} {
return ""
}
- set prelink_args "--dynamic-linker=$interp --ld-library-path=$dir $binfile $interp [concat $dests]"
+ set prelink_args "--ld-library-path=$dir $binfile [concat $dests]"
+ if {$interp != ""} {
+ set prelink_args "--dynamic-linker=$interp $prelink_args $interp"
+ }
return $prelink_args
}
Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.base/break-interp.exp
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/testsuite/gdb.base/break-interp.exp 2012-02-24 15:09:08.000000000 +0100
+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.base/break-interp.exp 2012-06-02 20:04:56.135369687 +0200
@@ -109,14 +109,21 @@ proc strip_debug {dest} {
}
}
+# Former symbol for solib changes notifications was _dl_debug_state, newer one
+# is dl_main (in fact _dl_debug_notify but it is inlined without any extra
+# debug info), the right one one traps by `set stop-on-solib-events 1'.
+
+set solib_bp {(_dl_debug_state|dl_main)}
+
# Implementation of reach.
proc reach_1 {func command displacement} {
- global gdb_prompt expect_out
+ global gdb_prompt expect_out solib_bp
- if {$func == "_dl_debug_state"} {
+ if {$func == $solib_bp} {
# Breakpoint on _dl_debug_state can have problems due to its overlap
# with the existing internal breakpoint from GDB.
+ # With also _dl_debug_notify we would need even two breakpoints.
gdb_test_no_output "set stop-on-solib-events 1"
} elseif {! [gdb_breakpoint $func allow-pending]} {
return
@@ -142,21 +149,21 @@ proc reach_1 {func command displacement}
exp_continue
}
-re "Breakpoint \[0-9\]+, \\.?(__GI_)?$func \\(.*\\) at .*:\[0-9\]+\r\n.*$gdb_prompt $" {
- if {$func == "_dl_debug_state"} {
+ if {$func == $solib_bp} {
fail $test
} else {
pass $test
}
}
-re "Breakpoint \[0-9\]+, \[0-9xa-f\]+ in \\.?(__GI_)?$func \\(\\).*\r\n$gdb_prompt $" {
- if {$func == "_dl_debug_state"} {
+ if {$func == $solib_bp} {
fail $test
} else {
pass $test
}
}
-re "Stopped due to (spurious )?shared library event.*\r\n$gdb_prompt $" {
- if {$func == "_dl_debug_state"} {
+ if {$func == $solib_bp} {
if {$debug_state_count == 0} {
# First stop does not yet relocate the _start function
# descriptor on ppc64.
@@ -175,7 +182,7 @@ proc reach_1 {func command displacement}
fail $test_displacement
}
- if {$func == "_dl_debug_state"} {
+ if {$func == $solib_bp} {
gdb_test_no_output "set stop-on-solib-events 0"
}
}
@@ -357,7 +364,7 @@ proc test_attach {file displacement {rel
}
proc test_ld {file ifmain trynosym displacement} {
- global srcdir subdir gdb_prompt expect_out inferior_exited_re
+ global srcdir subdir gdb_prompt expect_out inferior_exited_re solib_bp
# First test normal `file'-command loaded $FILE with symbols.
@@ -385,9 +392,9 @@ proc test_ld {file ifmain trynosym displ
gdb_test_no_output "set args ${objdir}/${subdir}/$binfile_test" "set args OBJDIR/${subdir}/$binfile_test"
}
- reach "_dl_debug_state" "run" $displacement
+ reach $solib_bp "run" $displacement
- gdb_test "bt" "#0 +\[^\r\n\]*\\m(__GI_)?_dl_debug_state\\M.*" "dl bt"
+ gdb_test "bt" "#0 +\[^\r\n\]*\\m(__GI_)?$solib_bp\\M.*" "dl bt"
if $ifmain {
reach "main" continue "NONE"
@@ -399,7 +406,7 @@ proc test_ld {file ifmain trynosym displ
# Try re-run if the new PIE displacement takes effect.
gdb_test "kill" "" "kill" {Kill the program being debugged\? \(y or n\) } "y"
- reach "_dl_debug_state" "run" $displacement
+ reach $solib_bp "run" $displacement
if $ifmain {
test_core $file $displacement
@@ -431,7 +438,7 @@ proc test_ld {file ifmain trynosym displ
gdb_test "exec-file $file" "exec-file $escapedfile" "load"
if $ifmain {
- reach "_dl_debug_state" run $displacement
+ reach $solib_bp run $displacement
# Use two separate gdb_test_multiple statements to avoid timeouts due
# to slow processing of wildcard capturing long output
++++++ gdb-dlopen-stap-probe.patch ++++++
From: Gary Benson
To: Jan Kratochvil
Message-ID: <20110810133605.GB7294@redhat.com>
Index: gdb-7.4.50.20120602/gdb/infrun.c
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/infrun.c 2012-06-02 21:38:07.236442883 +0200
+++ gdb-7.4.50.20120602/gdb/infrun.c 2012-06-02 21:38:13.450440507 +0200
@@ -361,6 +361,13 @@ static struct symbol *step_start_functio
/* Nonzero if we want to give control to the user when we're notified
of shared library events by the dynamic linker. */
int stop_on_solib_events;
+
+static void
+set_stop_on_solib_events (char *args, int from_tty, struct cmd_list_element *c)
+{
+ update_solib_breakpoints ();
+}
+
static void
show_stop_on_solib_events (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
@@ -7267,7 +7274,7 @@ Show stopping for shared library events.
If nonzero, gdb will give control to the user when the dynamic linker\n\
notifies gdb of shared library events. The most common event of interest\n\
to the user would be loading/unloading of a new library."),
- NULL,
+ set_stop_on_solib_events,
show_stop_on_solib_events,
&setlist, &showlist);
Index: gdb-7.4.50.20120602/gdb/solib-svr4.c
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/solib-svr4.c 2012-06-02 21:38:07.236442883 +0200
+++ gdb-7.4.50.20120602/gdb/solib-svr4.c 2012-06-02 21:44:23.973298737 +0200
@@ -47,6 +47,8 @@
#include "auxv.h"
#include "exceptions.h"
+#include "probe.h"
+
static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
static int svr4_have_link_map_offsets (void);
static void svr4_relocate_main_executable (void);
@@ -92,6 +94,32 @@ static const char * const solib_break_na
NULL
};
+/* A list of SystemTap probes which, if present in the dynamic linker,
+ allow more fine-grained breakpoints to be placed on shared library
+ events. */
+
+struct probe_info
+ {
+ /* The name of the probe. */
+ const char *name;
+
+ /* Nonzero if this probe must be stopped at even when
+ stop-on-solib-events is off. */
+ int mandatory;
+ };
+
+static const struct probe_info probe_info[] =
+{
+ {"rtld_init_start", 0},
+ {"rtld_init_complete", 1},
+ {"rtld_map_start", 0},
+ {"rtld_reloc_complete", 1},
+ {"rtld_unmap_start", 0},
+ {"rtld_unmap_complete", 1},
+};
+
+#define NUM_PROBES (sizeof(probe_info) / sizeof(probe_info[0]))
+
static const char * const bkpt_names[] =
{
"_start",
@@ -313,6 +341,12 @@ struct svr4_info
CORE_ADDR interp_text_sect_high;
CORE_ADDR interp_plt_sect_low;
CORE_ADDR interp_plt_sect_high;
+
+ /* SystemTap probes. */
+ VEC (probe_p) *probes[NUM_PROBES];
+
+ /* Nonzero if we are using the SystemTap interface. */
+ int using_probes;
};
/* Per-program-space data key. */
@@ -322,8 +356,15 @@ static void
svr4_pspace_data_cleanup (struct program_space *pspace, void *arg)
{
struct svr4_info *info;
+ int i;
info = program_space_data (pspace, solib_svr4_pspace_data);
+ if (info == NULL)
+ return;
+
+ for (i = 0; i < NUM_PROBES; i++)
+ VEC_free (probe_p, info->probes[i]);
+
xfree (info);
}
@@ -1449,6 +1490,126 @@ exec_entry_point (struct bfd *abfd, stru
targ);
}
+/* Helper function for svr4_update_solib_event_breakpoints. */
+
+static int
+svr4_update_solib_event_breakpoint (struct breakpoint *b, void *arg)
+{
+ struct svr4_info *info = get_svr4_info ();
+ struct bp_location *loc;
+
+ if (b->type != bp_shlib_event)
+ return 0;
+
+ for (loc = b->loc; loc; loc = loc->next)
+ {
+ int i;
+
+ for (i = 0; i < NUM_PROBES; i++)
+ {
+ if (!probe_info[i].mandatory)
+ {
+ struct probe *probe;
+ int ix;
+
+ for (ix = 0;
+ VEC_iterate (probe_p, info->probes[i], ix, probe);
+ ++ix)
+ {
+ if (loc->pspace == current_program_space
+ && loc->address == probe->address)
+ {
+ b->enable_state =
+ stop_on_solib_events ? bp_enabled : bp_disabled;
+ return 0;
+ }
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+/* Enable or disable optional solib event breakpoints as appropriate.
+ Called whenever stop_on_solib_events is changed. */
+
+static void
+svr4_update_solib_event_breakpoints (void)
+{
+ struct svr4_info *info = get_svr4_info ();
+
+ if (info->using_probes)
+ iterate_over_breakpoints (svr4_update_solib_event_breakpoint, NULL);
+}
+
+/* Both the SunOS and the SVR4 dynamic linkers call a marker function
+ before and after mapping and unmapping shared libraries. The sole
+ purpose of this method is to allow debuggers to set a breakpoint so
+ they can track these changes.
+
+ Some versions of the glibc dynamic linker contain SystemTap probes
+ to allow more fine grained stopping. Given the address of the
+ original marker function, this function attempts to find these
+ probes, and if found, sets breakpoints on those instead. If the
+ probes aren't found, a single breakpoint is set on the original
+ SVR4 marker function. */
+
+static void
+svr4_create_solib_event_breakpoints (struct gdbarch *gdbarch, CORE_ADDR address)
+{
+ struct svr4_info *info = get_svr4_info ();
+ struct obj_section *os;
+
+ os = find_pc_section (address);
+ if (os != NULL)
+ {
+ int all_probes_found = 1;
+ int i;
+
+ for (i = 0; i < NUM_PROBES; i++)
+ {
+ info->probes[i] = find_probes_in_objfile (os->objfile, "rtld",
+ probe_info[i].name);
+
+ if (!VEC_length(probe_p, info->probes[i]))
+ {
+ int j;
+
+ for (j = i - 1; j >= 0; j--)
+ {
+ VEC_free (probe_p, info->probes[j]);
+ info->probes[j] = NULL;
+ }
+
+ all_probes_found = 0;
+ break;
+ }
+ }
+
+ if (all_probes_found)
+ {
+ info->using_probes = 1;
+
+ for (i = 0; i < NUM_PROBES; i++)
+ {
+ struct probe *probe;
+ int ix;
+
+ for (ix = 0;
+ VEC_iterate (probe_p, info->probes[i], ix, probe);
+ ++ix)
+ create_solib_event_breakpoint (gdbarch, probe->address);
+ }
+
+ svr4_update_solib_event_breakpoints ();
+ return;
+ }
+ }
+
+ create_solib_event_breakpoint (gdbarch, address);
+}
+
/* Helper function for gdb_bfd_lookup_symbol. */
static int
@@ -1497,10 +1658,18 @@ enable_break (struct svr4_info *info, in
asection *interp_sect;
gdb_byte *interp_name;
CORE_ADDR sym_addr;
+ int i;
info->interp_text_sect_low = info->interp_text_sect_high = 0;
info->interp_plt_sect_low = info->interp_plt_sect_high = 0;
+ for (i = 0; i < NUM_PROBES; i++)
+ {
+ VEC_free (probe_p, info->probes[i]);
+ info->probes[i] = NULL;
+ }
+ info->using_probes = 0;
+
/* If we already have a shared library list in the target, and
r_debug contains r_brk, set the breakpoint there - this should
mean r_brk has already been relocated. Assume the dynamic linker
@@ -1532,7 +1701,7 @@ enable_break (struct svr4_info *info, in
That knowledge is encoded in the address, if it's Thumb the low bit
is 1. However, we've stripped that info above and it's not clear
what all the consequences are of passing a non-addr_bits_remove'd
- address to create_solib_event_breakpoint. The call to
+ address to svr4_create_solib_event_breakpoints. The call to
find_pc_section verifies we know about the address and have some
hope of computing the right kind of breakpoint to use (via
symbol info). It does mean that GDB needs to be pointed at a
@@ -1570,7 +1739,7 @@ enable_break (struct svr4_info *info, in
+ bfd_section_size (tmp_bfd, interp_sect);
}
- create_solib_event_breakpoint (target_gdbarch, sym_addr);
+ svr4_create_solib_event_breakpoints (target_gdbarch, sym_addr);
return 1;
}
}
@@ -1725,7 +1894,8 @@ enable_break (struct svr4_info *info, in
if (sym_addr != 0)
{
- create_solib_event_breakpoint (target_gdbarch, load_addr + sym_addr);
+ svr4_create_solib_event_breakpoints (target_gdbarch,
+ load_addr + sym_addr);
xfree (interp_name);
return 1;
}
@@ -1751,7 +1921,7 @@ enable_break (struct svr4_info *info, in
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
sym_addr,
¤t_target);
- create_solib_event_breakpoint (target_gdbarch, sym_addr);
+ svr4_create_solib_event_breakpoints (target_gdbarch, sym_addr);
return 1;
}
}
@@ -1767,7 +1937,7 @@ enable_break (struct svr4_info *info, in
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
sym_addr,
¤t_target);
- create_solib_event_breakpoint (target_gdbarch, sym_addr);
+ svr4_create_solib_event_breakpoints (target_gdbarch, sym_addr);
return 1;
}
}
@@ -2543,4 +2713,5 @@ _initialize_svr4_solib (void)
svr4_so_ops.lookup_lib_global_symbol = elf_lookup_lib_symbol;
svr4_so_ops.same = svr4_same;
svr4_so_ops.keep_data_in_core = svr4_keep_data_in_core;
+ svr4_so_ops.update_breakpoints = svr4_update_solib_event_breakpoints;
}
Index: gdb-7.4.50.20120602/gdb/solib.c
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/solib.c 2012-06-02 21:38:07.236442883 +0200
+++ gdb-7.4.50.20120602/gdb/solib.c 2012-06-02 21:38:13.455440507 +0200
@@ -1216,6 +1216,18 @@ no_shared_libraries (char *ignored, int
objfile_purge_solibs ();
}
+/* Enable or disable optional solib event breakpoints as appropriate. */
+
+void
+update_solib_breakpoints (void)
+{
+ struct target_so_ops *ops = solib_ops (target_gdbarch);
+
+ if (ops->update_breakpoints != NULL)
+ ops->update_breakpoints ();
+}
+
+
/* Reload shared libraries, but avoid reloading the same symbol file
we already have loaded. */
Index: gdb-7.4.50.20120602/gdb/solib.h
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/solib.h 2012-06-02 21:38:07.236442883 +0200
+++ gdb-7.4.50.20120602/gdb/solib.h 2012-06-02 21:38:13.464440503 +0200
@@ -91,4 +91,8 @@ extern CORE_ADDR gdb_bfd_lookup_symbol_f
void *),
void *data);
+/* Enable or disable optional solib event breakpoints as appropriate. */
+
+extern void update_solib_breakpoints (void);
+
#endif /* SOLIB_H */
Index: gdb-7.4.50.20120602/gdb/solist.h
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/solist.h 2012-06-02 21:38:07.236442883 +0200
+++ gdb-7.4.50.20120602/gdb/solist.h 2012-06-02 21:38:13.465440503 +0200
@@ -149,6 +149,13 @@ struct target_so_ops
core file (in particular, for readonly sections). */
int (*keep_data_in_core) (CORE_ADDR vaddr,
unsigned long size);
+
+ /* Enable or disable optional solib event breakpoints as
+ appropriate. This should be called whenever
+ stop_on_solib_events is changed. This pointer can be
+ NULL, in which case no enabling or disabling is necessary
+ for this target. */
+ void (*update_breakpoints) (void);
};
/* Free the memory associated with a (so_list *). */
++++++ gdb-fortran-common-reduce.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,8 +1,8 @@
-Index: gdb-7.2.50.20110117/gdb/f-lang.c
+Index: gdb-7.4.50.20120602/gdb/f-lang.c
===================================================================
---- gdb-7.2.50.20110117.orig/gdb/f-lang.c 2011-01-07 20:36:16.000000000 +0100
-+++ gdb-7.2.50.20110117/gdb/f-lang.c 2011-01-17 15:56:07.000000000 +0100
-@@ -57,20 +57,6 @@ typedef struct saved_bf_symnum SAVED_BF,
+--- gdb-7.4.50.20120602.orig/gdb/f-lang.c 2012-03-02 20:29:00.000000000 +0100
++++ gdb-7.4.50.20120602/gdb/f-lang.c 2012-06-02 19:13:31.520050654 +0200
+@@ -59,20 +59,6 @@ typedef struct saved_bf_symnum SAVED_BF,
/* Local functions */
extern void _initialize_f_language (void);
@@ -23,7 +23,7 @@
static void f_printchar (int c, struct type *type, struct ui_file * stream);
static void f_emit_char (int c, struct type *type,
-@@ -461,185 +447,7 @@ _initialize_f_language (void)
+@@ -385,185 +371,7 @@ _initialize_f_language (void)
add_language (&f_language_defn);
}
@@ -209,7 +209,7 @@
/* This routine finds the first encountred COMMON block named "name"
that belongs to function funcname. */
-@@ -662,193 +470,3 @@ find_common_for_function (char *name, ch
+@@ -586,193 +394,3 @@ find_common_for_function (const char *na
}
return (NULL);
}
@@ -403,18 +403,19 @@
- saved_function_list = NULL;
-}
-#endif
-Index: gdb-7.2.50.20110117/gdb/f-lang.h
+Index: gdb-7.4.50.20120602/gdb/f-lang.h
===================================================================
---- gdb-7.2.50.20110117.orig/gdb/f-lang.h 2011-01-17 15:47:37.000000000 +0100
-+++ gdb-7.2.50.20110117/gdb/f-lang.h 2011-01-17 15:54:14.000000000 +0100
-@@ -76,14 +76,9 @@ typedef struct saved_f77_common SAVED_F7
+--- gdb-7.4.50.20120602.orig/gdb/f-lang.h 2012-06-02 19:11:54.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/f-lang.h 2012-06-02 19:13:55.345317970 +0200
+@@ -76,15 +76,10 @@ typedef struct saved_f77_common SAVED_F7
typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR;
extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */
-extern SAVED_F77_COMMON_PTR tail_common_list; /* Ptr to last saved COMMON */
-extern SAVED_F77_COMMON_PTR current_common; /* Ptr to current COMMON */
- extern SAVED_F77_COMMON_PTR find_common_for_function (char *, char *);
+ extern SAVED_F77_COMMON_PTR find_common_for_function (const char *,
+ const char *);
-#define UNINITIALIZED_SECNUM -1
-#define COMMON_NEEDS_PATCHING(blk) ((blk)->secnum == UNINITIALIZED_SECNUM)
@@ -422,10 +423,10 @@
#define BLANK_COMMON_NAME_ORIGINAL "#BLNK_COM" /* XLF assigned */
#define BLANK_COMMON_NAME_MF77 "__BLNK__" /* MF77 assigned */
#define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */
-Index: gdb-7.2.50.20110117/gdb/f-valprint.c
+Index: gdb-7.4.50.20120602/gdb/f-valprint.c
===================================================================
---- gdb-7.2.50.20110117.orig/gdb/f-valprint.c 2011-01-17 15:47:37.000000000 +0100
-+++ gdb-7.2.50.20110117/gdb/f-valprint.c 2011-01-17 15:54:36.000000000 +0100
+--- gdb-7.4.50.20120602.orig/gdb/f-valprint.c 2012-06-02 19:11:54.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/f-valprint.c 2012-06-02 19:14:11.625313432 +0200
@@ -35,10 +35,6 @@
#include "command.h"
#include "block.h"
@@ -436,8 +437,8 @@
-
extern void _initialize_f_valprint (void);
static void info_common_command (char *, int);
- static void list_all_visible_commons (char *);
-@@ -604,67 +600,6 @@ info_common_command (char *comname, int
+ static void list_all_visible_commons (const char *);
+@@ -535,67 +531,6 @@ info_common_command (char *comname, int
comname, funname);
}
++++++ gdb-fortran-common.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -1,8 +1,8 @@
-Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
+Index: gdb-7.4.50.20120602/gdb/dwarf2read.c
===================================================================
---- gdb-7.2.90.20110525.orig/gdb/dwarf2read.c 2011-05-25 17:06:19.000000000 +0200
-+++ gdb-7.2.90.20110525/gdb/dwarf2read.c 2011-05-25 17:10:46.000000000 +0200
-@@ -7665,12 +7665,14 @@ read_set_type (struct die_info *die, str
+--- gdb-7.4.50.20120602.orig/gdb/dwarf2read.c 2012-06-02 21:32:41.746567299 +0200
++++ gdb-7.4.50.20120602/gdb/dwarf2read.c 2012-06-02 21:32:54.304562500 +0200
+@@ -9736,12 +9736,14 @@ read_set_type (struct die_info *die, str
return set_die_type (die, set_type, cu);
}
@@ -19,7 +19,7 @@
struct attribute *attr;
struct symbol *sym;
CORE_ADDR base = (CORE_ADDR) 0;
-@@ -7695,20 +7697,67 @@ read_common_block (struct die_info *die,
+@@ -9766,20 +9768,67 @@ read_common_block (struct die_info *die,
}
if (die->child != NULL)
{
@@ -87,7 +87,7 @@
}
}
-@@ -11376,6 +11425,13 @@ new_symbol_full (struct die_info *die, s
+@@ -13661,6 +13710,13 @@ new_symbol_full (struct die_info *die, s
{
var_decode_location (attr, sym, cu);
attr2 = dwarf2_attr (die, DW_AT_external, cu);
@@ -101,7 +101,7 @@
if (SYMBOL_CLASS (sym) == LOC_STATIC
&& SYMBOL_VALUE_ADDRESS (sym) == 0
&& !dwarf2_per_objfile->has_section_at_zero)
-@@ -11548,6 +11604,11 @@ new_symbol_full (struct die_info *die, s
+@@ -13825,6 +13881,11 @@ new_symbol_full (struct die_info *die, s
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
list_to_add = &global_symbols;
break;
@@ -113,11 +113,11 @@
default:
/* Not a tag we recognize. Hopefully we aren't processing
trash data, but since we must specifically ignore things
-Index: gdb-7.2.90.20110525/gdb/f-lang.c
+Index: gdb-7.4.50.20120602/gdb/f-lang.c
===================================================================
---- gdb-7.2.90.20110525.orig/gdb/f-lang.c 2011-05-25 17:06:22.000000000 +0200
-+++ gdb-7.2.90.20110525/gdb/f-lang.c 2011-05-25 17:07:02.000000000 +0200
-@@ -446,27 +446,3 @@ _initialize_f_language (void)
+--- gdb-7.4.50.20120602.orig/gdb/f-lang.c 2012-06-02 21:32:41.746567299 +0200
++++ gdb-7.4.50.20120602/gdb/f-lang.c 2012-06-02 21:32:54.305562499 +0200
+@@ -370,27 +370,3 @@ _initialize_f_language (void)
add_language (&f_language_defn);
}
@@ -128,7 +128,7 @@
- that belongs to function funcname. */
-
-SAVED_F77_COMMON_PTR
--find_common_for_function (char *name, char *funcname)
+-find_common_for_function (const char *name, const char *funcname)
-{
-
- SAVED_F77_COMMON_PTR tmp;
@@ -145,11 +145,11 @@
- }
- return (NULL);
-}
-Index: gdb-7.2.90.20110525/gdb/f-lang.h
+Index: gdb-7.4.50.20120602/gdb/f-lang.h
===================================================================
---- gdb-7.2.90.20110525.orig/gdb/f-lang.h 2011-05-25 17:06:22.000000000 +0200
-+++ gdb-7.2.90.20110525/gdb/f-lang.h 2011-05-25 17:07:02.000000000 +0200
-@@ -52,36 +52,8 @@ enum f90_range_type
+--- gdb-7.4.50.20120602.orig/gdb/f-lang.h 2012-06-02 21:32:41.746567299 +0200
++++ gdb-7.4.50.20120602/gdb/f-lang.h 2012-06-02 21:32:54.322562493 +0200
+@@ -52,37 +52,8 @@ enum f90_range_type
NONE_BOUND_DEFAULT /* "(low:high)" */
};
@@ -178,7 +178,8 @@
-
-extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */
-
--extern SAVED_F77_COMMON_PTR find_common_for_function (char *, char *);
+-extern SAVED_F77_COMMON_PTR find_common_for_function (const char *,
+- const char *);
-
#define BLANK_COMMON_NAME_ORIGINAL "#BLNK_COM" /* XLF assigned */
#define BLANK_COMMON_NAME_MF77 "__BLNK__" /* MF77 assigned */
@@ -186,11 +187,11 @@
/* When reasonable array bounds cannot be fetched, such as when
you ask to 'mt print symbols' and there is no stack frame and
-Index: gdb-7.2.90.20110525/gdb/f-valprint.c
+Index: gdb-7.4.50.20120602/gdb/f-valprint.c
===================================================================
---- gdb-7.2.90.20110525.orig/gdb/f-valprint.c 2011-05-25 17:06:22.000000000 +0200
-+++ gdb-7.2.90.20110525/gdb/f-valprint.c 2011-05-25 17:07:02.000000000 +0200
-@@ -34,6 +34,8 @@
+--- gdb-7.4.50.20120602.orig/gdb/f-valprint.c 2012-06-02 21:32:41.746567299 +0200
++++ gdb-7.4.50.20120602/gdb/f-valprint.c 2012-06-02 21:33:50.514541286 +0200
+@@ -34,10 +34,11 @@
#include "gdbcore.h"
#include "command.h"
#include "block.h"
@@ -199,12 +200,16 @@
extern void _initialize_f_valprint (void);
static void info_common_command (char *, int);
-@@ -501,22 +503,54 @@ f_val_print (struct type *type, const gd
- return 0;
+-static void list_all_visible_commons (const char *);
+ static void f77_create_arrayprint_offset_tbl (struct type *,
+ struct ui_file *);
+ static void f77_get_dynamic_length_of_aggregate (struct type *);
+@@ -420,22 +421,54 @@ f_val_print (struct type *type, const gd
+ gdb_flush (stream);
}
-static void
--list_all_visible_commons (char *funname)
+-list_all_visible_commons (const char *funname)
+static int
+info_common_command_for_block (struct block *block, struct frame_info *frame,
+ const char *comname)
@@ -212,7 +217,7 @@
- SAVED_F77_COMMON_PTR tmp;
-
- tmp = head_common_list;
-+ struct dict_iterator iter;
++ struct block_iterator iter;
+ struct symbol *sym;
+ int values_printed = 0;
+ const char *name;
@@ -267,21 +272,21 @@
}
/* This function is used to print out the values in a given COMMON
-@@ -526,11 +560,9 @@ list_all_visible_commons (char *funname)
+@@ -445,11 +478,9 @@ list_all_visible_commons (const char *fu
static void
info_common_command (char *comname, int from_tty)
{
- SAVED_F77_COMMON_PTR the_common;
- COMMON_ENTRY_PTR entry;
struct frame_info *fi;
-- char *funname = 0;
+- const char *funname = 0;
- struct symbol *func;
+ struct block *block;
+ int values_printed = 0;
/* We have been told to display the contents of F77 COMMON
block supposedly visible in this function. Let us
-@@ -542,74 +574,31 @@ info_common_command (char *comname, int
+@@ -461,74 +492,31 @@ info_common_command (char *comname, int
/* The following is generally ripped off from stack.c's routine
print_frame_info(). */
@@ -372,11 +377,11 @@
}
void
-Index: gdb-7.2.90.20110525/gdb/stack.c
+Index: gdb-7.4.50.20120602/gdb/stack.c
===================================================================
---- gdb-7.2.90.20110525.orig/gdb/stack.c 2011-05-25 17:05:21.000000000 +0200
-+++ gdb-7.2.90.20110525/gdb/stack.c 2011-05-25 17:07:02.000000000 +0200
-@@ -1525,6 +1525,8 @@ iterate_over_block_locals (struct block
+--- gdb-7.4.50.20120602.orig/gdb/stack.c 2012-06-02 21:32:41.746567299 +0200
++++ gdb-7.4.50.20120602/gdb/stack.c 2012-06-02 21:32:54.335562488 +0200
+@@ -1838,6 +1838,8 @@ iterate_over_block_locals (struct block
case LOC_COMPUTED:
if (SYMBOL_IS_ARGUMENT (sym))
break;
@@ -385,26 +390,26 @@
(*cb) (SYMBOL_PRINT_NAME (sym), sym, cb_data);
break;
-Index: gdb-7.2.90.20110525/gdb/symtab.h
+Index: gdb-7.4.50.20120602/gdb/symtab.h
===================================================================
---- gdb-7.2.90.20110525.orig/gdb/symtab.h 2011-05-25 17:05:21.000000000 +0200
-+++ gdb-7.2.90.20110525/gdb/symtab.h 2011-05-25 17:07:02.000000000 +0200
-@@ -411,7 +411,10 @@ typedef enum domain_enum_tag
- TYPES_DOMAIN,
-
- /* Any type. */
-- ALL_DOMAIN
-+ ALL_DOMAIN,
+--- gdb-7.4.50.20120602.orig/gdb/symtab.h 2012-06-02 21:32:41.746567299 +0200
++++ gdb-7.4.50.20120602/gdb/symtab.h 2012-06-02 21:32:54.342562486 +0200
+@@ -389,7 +389,10 @@ typedef enum domain_enum_tag
+
+ /* LABEL_DOMAIN may be used for names of labels (for gotos). */
+
+- LABEL_DOMAIN
++ LABEL_DOMAIN,
+
+ /* Fortran common blocks. Their naming must be separate from VAR_DOMAIN. */
+ COMMON_BLOCK_DOMAIN
- }
- domain_enum;
+ } domain_enum;
-Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.exp
+ /* Searching domains, used for `search_symbols'. Element numbers are
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.fortran/common-block.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.exp 2011-05-25 17:07:02.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.fortran/common-block.exp 2012-06-02 21:32:54.344562484 +0200
@@ -0,0 +1,101 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
@@ -428,7 +433,7 @@
+set srcfile ${testfile}.f90
+set binfile ${objdir}/${subdir}/${testfile}
+
-+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
+ untested "Couldn't compile ${srcfile}"
+ return -1
+}
@@ -507,10 +512,10 @@
+gdb_test "p ix_x" " = 1 *" "p ix_x in"
+gdb_test "p iy_y" " = 2 *" "p iy_y in"
+gdb_test "p iz_z2" " = 3 *" "p iz_z2 in"
-Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.f90
+Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.fortran/common-block.f90
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.f90 2011-05-25 17:07:02.000000000 +0200
++++ gdb-7.4.50.20120602/gdb/testsuite/gdb.fortran/common-block.f90 2012-06-02 21:32:54.345562483 +0200
@@ -0,0 +1,67 @@
+! Copyright 2008 Free Software Foundation, Inc.
+!
++++++ gdb-gdb-add-index-script.patch ++++++
--- /var/tmp/diff_new_pack.V6XLba/_old 2012-06-16 06:55:37.000000000 +0200
+++ /var/tmp/diff_new_pack.V6XLba/_new 2012-06-16 06:55:37.000000000 +0200
@@ -40,16 +40,16 @@
5 files changed, 57 insertions(+), 1 deletions(-)
create mode 100755 gdb/gdb-add-index
-Index: gdb-7.2.50.20101116/gdb/Makefile.in
+Index: gdb-7.4.50.20120103/gdb/Makefile.in
===================================================================
---- gdb-7.2.50.20101116.orig/gdb/Makefile.in 2010-11-16 08:03:17.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/Makefile.in 2010-11-16 08:47:45.000000000 +0100
-@@ -986,7 +986,16 @@ install-only: install-gstack $(CONFIG_IN
- $(SHELL) $(srcdir)/../mkinstalldirs \
- $(DESTDIR)$(man1dir) ; \
+--- gdb-7.4.50.20120103.orig/gdb/Makefile.in 2012-01-03 05:53:25.000000000 +0100
++++ gdb-7.4.50.20120103/gdb/Makefile.in 2012-01-03 15:24:25.693543435 +0100
+@@ -1033,7 +1033,16 @@ install-only: install-gstack $(CONFIG_IN
$(INSTALL_DATA) $(srcdir)/gdb.1 \
-- $(DESTDIR)$(man1dir)/$$transformed_name.1
-+ $(DESTDIR)$(man1dir)/$$transformed_name.1; \
+ $(DESTDIR)$(man1dir)/$$transformed_name.1 ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
+- $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
++ $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h; \
+ transformed_name=`t='$(program_transform_name)'; \
+ echo gdb-add-index | sed -e "$$t"` ; \
+ if test "x$$transformed_name" = x; then \
@@ -60,13 +60,13 @@
+ $(INSTALL_PROGRAM) $(srcdir)/gdb-add-index \
+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT)
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
- .PHONY: install-tui
- install-tui:
-Index: gdb-7.2.50.20101116/gdb/doc/gdb.texinfo
+
+ install-python:
+Index: gdb-7.4.50.20120103/gdb/doc/gdb.texinfo
===================================================================
---- gdb-7.2.50.20101116.orig/gdb/doc/gdb.texinfo 2010-11-16 08:04:18.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/doc/gdb.texinfo 2010-11-16 08:56:30.000000000 +0100
-@@ -15500,6 +15500,14 @@ There are currently some limitation on i
+--- gdb-7.4.50.20120103.orig/gdb/doc/gdb.texinfo 2012-01-03 15:20:54.000000000 +0100
++++ gdb-7.4.50.20120103/gdb/doc/gdb.texinfo 2012-01-03 15:23:43.295231946 +0100
+@@ -16228,6 +16228,14 @@ There are currently some limitation on i
for DWARF debugging information, not stabs. And, they do not
currently work for programs using Ada.
@@ -81,10 +81,10 @@
@node Symbol Errors
@section Errors Reading Symbol Files
-Index: gdb-7.2.50.20101116/gdb/gdb-add-index
+Index: gdb-7.4.50.20120103/gdb/gdb-add-index
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/gdb-add-index 2010-11-16 08:47:45.000000000 +0100
++++ gdb-7.4.50.20120103/gdb/gdb-add-index 2012-01-03 15:23:43.296231942 +0100
@@ -0,0 +1,30 @@
+#! /bin/sh
+
++++++ gdb-glibc-strstr-workaround.patch ++++++
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 53100c5..e7586ac 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -13306,6 +13306,25 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
/* Cache this symbol's name and the name's demangled form (if any). */
SYMBOL_SET_LANGUAGE (sym, cu->language);
linkagename = dwarf2_physname (name, die, cu);
+
+ /* Workaround for:
+ * invalid IFUNC DW_AT_linkage_name: memmove strstr time
+ * http://sourceware.org/bugzilla/show_bug.cgi?id=14166 */
+ if (strcmp (linkagename, "strstr") == 0
+ && strstr (objfile->name, "/libc") != NULL)
+ {
+ struct objfile *objfile_msym;
+ struct minimal_symbol *msym;
+
+ if (objfile->separate_debug_objfile_backlink)
+ objfile_msym = objfile->separate_debug_objfile_backlink;
+ else
+ objfile_msym = objfile;
+ msym = lookup_minimal_symbol ("strstr", NULL, objfile_msym);
+ if (msym && MSYMBOL_TYPE (msym) == mst_text_gnu_ifunc)
+ linkagename = "__strstr";
+ }
+
SYMBOL_SET_NAMES (sym, linkagename, strlen (linkagename), 0, objfile);
/* Fortran does not have mangling standard and the mangling does differ
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
new file mode 100644
index 0000000..575071f
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
@@ -0,0 +1,101 @@
+# Copyright (C) 2012 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/.
+
+# Workaround for:
+# invalid IFUNC DW_AT_linkage_name: memmove strstr time
+# http://sourceware.org/bugzilla/show_bug.cgi?id=14166
+
+if {[skip_shlib_tests]} {
+ return 0
+}
+
+set testfile "gnu-ifunc-strstr-workaround"
+set executable ${testfile}
+set srcfile start.c
+set binfile ${objdir}/${subdir}/${executable}
+
+if [prepare_for_testing ${testfile}.exp $executable $srcfile] {
+ return -1
+}
+
+if ![runto_main] {
+ return 0
+}
+
+set test "ptype atoi"
+gdb_test_multiple $test $test {
+ -re "type = int \\(const char \\*\\)\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "type = int \\(\\)\r\n$gdb_prompt $" {
+ untested "$test (no DWARF)"
+ return 0
+ }
+}
+
+set addr ""
+set test "print strstr"
+gdb_test_multiple $test $test {
+ -re " = {} (0x\[0-9a-f\]+) <strstr>\r\n$gdb_prompt $" {
+ set addr $expect_out(1,string)
+ pass $test
+ }
+ -re " = {} (0x\[0-9a-f\]+) <__strstr>\r\n$gdb_prompt $" {
+ set addr $expect_out(1,string)
+ pass "$test (GDB workaround or future fixed glibc)"
+ }
+ -re " = {char \\*\\(const char \\*, const char \\*\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
+ untested "$test (gnu-ifunc not in use by glibc)"
+ return 0
+ }
+}
+
+set test "info sym"
+gdb_test_multiple "info sym $addr" $test {
+ -re "strstr in section \\.text of /lib\[^/\]*/libc.so.6\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re " = {char \\*\\(const char \\*, const char \\*\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
+ # unexpected
+ xfail "$test (not in libc.so.6)"
+ return 0
+ }
+}
+
+set test "info addr strstr"
+gdb_test_multiple $test $test {
+ -re "Symbol \"strstr\" is a function at address $addr\\.\r\n$gdb_prompt $" {
+ fail "$test (DWARF for strstr)"
+ }
+ -re "Symbol \"strstr\" is at $addr in a file compiled without debugging\\.\r\n$gdb_prompt $" {
+ pass "$test"
+ }
+}
+
+set test "print strstr second time"
+gdb_test_multiple "print strstr" $test {
+ -re " = {} $addr <strstr>\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re " = {} $addr <__strstr>\r\n$gdb_prompt $" {
+ pass "$test (GDB workaround or future fixed glibc)"
+ }
+ -re " = {void \\*\\(void\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
+ fail $test
+ }
+}
+
+gdb_test {print strstr("abc","b")} { = 0x[0-9a-f]+ "bc"}
+gdb_test {print strstr("def","e")} { = 0x[0-9a-f]+ "ef"}
++++++ gdb-glibc-vdso-workaround.patch ++++++
http://sourceware.org/ml/gdb-patches/2011-08/msg00331.html
Subject: [RFC] Work around PR libc/13097 "linux-vdso.so.1" #2
Hi,
missed the x86_64-m32 case:
gdb/
2011-08-16 Jan Kratochvil
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)
TRY_CATCH (e, RETURN_MASK_ERROR)
{
- /* Fill in the rest of the `struct so_list' node. */
- if (!solib_map_sections (i))
+ /* Fill in the rest of the `struct so_list' node.
+ Work around PR libc/13097. */
+ if (!solib_map_sections (i)
+ && strcmp (i->so_original_name, "linux-vdso.so.1") != 0
+ && strcmp (i->so_original_name, "linux-gate.so.1") != 0)
{
not_found++;
if (not_found_filename == NULL)
++++++ gdb-index-assert.patch ++++++
http://sourceware.org/ml/gdb-patches/2012-06/msg00109.html
Subject: [RFA] Fix inconsistency in blockvector addrmap vs non-addrmap handling
Hi.
I was seeing the assert in dw2_find_pc_sect_psymtab trigger
and traced it to the fact that when pending_addrmap_interesting gets
set blockvector.map is used instead of blockvector.block.
The difference is that blockvector.block contains entries for the global
and static blocks whereas pending_addrmap doesn't.
This patch fixes this by making them consistent.
I suspect more work is necessary (e.g. can symtabs "overlap" even though
the individual pieces do not?).
But I first want to fix the regression introduced by the change
to dw2_find_pc_sect_psymtab: There is more code in a symtab than is
documented by function and lexical block pc ranges (e.g. C++ method thunks).
Regression tested on amd64-linux, and by verifying the assert no longer
triggers in the testcase I was using.
Ok to commit?
Note that this obviates the need for the patch in:
http://sourceware.org/ml/gdb-patches/2012-05/msg00958.html
Also note that this accompanies this patch:
http://sourceware.org/ml/gdb-patches/2012-06/msg00105.html
2012-06-04 Doug Evans
* buildsym.c (end_symtab): Add the range of the static block to
the pending addrmap.
Index: buildsym.c
===================================================================
RCS file: /cvs/src/src/gdb/buildsym.c,v
retrieving revision 1.97
diff -u -p -r1.97 buildsym.c
--- ./gdb/buildsym.c 29 May 2012 20:23:17 -0000 1.97
+++ ./gdb/buildsym.c 5 Jun 2012 00:26:01 -0000
@@ -1024,8 +1027,15 @@ end_symtab (CORE_ADDR end_addr, struct o
{
/* Define the STATIC_BLOCK & GLOBAL_BLOCK, and build the
blockvector. */
- finish_block (0, &file_symbols, 0, last_source_start_addr,
- end_addr, objfile);
+ struct block *static_block;
+
+ static_block = finish_block (0, &file_symbols, 0,
+ last_source_start_addr, end_addr,
+ objfile);
+ /* Mark the range of the static block so that if we end up using
+ blockvector.map then find_block_in_blockvector behaves identically
+ regardless of whether the addrmap is present. */
+ record_block_range (static_block, last_source_start_addr, end_addr - 1);
finish_block_internal (0, &global_symbols, 0, last_source_start_addr,
end_addr, objfile, 1);
blockvector = make_blockvector (objfile);
++++++ gdb-objfile-order.patch ++++++
http://sourceware.org/ml/gdb-patches/2012-05/msg01105.html
Subject: [RFA/commit 1/3] Revert "Search global symbols from the expression's block objfile first."
The search order used in this patch breaks global symbol lookups
for certain symbols when copy-relocation is used. A slightly different
search order will be implemented later.
gdb/ChangeLog:
Revert the following patch:
* findvar.c (default_read_var_value): For LOC_UNRESOLVED symbols,
try locating the symbol in the symbol's own objfile first, before
extending the search to all objfiles.
* symtab.c (lookup_symbol_aux_objfile): New function, extracted
out of lookup_symbol_aux_symtabs.
(lookup_symbol_aux_symtabs): Add new parameter "exclude_objfile".
Replace extracted-out code by call to lookup_symbol_aux_objfile.
Do not search EXCLUDE_OBJFILE.
(lookup_static_symbol_aux): Update call to lookup_symbol_aux_symtabs.
(lookup_symbol_global): Search for matches in the block's objfile
first, before searching all other objfiles.
Will commit if patches #2 & #3 are OK.
---
gdb/findvar.c | 10 +-----
gdb/symtab.c | 108 +++++++++++++++++----------------------------------------
2 files changed, 33 insertions(+), 85 deletions(-)
diff --git a/gdb/findvar.c b/gdb/findvar.c
index ed7903c..9009e6f 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -562,15 +562,7 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
struct minimal_symbol *msym;
struct obj_section *obj_section;
- /* First, try locating the associated minimal symbol within
- the same objfile. This prevents us from selecting another
- symbol with the same name but located in a different objfile. */
- msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (var), NULL,
- SYMBOL_SYMTAB (var)->objfile);
- /* If the lookup failed, try expanding the search to all
- objfiles. */
- if (msym == NULL)
- msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (var), NULL, NULL);
+ msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (var), NULL, NULL);
if (msym == NULL)
error (_("No global symbol \"%s\"."), SYMBOL_LINKAGE_NAME (var));
if (overlay_debugging)
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 85ddd1d..39d8c6f 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -95,8 +95,7 @@ struct symbol *lookup_symbol_aux_local (const char *name,
static
struct symbol *lookup_symbol_aux_symtabs (int block_index,
const char *name,
- const domain_enum domain,
- struct objfile *exclude_objfile);
+ const domain_enum domain);
static
struct symbol *lookup_symbol_aux_quick (struct objfile *objfile,
@@ -1360,7 +1359,7 @@ lookup_static_symbol_aux (const char *name, const domain_enum domain)
struct objfile *objfile;
struct symbol *sym;
- sym = lookup_symbol_aux_symtabs (STATIC_BLOCK, name, domain, NULL);
+ sym = lookup_symbol_aux_symtabs (STATIC_BLOCK, name, domain);
if (sym != NULL)
return sym;
@@ -1499,61 +1498,40 @@ lookup_global_symbol_from_objfile (const struct objfile *main_objfile,
return NULL;
}
-/* Check to see if the symbol is defined in one of the OBJFILE's
- symtabs. BLOCK_INDEX should be either GLOBAL_BLOCK or STATIC_BLOCK,
+/* Check to see if the symbol is defined in one of the symtabs.
+ BLOCK_INDEX should be either GLOBAL_BLOCK or STATIC_BLOCK,
depending on whether or not we want to search global symbols or
static symbols. */
static struct symbol *
-lookup_symbol_aux_objfile (struct objfile *objfile, int block_index,
- const char *name, const domain_enum domain)
-{
- struct symbol *sym = NULL;
- struct blockvector *bv;
- const struct block *block;
- struct symtab *s;
-
- if (objfile->sf)
- objfile->sf->qf->pre_expand_symtabs_matching (objfile, block_index,
- name, domain);
-
- ALL_OBJFILE_SYMTABS (objfile, s)
- if (s->primary)
- {
- bv = BLOCKVECTOR (s);
- block = BLOCKVECTOR_BLOCK (bv, block_index);
- sym = lookup_block_symbol (block, name, domain);
- if (sym)
- {
- block_found = block;
- return fixup_symbol_section (sym, objfile);
- }
- }
-
- return NULL;
-}
-
-/* Same as lookup_symbol_aux_objfile, except that it searches all
- objfiles except for EXCLUDE_OBJFILE. Return the first match found.
-
- If EXCLUDE_OBJFILE is NULL, then all objfiles are searched. */
-
-static struct symbol *
lookup_symbol_aux_symtabs (int block_index, const char *name,
- const domain_enum domain,
- struct objfile *exclude_objfile)
+ const domain_enum domain)
{
struct symbol *sym;
struct objfile *objfile;
+ struct blockvector *bv;
+ const struct block *block;
+ struct symtab *s;
ALL_OBJFILES (objfile)
{
- if (objfile != exclude_objfile)
- {
- sym = lookup_symbol_aux_objfile (objfile, block_index, name, domain);
- if (sym)
- return sym;
- }
+ if (objfile->sf)
+ objfile->sf->qf->pre_expand_symtabs_matching (objfile,
+ block_index,
+ name, domain);
+
+ ALL_OBJFILE_SYMTABS (objfile, s)
+ if (s->primary)
+ {
+ bv = BLOCKVECTOR (s);
+ block = BLOCKVECTOR_BLOCK (bv, block_index);
+ sym = lookup_block_symbol (block, name, domain);
+ if (sym)
+ {
+ block_found = block;
+ return fixup_symbol_section (sym, objfile);
+ }
+ }
}
return NULL;
@@ -1679,46 +1657,24 @@ lookup_symbol_global (const char *name,
const domain_enum domain)
{
struct symbol *sym = NULL;
- struct objfile *block_objfile = NULL;
struct objfile *objfile = NULL;
/* Call library-specific lookup procedure. */
- block_objfile = lookup_objfile_from_block (block);
- if (block_objfile != NULL)
- sym = solib_global_lookup (block_objfile, name, domain);
+ objfile = lookup_objfile_from_block (block);
+ if (objfile != NULL)
+ sym = solib_global_lookup (objfile, name, domain);
if (sym != NULL)
return sym;
- /* If BLOCK_OBJFILE is not NULL, then search this objfile first.
- In case the global symbol is defined in multiple objfiles,
- we have a better chance of finding the most relevant symbol. */
-
- if (block_objfile != NULL)
- {
- sym = lookup_symbol_aux_objfile (block_objfile, GLOBAL_BLOCK,
- name, domain);
- if (sym == NULL)
- sym = lookup_symbol_aux_quick (block_objfile, GLOBAL_BLOCK,
- name, domain);
- if (sym != NULL)
- return sym;
- }
-
- /* Symbol not found in the BLOCK_OBJFILE, so try all the other
- objfiles, starting with symtabs first, and then partial symtabs. */
-
- sym = lookup_symbol_aux_symtabs (GLOBAL_BLOCK, name, domain, block_objfile);
+ sym = lookup_symbol_aux_symtabs (GLOBAL_BLOCK, name, domain);
if (sym != NULL)
return sym;
ALL_OBJFILES (objfile)
{
- if (objfile != block_objfile)
- {
- sym = lookup_symbol_aux_quick (objfile, GLOBAL_BLOCK, name, domain);
- if (sym)
- return sym;
- }
+ sym = lookup_symbol_aux_quick (objfile, GLOBAL_BLOCK, name, domain);
+ if (sym)
+ return sym;
}
return NULL;
--
1.7.1
++++++ gdb-ppc-ptrace.diff ++++++
Index: gdb-7.4.50.20120603/gdb/ppc-linux-nat.c
===================================================================
--- gdb-7.4.50.20120603.orig/gdb/ppc-linux-nat.c 2012-06-01 00:07:31.000000000 +0200
+++ gdb-7.4.50.20120603/gdb/ppc-linux-nat.c 2012-06-12 15:17:59.537703950 +0200
@@ -1418,8 +1418,12 @@ have_ptrace_booke_interface (void)
if (tid == 0)
tid = PIDGET (inferior_ptid);
- /* Check for kernel support for BOOKE debug registers. */
- if (ptrace (PPC_PTRACE_GETHWDBGINFO, tid, 0, &booke_debug_info) >= 0)
+ /* Check for kernel support for BOOKE debug registers.
+ As a workaround while the new ptrace interface is not accepted
+ in upstream kernel, server processors still should use the old
+ interface. */
+ if (ptrace (PPC_PTRACE_GETHWDBGINFO, tid, 0, &booke_debug_info) >= 0
+ && ppc_linux_get_hwcap () & PPC_FEATURE_BOOKE)
{
/* Check whether ptrace BOOKE interface is functional and
provides any supported feature. */
++++++ gdb-python-rdynamic.patch ++++++
--- a/gdb/configure
+++ b/gdb/configure
@@ -14631,6 +14631,10 @@ rm -f core conftest.err conftest.$ac_objext \
# Problem does not happen for the recommended libpythonX.Y.so linkage.
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PYTHON_CFLAGS"
+ old_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+ old_LIBS="$LIBS"
+ LIBS="$LIBS $PYTHON_LIBS"
if test "$cross_compiling" = yes; then :
true
else
@@ -14657,6 +14661,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
CFLAGS="$old_CFLAGS"
+ CPPFLAGS="$old_CPPFLAGS"
+ LIBS="$old_LIBS"
fi
LDFLAGS="$old_LDFLAGS"
fi
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1576,6 +1576,10 @@ if test "${gdb_native}" = yes; then
# Problem does not happen for the recommended libpythonX.Y.so linkage.
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PYTHON_CFLAGS"
+ old_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+ old_LIBS="$LIBS"
+ LIBS="$LIBS $PYTHON_LIBS"
AC_RUN_IFELSE(
AC_LANG_PROGRAM(
[#include "]${have_libpython}[/Python.h"],
@@ -1586,6 +1590,8 @@ if test "${gdb_native}" = yes; then
return err == 0 ? 0 : 1;]),
[dynamic_list=true], [], [true])
CFLAGS="$old_CFLAGS"
+ CPPFLAGS="$old_CPPFLAGS"
+ LIBS="$old_LIBS"
fi
LDFLAGS="$old_LDFLAGS"
fi
++++++ gdb-readline62-ask-more-rh.patch ++++++
--- gdb-7.4.50.20120103-orig/gdb/event-top.c 2012-01-11 15:14:01.426206439 +0100
+++ gdb-7.4.50.20120103/gdb/event-top.c 2012-01-11 15:18:29.766577551 +0100
@@ -982,6 +982,11 @@ set_async_editing_command (char *args, i
void
gdb_setup_readline (void)
{
+ /* 6.2 regression: no longed asks for --more--
+ gdb.base/readline-ask.exp
+ https://bugzilla.redhat.com/show_bug.cgi?id=701131 */
+ RL_SETSTATE (RL_STATE_FEDORA_GDB);
+
/* This function is a noop for the sync case. The assumption is
that the sync setup is ALL done in gdb_init, and we would only
mess it up here. The sync stuff should really go away over
++++++ gdb-runtest-pie-override.patch ++++++
make check//unix/-fPIE/-pie RUNTESTFLAGS=solib-display.exp
gcc -fpic -c -fPIE -pie -o x.o x.c
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
=> Change the order for overrides.
One has to also use -fPIC rather than -fPIE, -fPIC is stronger.
The correct way would be:
make check//unix RUNTESTFLAGS='CC_FOR_TARGET=gcc\ -fPIC\ -pie CXX_FOR_TARGET=g++\ -fPIC\ -pie solib-display.exp'
But there is a problem with testsuite.unix non-unique subdir name and also
a problem with make -j parallelization of the testsuite.
--- gdb-7.3.50.20110722/gdb/testsuite/lib/future.exp 2011-10-11 16:44:05.000000000 +0200
+++ gdb-7.3.50.20110722/gdb/testsuite/lib/future.exp 2011-10-11 16:44:10.000000000 +0200
@@ -77,6 +77,10 @@ proc gdb_default_target_compile {source
set ldflags ""
set dest [target_info name]
+ if {[board_info $dest exists multilib_flags]} {
+ append add_flags " [board_info $dest multilib_flags]"
+ }
+
if {[info exists CFLAGS_FOR_TARGET]} {
append add_flags " $CFLAGS_FOR_TARGET"
}
@@ -333,10 +337,6 @@ proc gdb_default_target_compile {source
}
}
- if {[board_info $dest exists multilib_flags]} {
- append add_flags " [board_info $dest multilib_flags]"
- }
-
verbose "doing compile"
set sources ""
++++++ gdb-stale-frame_info.patch ++++++
http://sourceware.org/ml/gdb-patches/2012-04/msg00058.html
Subject: [downstream patch FYI] workaround stale frame_info * (PR 13866)
Hi,
I did not look at which commit caused this regression but apparently it was
introduced at least with multi-inferiors.
I understand this fix is not right fix of the crash; but in most GDB cases one
does not use multi-inferior so why to regress single-inferior by it.
Some more simple solutions still fix the single-inferior mode but they
regressed the multi-inferior mode
gdb.threads/no-unwaited-for-left.exp
gdb.multi/base.exp
so I had to put there that sorting magic.
With proper C++ sanity check of stale live frame_info references the testcase
would be simple without the "frame_garbage_collection" reproducer below.
It is also reproducible just with valgrind but regularly running the whole
testsuite under valgrind I did not find feasible.
No regressions on {x86_64,x86_64-m32,i686}-fedora17-linux-gnu.
Thanks,
Jan
gdb/
2012-04-04 Jan Kratochvil
Workaround PR backtrace/13866.
* progspace.c (switch_to_program_space_and_thread): Try not to call
switch_to_thread.
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -481,17 +481,28 @@ save_current_space_and_thread (void)
void
switch_to_program_space_and_thread (struct program_space *pspace)
{
- struct inferior *inf;
+ struct inferior *inf = current_inferior ();
- inf = find_inferior_for_program_space (pspace);
+ if (inf->pspace != pspace)
+ inf = find_inferior_for_program_space (pspace);
if (inf != NULL)
{
- struct thread_info *tp;
+ struct thread_info *tp, *current_tp = NULL;
+
+ if (ptid_get_pid (inferior_ptid) == inf->pid)
+ current_tp = find_thread_ptid (inferior_ptid);
tp = any_live_thread_of_process (inf->pid);
if (tp != NULL)
{
- switch_to_thread (tp->ptid);
+ /* Prefer primarily thread not THREAD_EXITED and secondarily thread
+ not EXECUTING. */
+ if (current_tp == NULL
+ || (tp->state != THREAD_EXITED
+ && current_tp->state == THREAD_EXITED)
+ || (!tp->executing && current_tp->executing))
+ switch_to_thread (tp->ptid);
+
/* Switching thread switches pspace implicitly. We're
done. */
return;
Reproducer with:
./gdb -nx ~/t/thread -ex 'b 24' -ex r -ex 'until 25'
Breakpoint 1, main () at /home/jkratoch/t/thread.c:24
24 v++;
Segmentation fault (core dumped)
#include
#include
#include
static int v;
static void *start (void *arg)
{
v++;
v++;
v++;
v++;
sleep (100);
return arg;
}
int main (void)
{
pthread_t thread1;
int i;
i = pthread_create (&thread1, NULL, start, NULL);
assert (i == 0);
v++;
v++;
v++;
v++;
i = pthread_join (thread1, NULL);
assert (i == 0);
return 0;
}
### --- a/gdb/frame.c
### +++ b/gdb/frame.c
### @@ -1522,12 +1522,30 @@ frame_observer_target_changed (struct target_ops *target)
### reinit_frame_cache ();
### }
###
### +typedef struct obstack obstack_s;
### +DEF_VEC_O (obstack_s);
### +static VEC (obstack_s) *frame_poison_vec;
### +
### +void frame_garbage_collection (void);
### +void
### +frame_garbage_collection (void)
### +{
### + struct obstack *obstack_p;
### + int ix;
### +
### + for (ix = 0; VEC_iterate (obstack_s, frame_poison_vec, ix, obstack_p); ix++)
### + obstack_free (obstack_p, 0);
### +
### + VEC_free (obstack_s, frame_poison_vec);
### + frame_poison_vec = NULL;
### +}
### +
### /* Flush the entire frame cache. */
###
### void
### reinit_frame_cache (void)
### {
### - struct frame_info *fi;
### + struct frame_info *fi, *fi_prev;
###
### /* Tear down all frame caches. */
### for (fi = current_frame; fi != NULL; fi = fi->prev)
### @@ -1538,8 +1556,14 @@ reinit_frame_cache (void)
### fi->base->unwind->dealloc_cache (fi, fi->base_cache);
### }
###
### + for (fi = current_frame; fi != NULL; fi = fi_prev)
### + {
### + fi_prev = fi->prev;
### + memset (fi, 0, sizeof (*fi));
### + }
### + VEC_safe_push (obstack_s, frame_poison_vec, &frame_cache_obstack);
### +
### /* Since we can't really be sure what the first object allocated was. */
### - obstack_free (&frame_cache_obstack, 0);
### obstack_init (&frame_cache_obstack);
###
### if (current_frame != NULL)
### --- a/gdb/top.c
### +++ b/gdb/top.c
### @@ -359,6 +359,11 @@ prepare_execute_command (void)
### if (non_stop)
### target_dcache_invalidate ();
###
### + {
### + extern void frame_garbage_collection (void);
### + frame_garbage_collection ();
### + }
### +
### return cleanup;
### }
###
++++++ gdb-upstream.patch ++++++
http://sourceware.org/ml/gdb-patches/2012-06/msg00065.html
Subject: [commit 1/2] testsuite: code_elim.exp: unique names
Hi,
this is just removal of non-unique test names and one small simplification.
Checked in.
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2012-06/msg00011.html
### src/gdb/testsuite/ChangeLog 2012/05/28 20:37:29 1.3209
### src/gdb/testsuite/ChangeLog 2012/06/03 17:06:04 1.3210
## -1,3 +1,16 @@
+2012-06-03 Jan Kratochvil
+
+ * gdb.base/code_elim.exp (add-symbol-file ${testfile1} 0x100000):
+ Simplify it to ...
+ (symbol-file ${testfile1}): ... here.
+ (test eliminated var my_global_symbol)
+ (test eliminated var my_static_symbol)
+ (test eliminated var my_global_func, get address of main): Wrap them to
+ 'single psymtabs' and 'single symtabs'
+ (get address of my_global_symbol, get address of my_static_symbol)
+ (get address of my_global_func, get address of main): Wrap them to
+ 'order1' and 'order2'.
+
2012-05-28 Jan Kratochvil
* gdb.server/solib-list-lib.c: New file.
--- src/gdb/testsuite/gdb.base/code_elim.exp 2012/01/16 16:21:44 1.4
+++ src/gdb/testsuite/gdb.base/code_elim.exp 2012/06/03 17:06:04 1.5
@@ -95,16 +95,16 @@
gdb_exit
gdb_start
-gdb_test "add-symbol-file ${binfile1} 0x100000" \
+gdb_test "symbol-file ${binfile1}" \
"Reading symbols from .*${testfile1}\\.\\.\\.done\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
- "add-symbol-file ${testfile1} 0x100000" \
- "add symbol table from file \".*${testfile1}\" at\[ \t\r\n\]+\.text_addr = 0x100000\[\r\n\]+\\(y or n\\) " \
- "y"
+ "symbol-file ${testfile1}"
-test_eliminated_var my_global_symbol
-test_eliminated_var my_static_symbol
-test_eliminated_var my_global_func
-not_null_var_address main
+with_test_prefix "single psymtabs" {
+ test_eliminated_var my_global_symbol
+ test_eliminated_var my_static_symbol
+ test_eliminated_var my_global_func
+ not_null_var_address main
+}
# Same thing for symtabs
@@ -115,10 +115,12 @@
gdb_start
set GDBFLAGS $saved_gdbflags
-test_eliminated_var my_global_symbol
-test_eliminated_var my_static_symbol
-test_eliminated_var my_global_func
-not_null_var_address main
+with_test_prefix "single symtabs" {
+ test_eliminated_var my_global_symbol
+ test_eliminated_var my_static_symbol
+ test_eliminated_var my_global_func
+ not_null_var_address main
+}
# binfile2 contains the symbols that have been eliminated in binfile1. Check
# the eliminated symbols does not hide these valid ones.
@@ -138,10 +140,12 @@
"add symbol table from file \".*${testfile2}\" at\[ \t\r\n\]+\.text_addr = 0x200000\[\r\n\]+\\(y or n\\) " \
"y"
-not_null_var_address my_global_symbol
-not_null_var_address my_static_symbol
-not_null_var_address my_global_func
-not_null_var_address main
+with_test_prefix "order1" {
+ not_null_var_address my_global_symbol
+ not_null_var_address my_static_symbol
+ not_null_var_address my_global_func
+ not_null_var_address main
+}
# Same thing, but loading binfile2 before binfile1.
@@ -160,9 +164,9 @@
"add symbol table from file \".*${testfile1}\" at\[ \t\r\n\]+\.text_addr = 0x100000\[\r\n\]+\\(y or n\\) " \
"y"
-not_null_var_address my_global_symbol
-not_null_var_address my_static_symbol
-not_null_var_address my_global_func
-not_null_var_address main
-
-
+with_test_prefix "order2" {
+ not_null_var_address my_global_symbol
+ not_null_var_address my_static_symbol
+ not_null_var_address my_global_func
+ not_null_var_address main
+}
http://sourceware.org/ml/gdb-patches/2012-06/msg00066.html
Subject: [commit 2/2] testsuite: code_elim.exp: Fix false FAIL
Hi,
with Fedora 18 x86_64 (Rawhide) there is a false FAIl since:
2167931cf70f91206efb8b01e848a55d82a347ce is the first bad commit
Author: Tom Tromey
Date: Fri May 18 15:31:39 2012 +0000
http://sourceware.org/bugzilla/show_bug.cgi?id=13907
print &my_global_symbol
-$1 = (int *) 0x804a004
-(gdb) PASS: gdb.base/code_elim.exp: get address of my_global_symbol
+$1 = (int *) 0x804a004
+(gdb) FAIL: gdb.base/code_elim.exp: get address of my_global_symbol
Nothing really changed, just GDB now prints and the testcase
expects either none or suffix.
This is because the two symbol files (their sections .data/.bss) have
overlapped so GDB chooses randomly which symbol to display. And since
Fedora 18 GCC puts there that "completed.5732" symbol.
This may be because add-symbol-file FILE ADDR relocates to ADDR on the .text
section and leaves other sections at their original place, which is IMO a bit
unexpected; it is a FAQ people expect more ADDR to be relocation displacement
(and not relative to .text and not limited to .text). But this is really
outside of the scope of this testcase false FAIL.
Checked in.
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2012-06/msg00012.html
### src/gdb/testsuite/ChangeLog 2012/06/03 17:06:04 1.3210
### src/gdb/testsuite/ChangeLog 2012/06/03 17:10:28 1.3211
## -11,6 +11,16 @@
(get address of my_global_func, get address of main): Wrap them to
'order1' and 'order2'.
+ * gdb.base/code_elim.exp
+ (add-symbol-file ${testfile1} 0x100000)
+ (add-symbol-file ${testfile2} 0x200000): Wrap them to 'order1' and
+ 'order2'.
+ (order1: add-symbol-file ${testfile1} 0x100000)
+ (order1: add-symbol-file ${testfile2} 0x200000)
+ (order2: add-symbol-file ${testfile2} 0x200000)
+ (order2: add-symbol-file ${testfile1} 0x100000): Add -s .data and -s
+ .bss as appropriate.
+
2012-05-28 Jan Kratochvil
* gdb.server/solib-list-lib.c: New file.
--- src/gdb/testsuite/gdb.base/code_elim.exp 2012/06/03 17:06:04 1.5
+++ src/gdb/testsuite/gdb.base/code_elim.exp 2012/06/03 17:10:28 1.6
@@ -128,19 +128,19 @@
gdb_exit
gdb_start
-gdb_test "add-symbol-file ${binfile1} 0x100000" \
- "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \
- "add-symbol-file ${testfile1} 0x100000" \
- "add symbol table from file \".*${testfile1}\" at\[ \t\r\n\]+\.text_addr = 0x100000\[\r\n\]+\\(y or n\\) " \
- "y"
-
-gdb_test "add-symbol-file ${binfile2} 0x200000" \
- "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \
- "add-symbol-file ${testfile2} 0x200000" \
- "add symbol table from file \".*${testfile2}\" at\[ \t\r\n\]+\.text_addr = 0x200000\[\r\n\]+\\(y or n\\) " \
- "y"
-
with_test_prefix "order1" {
+ gdb_test "add-symbol-file ${binfile1} 0x100000 -s .bss 0x120000" \
+ "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \
+ "add-symbol-file ${testfile1} 0x100000" \
+ "add symbol table from file \".*${testfile1}\" at.*\\(y or n\\) " \
+ "y"
+
+ gdb_test "add-symbol-file ${binfile2} 0x200000 -s .data 0x210000 -s .bss 0x220000" \
+ "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \
+ "add-symbol-file ${testfile2} 0x200000" \
+ "add symbol table from file \".*${testfile2}\" at.*\\(y or n\\) " \
+ "y"
+
not_null_var_address my_global_symbol
not_null_var_address my_static_symbol
not_null_var_address my_global_func
@@ -152,19 +152,19 @@
gdb_exit
gdb_start
-gdb_test "add-symbol-file ${binfile2} 0x200000" \
- "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \
- "add-symbol-file ${testfile2} 0x200000" \
- "add symbol table from file \".*${testfile2}\" at\[ \t\r\n\]+\.text_addr = 0x200000\[\r\n\]+\\(y or n\\) " \
- "y"
-
-gdb_test "add-symbol-file ${binfile1} 0x100000" \
- "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \
- "add-symbol-file ${testfile1} 0x100000" \
- "add symbol table from file \".*${testfile1}\" at\[ \t\r\n\]+\.text_addr = 0x100000\[\r\n\]+\\(y or n\\) " \
- "y"
-
with_test_prefix "order2" {
+ gdb_test "add-symbol-file ${binfile2} 0x200000 -s .data 0x210000 -s .bss 0x220000" \
+ "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \
+ "add-symbol-file ${testfile2} 0x200000" \
+ "add symbol table from file \".*${testfile2}\" at.*\\(y or n\\) " \
+ "y"
+
+ gdb_test "add-symbol-file ${binfile1} 0x100000 -s .bss 0x120000" \
+ "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \
+ "add-symbol-file ${testfile1} 0x100000" \
+ "add symbol table from file \".*${testfile1}\" at.*\\(y or n\\) " \
+ "y"
+
not_null_var_address my_global_symbol
not_null_var_address my_static_symbol
not_null_var_address my_global_func
http://sourceware.org/ml/gdb-cvs/2012-06/msg00047.html
### src/gdb/ChangeLog 2012/06/06 06:04:42 1.14330
### src/gdb/ChangeLog 2012/06/06 16:57:34 1.14331
## -1,3 +1,8 @@
+2012-06-06 Jan Kratochvil
+
+ * configure.ac: Move development=true below AC_INIT.
+ * configure: Regenerate.
+
2012-06-05 Stan Shebs
* mi/mi-interp.c (mi_interpreter_init): Set raw_stdout from
--- src/gdb/configure 2012/06/01 18:20:18 1.366
+++ src/gdb/configure 2012/06/06 16:57:36 1.367
@@ -2683,6 +2683,11 @@
+# Provide more thorough testing by -lmcheck.
+# Set it to 'true' for development snapshots, 'false' for releases or
+# pre-releases.
+development=true
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--- src/gdb/configure.ac 2012/06/01 18:20:18 1.177
+++ src/gdb/configure.ac 2012/06/06 16:57:38 1.178
@@ -18,16 +18,16 @@
dnl Process this file with autoconf to produce a configure script.
-dnl Provide more thorough testing by -lmcheck.
-dnl Set it to 'true' for development snapshots, 'false' for releases or
-dnl pre-releases.
-development=true
-
AC_PREREQ(2.59)dnl
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config.in)
AM_MAINTAINER_MODE
+# Provide more thorough testing by -lmcheck.
+# Set it to 'true' for development snapshots, 'false' for releases or
+# pre-releases.
+development=true
+
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS
ACX_LARGEFILE
++++++ gdb-x86-onstack-1of2.patch ++++++
http://sourceware.org/ml/gdb-patches/2012-03/msg00357.html
Subject: [patch 1/2] Fix gdb.cp/gdb2495.exp regression with gcc-4.7 #5
Hi,
posted as a new thread.
As described in
cancel: [patch] Fix gdb.cp/gdb2495.exp regression with gcc-4.7 #4 [Re: [revert] Regression on PowerPC]
http://sourceware.org/ml/gdb-patches/2012-03/msg00322.html
just ON_STACK had some regressions.
The expectations in that mail were wrong (at least that cleanup/fix is not
required for gdb.cp/gdb2495.exp).
The problem is that the inferior call return pad breakpoint instruction is
never removed even after inferior call finishes. It is even still visible in
"maintenance info breakpoints". This does not matter much for AT_ENTRY_POINT
but for ON_STACK it just corrupts stack.
No regressions on
{x86_64,x86_64-m32,i686}-fedora(15-rawhide)/rhel(5-6)-linux-gnu and for
gdbsever non-extended mode.
Thanks,
Jan
gdb/
2012-03-09 Jan Kratochvil
Remove momentary breakpoints for completed inferior calls.
* dummy-frame.c: Include gdbthread.h.
(pop_dummy_frame_bpt): New function.
(pop_dummy_frame): Initialie DUMMY earlier. Call pop_dummy_frame_bpt.
gdb/testsuite/
2012-03-09 Jan Kratochvil
Remove momentary breakpoints for completed inferior calls.
* gdb.base/call-signal-resume.exp (maintenance print dummy-frames)
(maintenance info breakpoints): New tests.
Index: gdb-7.4.50.20120602/gdb/dummy-frame.c
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/dummy-frame.c 2012-01-04 09:17:00.000000000 +0100
+++ gdb-7.4.50.20120602/gdb/dummy-frame.c 2012-06-02 20:42:40.907720327 +0200
@@ -29,6 +29,7 @@
#include "gdbcmd.h"
#include "gdb_string.h"
#include "observer.h"
+#include "gdbthread.h"
/* Dummy frame. This saves the processor state just prior to setting
up the inferior function call. Older targets save the registers
@@ -108,19 +109,36 @@ remove_dummy_frame (struct dummy_frame *
xfree (dummy);
}
+/* Delete any breakpoint B which is a momentary breakpoint for return from
+ inferior call matching DUMMY_VOIDP. */
+
+static int
+pop_dummy_frame_bpt (struct breakpoint *b, void *dummy_voidp)
+{
+ struct dummy_frame *dummy = dummy_voidp;
+
+ if (b->disposition == disp_del && frame_id_eq (b->frame_id, dummy->id)
+ && b->thread == pid_to_thread_id (inferior_ptid))
+ delete_breakpoint (b);
+
+ /* Continue the traversal. */
+ return 0;
+}
+
/* Pop *DUMMY_PTR, restoring program state to that before the
frame was created. */
static void
pop_dummy_frame (struct dummy_frame **dummy_ptr)
{
- struct dummy_frame *dummy;
+ struct dummy_frame *dummy = *dummy_ptr;
+
+ restore_infcall_suspend_state (dummy->caller_state);
- restore_infcall_suspend_state ((*dummy_ptr)->caller_state);
+ iterate_over_breakpoints (pop_dummy_frame_bpt, dummy);
/* restore_infcall_control_state frees inf_state,
all that remains is to pop *dummy_ptr. */
- dummy = *dummy_ptr;
*dummy_ptr = dummy->next;
xfree (dummy);
Index: gdb-7.4.50.20120602/gdb/testsuite/gdb.base/call-signal-resume.exp
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/testsuite/gdb.base/call-signal-resume.exp 2012-01-23 18:11:50.000000000 +0100
+++ gdb-7.4.50.20120602/gdb/testsuite/gdb.base/call-signal-resume.exp 2012-06-02 20:43:10.523709052 +0200
@@ -101,6 +101,18 @@ gdb_test "frame $frame_number" ".*"
gdb_test_no_output "set confirm off"
gdb_test "return" ""
+# Verify there are no remains of the dummy frame.
+gdb_test_no_output "maintenance print dummy-frames"
+set test "maintenance info breakpoints"
+gdb_test_multiple $test $test {
+ -re "call dummy.*\r\n$gdb_prompt $" {
+ fail $test
+ }
+ -re "\r\n$gdb_prompt $" {
+ pass $test
+ }
+}
+
# Resume execution, the program should continue without any signal.
gdb_test "break stop_two" "Breakpoint \[0-9\]* at .*"
++++++ gdb-x86-onstack-2of2.patch ++++++
http://sourceware.org/ml/gdb-patches/2012-03/msg00358.html
Subject: [patch 2/2] Fix gdb.cp/gdb2495.exp regression with gcc-4.7 #5
Hi,
here is the ON_STACK code again, with fixed alignment for i386 SSE.
It is generalized for all OSes on i386/amd64. I can move it to
{i386,amd64)-linux-tdep.c but I find this code much more lightweight than
i386_push_dummy_call which is already present in i386-tdep.
No regressions on
{x86_64,x86_64-m32,i686}-fedora(15-rawhide)/rhel(5-6)-linux-gnu and for
gdbsever non-extended mode.
For x86_64-fedora17-linux-gnu it fixes:
-FAIL: gdb.cp/gdb2495.exp: Call a function that raises an exception without a handler.
-FAIL: gdb.cp/gdb2495.exp: bt after returning from a popped frame
+PASS: gdb.cp/gdb2495.exp: Call a function that raises an exception without a handler.
+PASS: gdb.cp/gdb2495.exp: bt after returning from a popped frame
Thanks,
Jan
gdb/
2012-03-09 Jan Kratochvil
* amd64-dicos-tdep.c (amd64_dicos_push_dummy_code): Remove.
(amd64_dicos_init_abi): Remove its installment.
* dicos-tdep.c (dicos_init_abi): Remove the
set_gdbarch_call_dummy_location call. Update the comment here.
* i386-dicos-tdep.c (i386_dicos_push_dummy_code): Remove.
(i386_dicos_init_abi): Remove its installment.
* i386-tdep.c (i386_push_dummy_code): New function.
(i386_gdbarch_init): Call set_gdbarch_call_dummy_location, install
i386_push_dummy_code.
--- a/gdb/amd64-dicos-tdep.c
+++ b/gdb/amd64-dicos-tdep.c
@@ -23,24 +23,6 @@
#include "amd64-tdep.h"
#include "dicos-tdep.h"
-static CORE_ADDR
-amd64_dicos_push_dummy_code (struct gdbarch *gdbarch,
- CORE_ADDR sp, CORE_ADDR funaddr,
- struct value **args, int nargs,
- struct type *value_type,
- CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
- struct regcache *regcache)
-{
- int bplen;
- CORE_ADDR bppc = sp;
-
- gdbarch_breakpoint_from_pc (gdbarch, &bppc, &bplen);
- *bp_addr = sp - bplen;
- *real_pc = funaddr;
-
- return *bp_addr;
-}
-
static void
amd64_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -49,8 +31,6 @@ amd64_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
amd64_init_abi (info, gdbarch);
dicos_init_abi (gdbarch);
-
- set_gdbarch_push_dummy_code (gdbarch, amd64_dicos_push_dummy_code);
}
static enum gdb_osabi
--- a/gdb/dicos-tdep.c
+++ b/gdb/dicos-tdep.c
@@ -43,8 +43,8 @@ dicos_init_abi (struct gdbarch *gdbarch)
/* There's no (standard definition of) entry point or a guaranteed
text location with a symbol where to place the call dummy, so we
- put it on the stack. */
- set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
+ need it on the stack. Rely on i386_gdbarch_init used also for
+ amd64 to set up ON_STACK inferior calls. */
/* DICOS rewinds the PC itself. */
set_gdbarch_decr_pc_after_break (gdbarch, 0);
--- a/gdb/i386-dicos-tdep.c
+++ b/gdb/i386-dicos-tdep.c
@@ -22,32 +22,12 @@
#include "gdb_string.h"
#include "dicos-tdep.h"
-static CORE_ADDR
-i386_dicos_push_dummy_code (struct gdbarch *gdbarch,
- CORE_ADDR sp, CORE_ADDR funaddr,
- struct value **args, int nargs,
- struct type *value_type,
- CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
- struct regcache *regcache)
-{
- int bplen;
- CORE_ADDR bppc = sp;
-
- gdbarch_breakpoint_from_pc (gdbarch, &bppc, &bplen);
- *bp_addr = sp - bplen;
- *real_pc = funaddr;
-
- return *bp_addr;
-}
-
static void
i386_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
dicos_init_abi (gdbarch);
-
- set_gdbarch_push_dummy_code (gdbarch, i386_dicos_push_dummy_code);
}
static enum gdb_osabi
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -2326,6 +2326,30 @@ i386_16_byte_align_p (struct type *type)
return 0;
}
+/* Implementation for set_gdbarch_push_dummy_code. */
+
+static CORE_ADDR
+i386_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr,
+ struct value **args, int nargs, struct type *value_type,
+ CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
+ struct regcache *regcache)
+{
+ int bplen;
+ CORE_ADDR bppc = sp;
+
+ gdbarch_breakpoint_from_pc (gdbarch, &bppc, &bplen);
+ sp -= bplen;
+
+ /* amd64_push_dummy_call does alignment on its own but i386_push_dummy_call
+ does not. ABI requires stack alignment for executables using SSE. */
+ if (gdbarch_frame_align_p (gdbarch))
+ sp = gdbarch_frame_align (gdbarch, sp);
+
+ *bp_addr = sp;
+ *real_pc = funaddr;
+ return sp;
+}
+
static CORE_ADDR
i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
@@ -7372,6 +7396,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_get_longjmp_target (gdbarch, i386_get_longjmp_target);
/* Call dummy code. */
+ set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
+ set_gdbarch_push_dummy_code (gdbarch, i386_push_dummy_code);
set_gdbarch_push_dummy_call (gdbarch, i386_push_dummy_call);
set_gdbarch_frame_align (gdbarch, i386_frame_align);
++++++ gdbtui ++++++
#! /bin/sh
exec gdb -tui "$@"
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org