- 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
This commit is contained in:
parent
b9610957d2
commit
418be7985a
17
gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch
Normal file
17
gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch
Normal file
@ -0,0 +1,17 @@
|
||||
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;
|
91
gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
Normal file
91
gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
Normal file
@ -0,0 +1,91 @@
|
||||
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@prep.ai.mit.edu */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+int main (void)
|
||||
+{
|
||||
+ puts ("hello world");
|
||||
+ return 0;
|
||||
+}
|
20
gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
Normal file
20
gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
Normal file
@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
20
gdb.spec
20
gdb.spec
@ -11,7 +11,7 @@ Name: gdb
|
||||
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 @@ Patch180: gdb-6.5-bfd-hash-style-20060714.patch
|
||||
# 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 @@ Patch212: gdb-6.5-bz215816-readline-from-callback.patch
|
||||
# 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 @@ and printing their data.
|
||||
%patch179 -p1
|
||||
%patch180 -p1
|
||||
%patch181 -p1
|
||||
%patch182 -p1
|
||||
%patch183 -p1
|
||||
%patch184 -p1
|
||||
%patch185 -p1
|
||||
@ -434,6 +437,9 @@ and printing their data.
|
||||
%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 @@ fi
|
||||
# don't include the files in include, they are part of binutils
|
||||
|
||||
%changelog
|
||||
* Sat Dec 23 2006 Jan Kratochvil <jan.kratochvil@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@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.
|
||||
|
Loading…
Reference in New Issue
Block a user