rpms/gdb/devel gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch, NONE, 1.1 gdb-6.5-bz218379-ppc-solib-trampoline-test.patch, NONE, 1.1 gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch, NONE, 1.1 gdb-6.5-matching_bfd_sections.patch, 1.1, 1.2 gdb.spec, 1.210, 1.211 gdb-6.5-bz200533-ppc-solib_trampoline.patch, 1.2, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Sat Dec 23 21:32:23 UTC 2006


Author: jkratoch

Update of /cvs/dist/rpms/gdb/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv19901

Modified Files:
	gdb-6.5-matching_bfd_sections.patch gdb.spec 
Added Files:
	gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch 
	gdb-6.5-bz218379-ppc-solib-trampoline-test.patch 
	gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch 
Removed Files:
	gdb-6.5-bz200533-ppc-solib_trampoline.patch 
Log Message:
* Sat Dec 23 2006 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.5-21
- Try to reduce sideeffects of skipping ppc .so libs trampolines (BZ 218379).
- Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
- Resolves: rhbz#218379
- Related: rhbz#192964


gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch:
 minsyms.c |    5 +++++
 1 files changed, 5 insertions(+)

--- NEW FILE gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch ---
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379


--- gdb-6.5-depatched/gdb/minsyms.c	2006-12-17 16:10:53.000000000 -0500
+++ gdb-6.5/gdb/minsyms.c	2006-12-17 16:51:21.000000000 -0500
@@ -505,6 +505,11 @@
 			  don't fill the bfd_section member, so don't
 			  throw away symbols on those platforms.  */
 		       && SYMBOL_BFD_SECTION (&msymbol[hi]) != NULL
+		      /* Don't ignore symbols for solib trampolines.
+		         Limit its sideeffects - only for non-0 sized trampolines.
+		         Red Hat Bug 200533 with its regression Bug 218379.  */
+		      && (MSYMBOL_TYPE (&msymbol[hi]) != mst_solib_trampoline
+		          || MSYMBOL_SIZE (&msymbol[hi]))
 		      && (!matching_bfd_sections
 			  (SYMBOL_BFD_SECTION (&msymbol[hi]), section)))
 		  --hi;

gdb-6.5-bz218379-ppc-solib-trampoline-test.patch:
 step-over-trampoline.c   |   28 ++++++++++++++++++++++++
 step-over-trampoline.exp |   54 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+)

--- NEW FILE gdb-6.5-bz218379-ppc-solib-trampoline-test.patch ---
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379


--- /dev/null	2006-12-17 14:18:21.881669220 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.exp	2006-12-17 16:52:51.000000000 -0500
@@ -0,0 +1,54 @@
+# Copyright 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+
+if $tracelevel then {
+    strace $tracelevel
+}
+
+set testfile step-over-trampoline
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+    untested "Couldn't compile test program"
+    return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# For C programs, "start" should stop in main().
+
+gdb_test "start" \
+         "main \\(\\) at .*$srcfile.*" \
+         "start"
+
+# main () at hello2.c:5
+# 5		puts("hello world\n");
+# (gdb) next
+# 0x100007e0 in call___do_global_ctors_aux ()
+
+gdb_test_multiple "next" "invalid `next' output" {
+	-re "\nhello world.*return 0;.*" {
+		pass "stepped over"
+	}
+	-re " in call___do_global_ctors_aux \\(\\).*" {
+		fail "stepped into trampoline"
+	}
+}
--- /dev/null	2006-12-17 14:18:21.881669220 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.c	2006-12-17 16:18:12.000000000 -0500
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2006 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 2 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, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+   Please email any bugs, comments, and/or additions to this file to:
+   bug-gdb at prep.ai.mit.edu  */
+
+#include <stdio.h>
+
+int main (void)
+{
+	puts ("hello world");
+	return 0;
+}

gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch:
 symtab.c |    7 +++++++
 1 files changed, 7 insertions(+)

--- NEW FILE gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch ---
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379


diff -u -rup -x testsuite gdb-6.5-orig/gdb/symtab.c gdb-6.5/gdb/symtab.c
--- gdb-6.5-orig/gdb/symtab.c	2006-12-17 11:59:52.000000000 +0100
+++ gdb-6.5/gdb/symtab.c	2006-12-17 11:56:03.000000000 +0100
@@ -2139,6 +2139,13 @@ find_pc_sect_line (CORE_ADDR pc, struct 
 	  /* See above comment about why warning is commented out */
 	  /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
 	/* fall through */
+	/* `msymbol' trampoline may be located before its .text symbol
+	   but this text symbol may be the address we were looking for.
+	   Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
+	   Red Hat Bug 218379.  */
+	else if (SYMBOL_VALUE (mfunsym) == pc)
+	  warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", SYMBOL_LINKAGE_NAME (msymbol), paddr (pc));
+	/* fall through */
 	else
 	  return find_pc_line (SYMBOL_VALUE (mfunsym), 0);
       }

