SOURCES: gdb-6.3-attach-see-vdso-test.patch (NEW), gdb-6.3-bt-past-zero-200...
arekm
arekm at pld-linux.org
Mon Mar 23 00:28:39 CET 2009
Author: arekm Date: Sun Mar 22 23:28:39 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- from fedora
---- Files affected:
SOURCES:
gdb-6.3-attach-see-vdso-test.patch (NONE -> 1.1) (NEW), gdb-6.3-bt-past-zero-20051201.patch (NONE -> 1.1) (NEW), gdb-6.3-bz140532-ppc-unwinding-test.patch (NONE -> 1.1) (NEW), gdb-6.3-bz202689-exec-from-pthread-test.patch (NONE -> 1.1) (NEW), gdb-6.3-bz231832-obstack-2gb.patch (NONE -> 1.1) (NEW), gdb-6.3-dtorfix-20050121.patch (NONE -> 1.1) (NEW), gdb-6.3-focus-cmd-prev-test.patch (NONE -> 1.1) (NEW), gdb-6.3-framepczero-20040927.patch (NONE -> 1.1) (NEW), gdb-6.3-gcore-thread-20050204.patch (NONE -> 1.1) (NEW), gdb-6.3-gstack-20050411.patch (NONE -> 1.1) (NEW), gdb-6.3-gstack-without-path-20060414.patch (NONE -> 1.1) (NEW), gdb-6.3-ia64-gcore-page0-20050421.patch (NONE -> 1.1) (NEW), gdb-6.3-ia64-gcore-speedup-20050714.patch (NONE -> 1.1) (NEW), gdb-6.3-ia64-info-frame-fix-20050725.patch (NONE -> 1.1) (NEW), gdb-6.3-ia64-sigill-20051115.patch (NONE -> 1.1) (NEW), gdb-6.3-ia64-sigtramp-fp-20050926.patch (NONE -> 1.1) (NEW), gdb-6.3-ia64-sigtramp-frame-2005
0708.patch (NONE -> 1.1) (NEW), gdb-6.3-inferior-notification-20050721.patch (NONE -> 1.1) (NEW), gdb-6.3-inheritance-20050324.patch (NONE -> 1.1) (NEW), gdb-6.3-inheritancetest-20050726.patch (NONE -> 1.1) (NEW), gdb-6.3-large-core-20051206.patch (NONE -> 1.1) (NEW), gdb-6.3-linespec-20041213.patch (NONE -> 1.1) (NEW), gdb-6.3-mapping-zero-inode-test.patch (NONE -> 1.1) (NEW), gdb-6.3-nonthreaded-wp-20050117.patch (NONE -> 1.1) (NEW), gdb-6.3-pie-20050110.patch (NONE -> 1.1) (NEW), gdb-6.3-ppc64displaysymbol-20041124.patch (NONE -> 1.1) (NEW), gdb-6.3-ppc64syscall-20040622.patch (NONE -> 1.1) (NEW), gdb-6.3-ppcdotsolib-20041022.patch (NONE -> 1.1) (NEW), gdb-6.3-readnever-20050907.patch (NONE -> 1.1) (NEW), gdb-6.3-removebp-20041130.patch (NONE -> 1.1) (NEW), gdb-6.3-rh-dummykfail-20041202.patch (NONE -> 1.1) (NEW), gdb-6.3-rh-testlibunwind1fix-20041202.patch (NONE -> 1.1) (NEW), gdb-6.3-rh-testlibunwind-20041202.patch (NONE -> 1.1) (NEW), gdb-6.3-rh-testve
rsion-20041202.patch (NONE -> 1.1) (NEW), gdb-6.3-security-errata-20050610.patch (NONE -> 1.1) (NEW), gdb-6.3-sepcrc-20050402.patch (NONE -> 1.1) (NEW), gdb-6.3-step-thread-exit-20050211-test.patch (NONE -> 1.1) (NEW), gdb-6.3-terminal-fix-20050214.patch (NONE -> 1.1) (NEW), gdb-6.3-test-dtorfix-20050121.patch (NONE -> 1.1) (NEW), gdb-6.3-test-movedir-20050125.patch (NONE -> 1.1) (NEW), gdb-6.3-test-pie-20050107.patch (NONE -> 1.1) (NEW), gdb-6.3-test-self-20050110.patch (NONE -> 1.1) (NEW), gdb-6.3-test-sepcrc-20050402.patch (NONE -> 1.1) (NEW), gdb-6.3-threaded-watchpoints2-20050225.patch (NONE -> 1.1) (NEW), gdb-6.3-watchpoint-cond-gone-test.patch (NONE -> 1.1) (NEW), gdb-6.5-BEA-testsuite.patch (NONE -> 1.1) (NEW), gdb-6.5-bz109921-DW_AT_decl_file-test.patch (NONE -> 1.1) (NEW), gdb-6.5-bz181390-memory-address-width.patch (NONE -> 1.1) (NEW), gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch (NONE -> 1.1) (NEW), gdb-6.5-bz190810-gdbserver-arch-advic
e.patch (NONE -> 1.1) (NEW), gdb-6.5-bz203661-emit-relocs.patch (NONE -> 1.1) (NEW), gdb-6.5-bz216711-clone-is-outermost.patch (NONE -> 1.1) (NEW), gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch (NONE -> 1.1) (NEW), gdb-6.5-bz218379-ppc-solib-trampoline-test.patch (NONE -> 1.1) (NEW), gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch (NONE -> 1.1) (NEW), gdb-6.5-bz243845-stale-testing-zombie-test.patch (NONE -> 1.1) (NEW), gdb-6.5-dwarf-stack-overflow.patch (NONE -> 1.1) (NEW), gdb-6.5-gcore-buffer-limit-test.patch (NONE -> 1.1) (NEW), gdb-6.5-gcore-i386-on-amd64.patch (NONE -> 1.1) (NEW), gdb-6.5-ia64-libunwind-leak-test.patch (NONE -> 1.1) (NEW), gdb-6.5-last-address-space-byte-test.patch (NONE -> 1.1) (NEW), gdb-6.5-missed-trap-on-step-test.patch (NONE -> 1.1) (NEW), gdb-6.5-readline-long-line-crash.patch (NONE -> 1.1) (NEW), gdb-6.5-readline-long-line-crash-test.patch (NONE -> 1.1) (NEW), gdb-6.5-section-num-fixup-test.patch (NONE -> 1.1) (NEW), gd
b-6.5-sharedlibrary-path.patch (NONE -> 1.1) (NEW), gdb-6.5-tls-of-separate-debuginfo.patch (NONE -> 1.1) (NEW), gdb-6.6-buildid-locate.patch (NONE -> 1.1) (NEW), gdb-6.6-buildid-locate-rpm.patch (NONE -> 1.1) (NEW), gdb-6.6-bz225783-gdb-debuginfo-paths.patch (NONE -> 1.1) (NEW), gdb-6.6-bz225783-prelink-path.patch (NONE -> 1.1) (NEW), gdb-6.6-bz229517-gcore-without-terminal.patch (NONE -> 1.1) (NEW), gdb-6.6-bz230000-power6-disassembly-test.patch (NONE -> 1.1) (NEW), gdb-6.6-bz235197-fork-detach-info.patch (NONE -> 1.1) (NEW), gdb-6.6-bz237572-ppc-atomic-sequence-test.patch (NONE -> 1.1) (NEW), gdb-6.6-bz247354-leader-exit-fix.patch (NONE -> 1.1) (NEW), gdb-6.6-bz247354-leader-exit-test.patch (NONE -> 1.1) (NEW), gdb-6.6-gcore32-test.patch (NONE -> 1.1) (NEW), gdb-6.6-multifork-debugreg.patch (NONE -> 1.1) (NEW), gdb-6.6-readline-system.patch (NONE -> 1.1) (NEW), gdb-6.6-scheduler_locking-step-is-default.patch (NONE -> 1.1) (NEW), gdb-6.6-scheduler_locking-s
tep-sw-watchpoints2.patch (NONE -> 1.1) (NEW), gdb-6.6-step-thread-exit.patch (NONE -> 1.1) (NEW), gdb-6.6-testsuite-timeouts.patch (NONE -> 1.1) (NEW), gdb-6.6-threads-static-test.patch (NONE -> 1.1) (NEW), gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch (NONE -> 1.1) (NEW), gdb-6.7-bz426600-DW_TAG_interface_type-test.patch (NONE -> 1.1) (NEW), gdb-6.7-charsign-test.patch (NONE -> 1.1) (NEW), gdb-6.7-kernel-headers-compat.patch (NONE -> 1.1) (NEW), gdb-6.7-ppc-clobbered-registers-O2-test.patch (NONE -> 1.1) (NEW), gdb-6.7-testsuite-stable-results.patch (NONE -> 1.1) (NEW), gdb-6.8-attach-signalled-detach-stopped.patch (NONE -> 1.1) (NEW), gdb-6.8-bz254229-gcore-prpsinfo.patch (NONE -> 1.1) (NEW), gdb-6.8-bz436037-reg-no-longer-active.patch (NONE -> 1.1) (NEW), gdb-6.8-bz442765-threaded-exec-test.patch (NONE -> 1.1) (NEW), gdb-6.8-bz457187-largefile.patch (NONE -> 1.1) (NEW), gdb-6.8-bz466901-backtrace-full-prelinked.patch (NONE -> 1.1) (NEW), gdb-6.8-consta
nt-watchpoints.patch (NONE -> 1.1) (NEW), gdb-6.8-ctors-dtors-unique.patch (NONE -> 1.1) (NEW), gdb-6.8-fortran-tag-constant.patch (NONE -> 1.1) (NEW), gdb-6.8-gcc35998-ada-memory-trash.patch (NONE -> 1.1) (NEW), gdb-6.8-glibc-headers-compat.patch (NONE -> 1.1) (NEW), gdb-6.8-inlining-addon.patch (NONE -> 1.1) (NEW), gdb-6.8-inlining-by-name.patch (NONE -> 1.1) (NEW), gdb-6.8-inlining.patch (NONE -> 1.1) (NEW), gdb-6.8-quit-never-aborts.patch (NONE -> 1.1) (NEW), gdb-6.8-sparc64-silence-memcpy-check.patch (NONE -> 1.1) (NEW), gdb-6.8-tui-singlebinary.patch (NONE -> 1.1) (NEW), gdb-6.8-watchpoint-conditionals-test.patch (NONE -> 1.1) (NEW), gdb-archer.patch (NONE -> 1.1) (NEW), gdb-fedora.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/gdb-6.3-attach-see-vdso-test.patch
diff -u /dev/null SOURCES/gdb-6.3-attach-see-vdso-test.patch:1.1
--- /dev/null Mon Mar 23 00:28:40 2009
+++ SOURCES/gdb-6.3-attach-see-vdso-test.patch Mon Mar 23 00:27:49 2009
@@ -0,0 +1,110 @@
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ ./gdb/testsuite/gdb.base/attach-see-vdso.c 6 Jul 2007 14:14:44 -0000
+@@ -0,0 +1,25 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++ Copyright 2007 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. */
++
++#include <unistd.h>
++
++int main ()
++{
++ pause ();
++ return 1;
++}
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ ./gdb/testsuite/gdb.base/attach-see-vdso.exp 6 Jul 2007 14:14:44 -0000
+@@ -0,0 +1,79 @@
++# Copyright 2007
++
++# 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.
++
++# This file was created by Jan Kratochvil <jan.kratochvil at redhat.com>.
++
++if $tracelevel then {
++ strace $tracelevel
++}
++
++set prms_id 0
++set bug_id 0
++
++# This test only works on Linux
++if { ![istarget "*-*-linux-gnu*"] } {
++ return 0
++}
++
++set testfile "attach-see-vdso"
++set srcfile ${testfile}.c
++set binfile ${objdir}/${subdir}/${testfile}
++set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
++
++# The kernel VDSO is used for the syscalls returns only on i386 (not x86_64).
++#
++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-m32}] != "" } {
++ gdb_suppress_entire_file "Testcase nonthraded compile failed, so all tests in this file will automatically fail."
++}
++
++if [get_compiler_info ${binfile}] {
++ return -1
++}
++
++# Start the program running and then wait for a bit, to be sure
++# that it can be attached to.
++
++set testpid [eval exec $binfile &]
++
++# Avoid some race:
++sleep 2
++
++# Start with clean gdb
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++# Never call: gdb_load ${binfile}
++# as the former problem would not reproduce otherwise.
++
++set test "attach"
++gdb_test_multiple "attach $testpid" "$test" {
++ -re "Attaching to process $testpid\r?\n.*$gdb_prompt $" {
++ pass "$test"
++ }
++}
++
++gdb_test "bt" "#0 *0x\[0-9a-f\]* in \[^?\].*" "backtrace decodes VDSO"
++
++# Exit and detach the process.
++
++gdb_exit
++
++# Make sure we don't leave a process around to confuse
++# the next test run (and prevent the compile by keeping
++# the text file busy), in case the "set should_exit" didn't
++# work.
++
++remote_exec build "kill -9 ${testpid}"
================================================================
Index: SOURCES/gdb-6.3-bt-past-zero-20051201.patch
diff -u /dev/null SOURCES/gdb-6.3-bt-past-zero-20051201.patch:1.1
--- /dev/null Mon Mar 23 00:28:41 2009
+++ SOURCES/gdb-6.3-bt-past-zero-20051201.patch Mon Mar 23 00:27:49 2009
@@ -0,0 +1,88 @@
+2005-12-01 Jeff Johnston <jjohnstn at redhat.com>
+
+ * frame.c (backtrace_past_zero_pc): New static variable.
+ (get_prev_frame): Don't return NULL for zero pc value if
+ backtrace past-zero-frame option is turned on.
+ (_initialize_frame): Initialize new command to allow backtracing
+ past a zero pc value (set backtrace past-zero-pc).
+
+testsuite/gdb.base:
+2005-12-01 Jeff Johnston <jjohnstn at redhat.com>
+
+ * setshow.exp: Add testing of "set backtrace past-zero-pc" option.
+
+2007-10-15 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ Port to GDB-6.7.
+
+Index: gdb-6.7/gdb/testsuite/gdb.base/setshow.exp
+===================================================================
+--- gdb-6.7.orig/gdb/testsuite/gdb.base/setshow.exp 2007-08-23 20:14:17.000000000 +0200
++++ gdb-6.7/gdb/testsuite/gdb.base/setshow.exp 2007-10-15 21:34:52.000000000 +0200
+@@ -106,6 +106,16 @@ if { ![target_info exists use_gdb_stub]
+ delete_breakpoints
+ gdb_test "run" "Starting program:.*foo bar blup baz bubble.*" "passing args"
+ }
++#test show backtrace past-zero-pc
++gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is off." "default show backtrace past-zero-pc (off)"
++#test set backtrace past-zero-pc on
++gdb_test "set backtrace past-zero-pc on" "" "set backtrace past-zero-pc on"
++#test show backtrace past-zero-pc
++gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is on." "show backtrace past-zero-pc (on)"
++#test set backtrace past-zero-pc off
++gdb_test "set backtrace past-zero-pc off" "" "set backtrace past-zero-pc off"
++#test show backtrace past-zero-pc
++gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is off." "show backtrace past-zero-pc (off)"
+ #test set check range on
+ gdb_test "set check range on" "" "set check range on"
+ #test show check range on
+Index: gdb-6.7/gdb/frame.c
+===================================================================
+--- gdb-6.7.orig/gdb/frame.c 2007-10-12 22:35:58.000000000 +0200
++++ gdb-6.7/gdb/frame.c 2007-10-15 21:34:52.000000000 +0200
+@@ -133,6 +133,16 @@ Whether backtraces should continue past
+ value);
+ }
+
++static int backtrace_past_zero_pc;
++static void
++show_backtrace_past_zero_pc (struct ui_file *file, int from_tty,
++ struct cmd_list_element *c, const char *value)
++{
++ fprintf_filtered (file, _("\
++Whether backtraces should continue past a zero pc value is %s.\n"),
++ value);
++}
++
+ static int backtrace_past_entry;
+ static void
+ show_backtrace_past_entry (struct ui_file *file, int from_tty,
+@@ -1483,9 +1493,7 @@ get_prev_frame (struct frame_info *this_
+ }
+
+ if (this_frame->level > 0
+-#if 0
+- && backtrace_past_zero_pc
+-#endif
++ && !backtrace_past_zero_pc
+ && get_frame_type (this_frame) == NORMAL_FRAME
+ && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
+ && get_frame_pc (this_frame) == 0)
+@@ -1850,6 +1858,17 @@ the rest of the stack trace."),
+ &set_backtrace_cmdlist,
+ &show_backtrace_cmdlist);
+
++ add_setshow_boolean_cmd ("past-zero-pc", class_obscure,
++ &backtrace_past_zero_pc, _("\
++Set whether backtraces should continue past a zero pc value."), _("\
++Show whether backtraces should continue past a zero pc value."), _("\
++Normally GDB stops backtracing when it finds a zero pc.\n\
++Set this variable if you need to see the rest of the stack trace."),
++ NULL,
++ show_backtrace_past_zero_pc,
++ &set_backtrace_cmdlist,
++ &show_backtrace_cmdlist);
++
+ add_setshow_integer_cmd ("limit", class_obscure,
+ &backtrace_limit, _("\
+ Set an upper bound on the number of backtrace levels."), _("\
================================================================
Index: SOURCES/gdb-6.3-bz140532-ppc-unwinding-test.patch
diff -u /dev/null SOURCES/gdb-6.3-bz140532-ppc-unwinding-test.patch:1.1
--- /dev/null Mon Mar 23 00:28:41 2009
+++ SOURCES/gdb-6.3-bz140532-ppc-unwinding-test.patch Mon Mar 23 00:27:49 2009
@@ -0,0 +1,317 @@
+diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
+--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 1969-12-31 19:00:00.000000000 -0500
++++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 2007-08-02 13:23:10.000000000 -0400
+@@ -0,0 +1,78 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++ Copyright 2007 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. */
++
++ .section ".text"
++ .align 2
++ .globl func0
++ .type func0, @function
++func0:
++ stwu 1,-16(1)
++ mflr 0
++ stw 31,12(1)
++ stw 0,20(1)
++ mr 31,1
++ bl abort
++ .size func0, .-func0
++ .align 2
++ .globl func1
++ .type func1, @function
++func1:
++ stwu 1,-16(1)
++ mflr 0
++/* 20 = BO = branch always
++ 31 = BI = CR bit (ignored) */
++ bcl 20,31,.Lpie
++.Lpie: stw 31,12(1)
++ stw 0,20(1)
++ mr 31,1
++ bl func0
++ mr 0,3
++ lis 9,var at ha
++ lwz 9,var at l(9)
++ add 0,0,9
++ mr 3,0
++ lwz 11,0(1)
++ lwz 0,4(11)
++ mtlr 0
++ lwz 31,-4(11)
++ mr 1,11
++ blr
++ .size func1, .-func1
++ .section .note.GNU-stack,"", at progbits
++ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
++
++/* Original source file:
++
++#include <stdlib.h>
++
++extern volatile int var;
++
++int func0 (void) __attribute__((__noinline__));
++int func0 (void)
++{
++ abort ();
++ return var;
++}
++
++int func1 (void) __attribute__((__noinline__));
++int func1 (void)
++{
++ return func0 () + var;
++}
++
++*/
+diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
+--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 1969-12-31 19:00:00.000000000 -0500
++++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 2007-08-02 14:28:56.000000000 -0400
+@@ -0,0 +1,98 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++ Copyright 2007 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. */
++
++ .section ".toc","aw"
++ .section ".text"
++ .align 2
++ .globl func0
++ .section ".opd","aw"
++ .align 3
++func0:
++ .quad .L.func0,.TOC. at tocbase
++ .previous
++ .type func0, @function
++.L.func0:
++ mflr 0
++ std 31,-8(1)
++ std 0,16(1)
++ stdu 1,-128(1)
++ mr 31,1
++ bl abort
++ nop
++ .long 0
++ .byte 0,0,0,1,128,1,0,1
++ .size func0,.-.L.func0
++ .section ".toc","aw"
++.LC1:
++ .tc var[TC],var
++ .section ".text"
++ .align 2
++ .globl func1
++ .section ".opd","aw"
++ .align 3
++func1:
++ .quad .L.func1,.TOC. at tocbase
++ .previous
++ .type func1, @function
++.L.func1:
++ mflr 0
++/* 20 = BO = branch always
++ 31 = BI = CR bit (ignored) */
++ bcl 20,31,.Lpie
++.Lpie: std 31,-8(1)
++ std 0,16(1)
++ stdu 1,-128(1)
++ mr 31,1
++ bl func0
++ mr 11,3
++ ld 9,.LC1 at toc(2)
++ lwz 0,0(9)
++ add 0,11,0
++ extsw 0,0
++ mr 3,0
++ ld 1,0(1)
++ ld 0,16(1)
++ mtlr 0
++ ld 31,-8(1)
++ blr
++ .long 0
++ .byte 0,0,0,1,128,1,0,1
++ .size func1,.-.L.func1
++ .section .note.GNU-stack,"", at progbits
++ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
++
++/* Original source file:
++
++#include <stdlib.h>
++
++extern volatile int var;
++
++int func0 (void) __attribute__((__noinline__));
++int func0 (void)
++{
++ abort ();
++ return var;
++}
++
++int func1 (void) __attribute__((__noinline__));
++int func1 (void)
++{
++ return func0 () + var;
++}
++
++*/
+diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
+--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 1969-12-31 19:00:00.000000000 -0500
++++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 2007-08-02 13:25:10.000000000 -0400
+@@ -0,0 +1,29 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++ Copyright 2007 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. */
++
++/* Force `-fpie' double jump bl->blrl. */
++/* No longer used. */
++volatile int var;
++
++extern int func1 (void);
++
++int main (void)
++{
++ func1 ();
++ return 0;
++}
+diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
+--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 1969-12-31 19:00:00.000000000 -0500
++++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 2007-08-02 14:21:29.000000000 -0400
+@@ -0,0 +1,79 @@
++# Copyright 2006, 2007 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.
++
++# Test unwinding fixes of the PPC platform, specifically on the coping with BCL
++# jump of the PIE code.
++
++if $tracelevel then {
++ strace $tracelevel
++}
++
++set prms_id 0
++set bug_id 0
++
++if ![istarget "powerpc*-*-linux*"] then {
++ verbose "Skipping powerpc-linux prologue tests."
++ return
++}
++
++set testfile "powerpc-bcl-prologue"
++set srcfile1 ${testfile}.c
++set flags "debug"
++if [istarget "powerpc-*"] then {
++ set srcfile2 ${testfile}-asm32.S
++ set flags "$flags additional_flags=-m32"
++} elseif [istarget "powerpc64-*"] then {
++ set srcfile2 ${testfile}-asm64.S
++ set flags "$flags additional_flags=-m64"
++} else {
++ fail "powerpc arch test"
++ return
++}
++set objfile2 ${objdir}/${subdir}/${testfile}-asm.o
++set binfile ${objdir}/${subdir}/${testfile}
++
++if { [gdb_compile "${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2}" ${binfile} executable $flags] != ""} {
++ return -1
++}
++
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++gdb_load ${binfile}
++
++# We should stop in abort(3).
++
++gdb_run_cmd
++
++gdb_test_multiple {} "continue to abort()" {
++ -re ".*Program received signal SIGABRT,.*$gdb_prompt $" {
++ pass "continue to abort()"
++ }
++}
++
++# Check backtrace:
++# #3 0x0804835f in func0 ()
++# #4 0x0804836a in func1 ()
++# #5 0x0804838c in main ()
++# (gdb)
++# `\\.?' prefixes are needed for ppc64 without `debug' (another bug).
++
++set test "matching unwind"
++gdb_test_multiple "backtrace" $test {
++ -re "\r\n#\[0-9\]\[^\r\n\]* in \\.?func0 \\(\[^\r\n\]*\r\n#\[0-9\]\[^\r\n\]* in \\.?func1 \\(\[^\r\n\]*\r\n#\[0-9\]\[^\r\n\]* in \\.?main \\(\[^\r\n\]*\r\n$gdb_prompt $" {
++ pass $test
++ }
++}
+
+Fixup the testcase for ppc64 biarch GDB.
+
+--- ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-13 13:32:19.000000000 +0100
++++ ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-02 00:04:10.000000000 +0100
+@@ -17,8 +17,9 @@
+ # Test PowerPC prologue analyzer.
+
+ # Do not run on AIX (where we won't be able to build the tests without
+-# some surgery) or on PowerPC64 (ditto, dot symbols).
+-if {[istarget *-*-aix*] || ![istarget "powerpc-*-*"]} then {
++# some surgery). PowerPC64 target would break due to dot symbols but we build
++# there PowerPC32 inferior.
++if {[istarget *-*-aix*] || ![istarget "powerpc*-*-*"]} then {
+ verbose "Skipping PowerPC prologue tests."
+ return
+ }
================================================================
Index: SOURCES/gdb-6.3-bz202689-exec-from-pthread-test.patch
diff -u /dev/null SOURCES/gdb-6.3-bz202689-exec-from-pthread-test.patch:1.1
--- /dev/null Mon Mar 23 00:28:42 2009
+++ SOURCES/gdb-6.3-bz202689-exec-from-pthread-test.patch Mon Mar 23 00:27:50 2009
@@ -0,0 +1,98 @@
+2007-01-17 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ * gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
+
+
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ ./gdb/testsuite/gdb.threads/threaded-exec.c 17 Jan 2007 23:10:22 -0000
+@@ -0,0 +1,46 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++ Copyright 2007 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. */
++
++#include <stddef.h>
++#include <pthread.h>
++#include <assert.h>
++#include <stdlib.h>
++#include <unistd.h>
++
++
++static void *
++threader (void *arg)
++{
++ return NULL;
++}
++
++int
++main (void)
++{
++ pthread_t t1;
++ int i;
++
++ i = pthread_create (&t1, NULL, threader, (void *) NULL);
++ assert (i == 0);
++ i = pthread_join (t1, NULL);
++ assert (i == 0);
++
++ execl ("/bin/true", "/bin/true", NULL);
++ abort ();
++}
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ ./gdb/testsuite/gdb.threads/threaded-exec.exp 17 Jan 2007 23:10:22 -0000
+@@ -0,0 +1,41 @@
++# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list