gdb-6.5-matching_bfd_sections.patch:
 Makefile.in |    2 -
 minsyms.c   |    4 +--
 printcmd.c  |    5 ++++
 symtab.c    |   65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 symtab.h    |    2 +
 5 files changed, 72 insertions(+), 6 deletions(-)

Index: gdb-6.5-matching_bfd_sections.patch
===================================================================
RCS file: /cvs/dist/rpms/gdb/devel/gdb-6.5-matching_bfd_sections.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.5-matching_bfd_sections.patch	2 Nov 2006 22:58:41 -0000	1.1
+++ gdb-6.5-matching_bfd_sections.patch	23 Dec 2006 21:32:21 -0000	1.2
@@ -37,9 +37,9 @@
     the symbol whose address is the largest address that is still less
     than or equal to PC, and matches SECTION (if non-NULL).  Returns a
 @@ -491,7 +490,8 @@ lookup_minimal_symbol_by_pc_section (COR
- 		       /* Don't ignore symbols for solib trampolines
- 			  Red Hat Bug 200533 and Bug 192964.  */
- 		       && MSYMBOL_TYPE (&msymbol[hi]) != mst_solib_trampoline
+ 			  don't fill the bfd_section member, so don't
+ 			  throw away symbols on those platforms.  */
+ 		       && SYMBOL_BFD_SECTION (&msymbol[hi]) != NULL
 -		       && SYMBOL_BFD_SECTION (&msymbol[hi]) != section)
 +		      && (!matching_bfd_sections
 +			  (SYMBOL_BFD_SECTION (&msymbol[hi]), section)))


Index: gdb.spec
===================================================================
RCS file: /cvs/dist/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -r1.210 -r1.211
--- gdb.spec	19 Dec 2006 19:26:15 -0000	1.210
+++ gdb.spec	23 Dec 2006 21:32:21 -0000	1.211
@@ -11,7 +11,7 @@
 Version: 6.5
 
 # The release always contains a leading reserved number, start it at 0.
-Release: 20%{?dist}
+Release: 21%{?dist}
 
 License: GPL
 Group: Development/Debuggers
@@ -221,9 +221,6 @@
 # Bugfix segv on the source display by ^X 1 (fixes Patch130, BZ 200048).
 Patch181: gdb-6.5-bz200048-find_line_pc-segv.patch
 
-# Do not step into the PPC solib trampolines (BZ 200533).
-Patch182: gdb-6.5-bz200533-ppc-solib_trampoline.patch
-
 # Fix exec() from threaded program, partial CVS backport (BZ 182116).
 Patch183: gdb-6.3-bz182116-exec-from-pthread.patch
 
@@ -312,6 +309,13 @@
 # Fix bogus 0x0 unwind of the thread's topmost function clone(3) (BZ 216711).
 Patch214: gdb-6.5-bz216711-clone-is-outermost.patch
 
+# Try to reduce sideeffects of skipping ppc .so libs trampolines (BZ 218379).
+Patch215: gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch
+Patch216: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch 
+
+# Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
+Patch217: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
+
 BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
 BuildRequires: flex bison sharutils
 
@@ -404,7 +408,6 @@
 %patch179 -p1
 %patch180 -p1
 %patch181 -p1
-%patch182 -p1
 %patch183 -p1
 %patch184 -p1
 %patch185 -p1
@@ -434,6 +437,9 @@
 %patch212 -p1
 %patch213 -p1
 %patch214 -p1
+%patch215 -p1
+%patch216 -p1
+%patch217 -p1
 
 # Change the version that gets printed at GDB startup, so it is RedHat
 # specific.
@@ -597,6 +603,10 @@
 # don't include the files in include, they are part of binutils
 
 %changelog
+* Sat Dec 23 2006 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.5-21
+- Try to reduce sideeffects of skipping ppc .so libs trampolines (BZ 218379).
+- Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
+
 * Tue Dec 19 2006 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.5-20
 - Fix bogus 0x0 unwind of the thread's topmost function clone(3) (BZ 216711).
 - Testcase for readline segfault on excessively long hand-typed lines.


--- gdb-6.5-bz200533-ppc-solib_trampoline.patch DELETED ---




More information about the fedora-cvs-commits mailing list