diff --git a/0001-gdb-6.3-rh-testversion-20041202.patch b/0001-gdb-6.3-rh-testversion-20041202.patch deleted file mode 100644 index 7ee68e439780d3a2621d9d195d4d6e0ca83bcdbe..0000000000000000000000000000000000000000 --- a/0001-gdb-6.3-rh-testversion-20041202.patch +++ /dev/null @@ -1,38 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Elena Zannoni -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-rh-testversion-20041202.patch - -;; Match the Fedora's version info. -;;=fedora - -2003-02-24 Elena Zannoni - - * gdb.gdb/selftest.exp: Add matching on specific Red Hat only version - string. - -diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp ---- a/gdb/testsuite/gdb.gdb/selftest.exp -+++ b/gdb/testsuite/gdb.gdb/selftest.exp -@@ -53,6 +53,9 @@ proc test_with_self { } { - -re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" { - pass "printed version with cast" - } -+ -re ".\[0-9\]+ = .(Fedora|Red Hat Enterprise Linux) \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" { -+ pass "printed version Fedora or Red Hat Enterprise Linux only" -+ } - } - - # start the "xgdb" process -diff --git a/gdb/top.c b/gdb/top.c ---- a/gdb/top.c -+++ b/gdb/top.c -@@ -2195,7 +2195,7 @@ init_gdb_version_vars (void) - struct internalvar *major_version_var = create_internalvar ("_gdb_major"); - struct internalvar *minor_version_var = create_internalvar ("_gdb_minor"); - int vmajor = 0, vminor = 0, vrevision = 0; -- sscanf (version, "%d.%d.%d", &vmajor, &vminor, &vrevision); -+ sscanf (version, "Fedora %d.%d.%d", &vmajor, &vminor, &vrevision); - set_internalvar_integer (major_version_var, vmajor); - set_internalvar_integer (minor_version_var, vminor + (vrevision > 0)); - } diff --git a/0004-gdb-6.3-test-movedir-20050125.patch b/0004-gdb-6.3-test-movedir-20050125.patch deleted file mode 100644 index 31fbc60486e85e301e361d7c846df2ddc938903d..0000000000000000000000000000000000000000 --- a/0004-gdb-6.3-test-movedir-20050125.patch +++ /dev/null @@ -1,101 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Elena Zannoni -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-test-movedir-20050125.patch - -;; Fix to support executable moving -;;=fedoratest - -2005-01-25 Elena Zannoni - - * gdb.base/move-dir.exp: New test. - * gdb.base/move-dir.c: Ditto. - * gdb.base/move-dir.h: Ditto. - -diff --git a/gdb/testsuite/gdb.base/move-dir.c b/gdb/testsuite/gdb.base/move-dir.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/move-dir.c -@@ -0,0 +1,9 @@ -+#include -+#include -+#include "move-dir.h" -+ -+int main() { -+ const char* hw = "hello world."; -+ printf ("%s\n", hw);; -+ other(); -+} -diff --git a/gdb/testsuite/gdb.base/move-dir.exp b/gdb/testsuite/gdb.base/move-dir.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/move-dir.exp -@@ -0,0 +1,57 @@ -+# Copyright 2005 -+# 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. -+ -+set testfile "move-dir" -+set srcfile ${testfile}.c -+set incfile ${testfile}.h -+set binfile [standard_output_file ${testfile}] -+ -+set testdir [standard_output_file incdir] -+ -+remote_exec build "mkdir $testdir" -+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} [standard_output_file ${srcfile}]" -+remote_exec build "cp ${srcdir}/${subdir}/${incfile} [standard_output_file ${incfile}]" -+ -+set additional_flags "additional_flags=-I${subdir}/incdir" -+ -+if { [gdb_compile [standard_output_file ${srcfile}] "${binfile}" executable [list debug $additional_flags]] != "" } { -+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -+} -+ -+# Create and source the file that provides information about the compiler -+# used to compile the test case. -+ -+if [get_compiler_info ${binfile}] { -+ return -1; -+} -+ -+ -+set oldtimeout $timeout -+set timeout [expr "$timeout + 60"] -+ -+# Start with a fresh gdb. -+ -+gdb_exit -+gdb_start -+gdb_test "cd ../.." "" "" -+gdb_load ${binfile} -+gdb_test "list main" ".*hw.*other.*" "found main" -+gdb_test "list other" ".*ostring.*" "found include file" -+ -+ -+set timeout $oldtimeout -+return 0 -diff --git a/gdb/testsuite/gdb.base/move-dir.h b/gdb/testsuite/gdb.base/move-dir.h -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/move-dir.h -@@ -0,0 +1,6 @@ -+#include -+ -+void other() { -+ const char* ostring = "other"; -+ printf ("%s\n", ostring);; -+} diff --git a/0005-gdb-6.3-threaded-watchpoints2-20050225.patch b/0005-gdb-6.3-threaded-watchpoints2-20050225.patch deleted file mode 100644 index 42b5260ec96b2de8e43290877c787e4a68d93f93..0000000000000000000000000000000000000000 --- a/0005-gdb-6.3-threaded-watchpoints2-20050225.patch +++ /dev/null @@ -1,253 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jeff Johnston -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-threaded-watchpoints2-20050225.patch - -;; Test sibling threads to set threaded watchpoints for x86 and x86-64 -;;=fedoratest - -2005-02-28 Jeff Johnston - - * config/i386/nm-linux.h: Change dr register routines to - accept a ptid_t first argument. Change all calling macros - to default the inferior_ptid for the first argument. - (i386_linux_insert_watchpoint): New prototype. - (i386_linux_remove_watchpoint, i386_linux_insert_hw_breakpoint): Ditto. - (i386_linux_remove_hw_breakpoint): Ditto. - (target_insert_watchpoint, target_remove_watchpoint): Undef and - override. - (target_insert_hw_breakpoint, target_remove_hw_breakpoint): Ditto. - * config/i386/nm-linux64.h: Ditto except add amd64 versions of - the watchpoint/hw-breakpoint insert/remove routines. - * i386-nat.c: Include "inferior.h" to define inferior_ptid. - * i386-linux-nat.c: Change all dr get/set routines to accept - ptid_t as first argument and to use this argument to determine - the tid for PTRACE. - (i386_linux_set_debug_regs_for_thread): New function. - (i386_linux_sync_debug_registers_callback): Ditto. - (i386_linux_sync_debug_registers_across_threads): Ditto. - (i386_linux_insert_watchpoint, i386_linux_remove_watchpoint): Ditto. - (i386_linux_hw_breakpoint, i386_linux_remove_hw_breakpoint): Ditto. - (i386_linux_new_thread): Ditto. - (_initialize_i386_linux_nat): Ditto. - * amd64-linux-nat.c: Change all dr get/set routines to accept - ptid_t as first argument and to use this argument to determine - the tid for PTRACE. - (amd64_linux_set_debug_regs_for_thread): New function. - (amd64_linux_sync_debug_registers_callback): Ditto. - (amd64_linux_sync_debug_registers_across_threads): Ditto. - (amd64_linux_insert_watchpoint, amd64_linux_remove_watchpoint): Ditto. - (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/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. - -diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.c b/gdb/testsuite/gdb.threads/watchthreads-threaded.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.c -@@ -0,0 +1,65 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2002, 2003, 2004, 2005 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. -+ -+ This file is copied from schedlock.c. */ -+ -+#include -+#include -+#include -+#include -+ -+void *thread_function(void *arg); /* Pointer to function executed by each thread */ -+ -+#define NUM 5 -+ -+unsigned int args[NUM+1]; -+ -+int main() { -+ int res; -+ pthread_t threads[NUM]; -+ void *thread_result; -+ long i; -+ -+ for (i = 0; i < NUM; i++) -+ { -+ args[i] = 1; /* Init value. */ -+ res = pthread_create(&threads[i], -+ NULL, -+ thread_function, -+ (void *) i); -+ } -+ -+ args[i] = 1; -+ thread_function ((void *) i); -+ -+ exit(EXIT_SUCCESS); -+} -+ -+void *thread_function(void *arg) { -+ int my_number = (long) arg; -+ int *myp = (int *) &args[my_number]; -+ -+ /* Don't run forever. Run just short of it :) */ -+ while (*myp > 0) -+ { -+ (*myp) ++; usleep (1); /* Loop increment. */ -+ } -+ -+ pthread_exit(NULL); -+} -diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.exp b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp -@@ -0,0 +1,126 @@ -+# This testcase is part of GDB, the GNU debugger. -+ -+# Copyright 2005 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. -+ -+# Check that GDB can support multiple watchpoints across threads. -+ -+# This test verifies that a watchpoint is detected in the proper thread -+# so the test is only meaningful on a system with hardware watchpoints. -+if [target_info exists gdb,no_hardware_watchpoints] { -+ return 0; -+} -+ -+set testfile "watchthreads-threaded" -+set srcfile ${testfile}.c -+set binfile [standard_output_file ${testfile}] -+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } { -+ return -1 -+} -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+gdb_test "set can-use-hw-watchpoints 1" "" "" -+ -+# -+# Run to `main' where we begin our tests. -+# -+ -+if ![runto_main] then { -+ gdb_suppress_tests -+} -+ -+set args_2 0 -+set args_3 0 -+ -+gdb_breakpoint "thread_function" -+gdb_continue_to_breakpoint "thread_function" -+gdb_test "disable 2" "" -+ -+gdb_test_multiple "p args\[2\]" "get initial args2" { -+ -re "\\\$\[0-9\]* = (.*)$gdb_prompt $" { -+ set init_args_2 $expect_out(1,string) -+ pass "get initial args2" -+ } -+} -+ -+gdb_test_multiple "p args\[3\]" "get initial args3" { -+ -re "\\\$\[0-9\]* = (.*)$gdb_prompt $" { -+ set init_args_3 $expect_out(1,string) -+ pass "get initial args3" -+ } -+} -+ -+set args_2 $init_args_2 -+set args_3 $init_args_3 -+ -+# Watch values that will be modified by distinct threads. -+gdb_test "watch args\[2\]" "Hardware watchpoint 3: args\\\[2\\\]" -+gdb_test "watch args\[3\]" "Hardware watchpoint 4: args\\\[3\\\]" -+ -+set init_line [expr [gdb_get_line_number "Init value"]+1] -+set inc_line [gdb_get_line_number "Loop increment"] -+ -+# Loop and continue to allow both watchpoints to be triggered. -+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 .*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 .*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].*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].*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 -+ if { $test_flag == 0 } { -+ set i 30; -+ } -+} -+ -+# Print success message if loop succeeded. -+if { $test_flag == 1 } { -+ pass "threaded watch loop" -+} -+ -+# Verify that we hit first watchpoint in child thread. -+set message "watchpoint on args\[2\] hit in thread" -+if { $args_2 > 1 } { -+ pass $message -+} else { -+ fail $message -+} -+ -+# Verify that we hit second watchpoint in child thread. -+set message "watchpoint on args\[3\] hit in thread" -+if { $args_3 > 1 } { -+ pass $message -+} else { -+ fail $message -+} -+ -+# Verify that all watchpoint hits are accounted for. -+set message "combination of threaded watchpoints = 30 + initial values" -+if { [expr $args_2+$args_3] == [expr [expr 30+$init_args_2]+$init_args_3] } { -+ pass $message -+} else { -+ fail $message -+} diff --git a/0006-gdb-6.3-inheritancetest-20050726.patch b/0006-gdb-6.3-inheritancetest-20050726.patch deleted file mode 100644 index 6e12c826cd02e313351a5480314877469a80eadd..0000000000000000000000000000000000000000 --- a/0006-gdb-6.3-inheritancetest-20050726.patch +++ /dev/null @@ -1,160 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jeff Johnston -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-inheritancetest-20050726.patch - -;; Verify printing of inherited members test -;;=fedoratest - -2005-07-26 Jeff Johnston - - * gdb.cp/b146835.exp: New testcase. - * gdb.cp/b146835.cc: Ditto. - * gdb.cp/b146835b.cc: Ditto. - * gdb.cp/b146835.h: Ditto. - -diff --git a/gdb/testsuite/gdb.cp/b146835.cc b/gdb/testsuite/gdb.cp/b146835.cc -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/b146835.cc -@@ -0,0 +1,31 @@ -+#include "b146835.h" -+#include -+ -+class F : public C { -+ -+protected: -+ -+ virtual void funcA (unsigned long a, B *b); -+ virtual void funcB (E *e); -+ virtual void funcC (unsigned long x, bool y); -+ -+ char *s1, *s2; -+ bool b1; -+ int k; -+ -+public: -+ void foo() { -+ std::cout << "foo" << std::endl; -+ } -+}; -+ -+ -+void F::funcA (unsigned long a, B *b) {} -+void F::funcB (E *e) {} -+void F::funcC (unsigned long x, bool y) {} -+ -+int main() -+{ -+ F f; -+ f.foo(); -+} -diff --git a/gdb/testsuite/gdb.cp/b146835.exp b/gdb/testsuite/gdb.cp/b146835.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/b146835.exp -@@ -0,0 +1,47 @@ -+# This testcase is part of GDB, the GNU debugger. -+ -+# Copyright 2005 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. -+ -+# Check that GDB can properly print an inherited member variable -+# (Bugzilla 146835) -+ -+set testfile "b146835" -+set srcfile ${testfile}.cc -+set srcfile2 ${testfile}b.cc -+set binfile [standard_output_file ${testfile}] -+if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable {debug c++}] != "" } { -+ return -1 -+} -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+# -+# Run to `main' where we begin our tests. -+# -+ -+if ![runto_main] then { -+ gdb_suppress_tests -+} -+ -+gdb_test "break 'F::foo()'" "" -+gdb_continue_to_breakpoint "First line foo" -+ -+# Verify that we can access the inherited member d -+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible" -diff --git a/gdb/testsuite/gdb.cp/b146835.h b/gdb/testsuite/gdb.cp/b146835.h -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/b146835.h -@@ -0,0 +1,36 @@ -+ -+class A { -+ -+protected: -+ -+ virtual void funcA (unsigned long a, class B *b) = 0; -+ virtual void funcB (class E *e) = 0; -+ virtual void funcC (unsigned long x, bool y) = 0; -+ -+ void funcD (class E *e, class D* d); -+ virtual void funcE (E *e, D *d); -+ virtual void funcF (unsigned long x, D *d); -+}; -+ -+ -+class C : public A { -+ -+protected: -+ -+ int x; -+ class K *k; -+ class H *h; -+ -+ D *d; -+ -+ class W *w; -+ class N *n; -+ class L *l; -+ unsigned long *r; -+ -+public: -+ -+ C(); -+ int z (char *s); -+ virtual ~C(); -+}; -diff --git a/gdb/testsuite/gdb.cp/b146835b.cc b/gdb/testsuite/gdb.cp/b146835b.cc -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/b146835b.cc -@@ -0,0 +1,11 @@ -+#include "b146835.h" -+ -+C::C() { d = 0; x = 3; } -+ -+int C::z (char *s) { return 0; } -+ -+C::~C() {} -+ -+void A::funcD (class E *e, class D *d) {} -+void A::funcE (E *e, D *d) {} -+void A::funcF (unsigned long x, D *d) {} diff --git a/0008-gdb-6.5-sharedlibrary-path.patch b/0008-gdb-6.5-sharedlibrary-path.patch deleted file mode 100644 index 360e5d3adcd3a1b3187012495903798d38a573d5..0000000000000000000000000000000000000000 --- a/0008-gdb-6.5-sharedlibrary-path.patch +++ /dev/null @@ -1,193 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jan Kratochvil -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.5-sharedlibrary-path.patch - -;; Fix TLS symbols resolving for shared libraries with a relative pathname. -;; The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'. -;;=fedoratest: One should recheck if it is really fixed upstream. - -If you provided some relative path to the shared library, such as with - export LD_LIBRARY_PATH=. -then gdb would fail to match the shared library name during the TLS lookup. - -Dropped the workaround/fix for gdb-6.8.50.20081128 - is it still needed? - -The testsuite needs `gdb-6.3-bz146810-solib_absolute_prefix_is_empty.patch'. -The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'. - -2006-09-01 Jan Kratochvil - - * solib-svr4.c (svr4_fetch_objfile_link_map): Match even absolute - requested pathnames to the internal loaded relative pathnames. - -2007-10-16 Jan Kratochvil - - Port to GDB-6.7. - -2008-02-27 Jan Kratochvil - - Port to gdb-6.7.50.20080227. - -diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-main.c b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c -@@ -0,0 +1,31 @@ -+/* 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 -+ -+extern __thread int var; -+ -+int main() -+{ -+ /* Ensure we link against pthreads even with --as-needed. */ -+ pthread_testcancel(); -+ return var; -+} -diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c -@@ -0,0 +1,22 @@ -+/* 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 */ -+ -+__thread int var = 42; -diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp -@@ -0,0 +1,94 @@ -+# 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. -+ -+# This test uses gdb_exit and gdb_start, which are not supported -+# on non-extended-remote sessions. -+if {[use_gdb_stub]} { -+ untested "skipping test because of stub" -+ return 0 -+} -+ -+if $tracelevel then { -+ strace $tracelevel -+} -+ -+set testfile tls-sepdebug -+set srcmainfile ${testfile}-main.c -+set srcsharedfile ${testfile}-shared.c -+ -+set binmainfile [standard_output_file ${testfile}-main] -+set binsharedbase ${testfile}-shared.so -+set binsharedfile [standard_output_file ${binsharedbase}] -+set binshareddebugfile [standard_output_file ${binsharedbase}.debug] -+ -+# Use explicit -soname as otherwise the full path to the library would get -+# encoded into ${binmainfile} making LD_LIBRARY_PATH tests useless. -+ -+# FIXME: gcc dependency (-Wl,-soname). -+ -+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } { -+ untested "Couldn't compile test library" -+ return -1 -+} -+ -+# eu-strip(1) works fine but it is a part of `elfutils', not `binutils'. -+if 0 then { -+ remote_exec build "eu-strip -f ${binshareddebugfile} ${binsharedfile}" -+} else { -+ remote_exec build "objcopy --only-keep-debug ${binsharedfile} ${binshareddebugfile}" -+ remote_exec build "objcopy --strip-debug ${binsharedfile}" -+ remote_exec build "objcopy --add-gnu-debuglink=${binshareddebugfile} ${binsharedfile}" -+} -+ -+# Do not use `shlib=' as it will automatically add also -rpath for gcc. -+ -+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcmainfile} ${binsharedfile}" "${binmainfile}" executable {debug}] != "" } { -+ untested "Couldn't compile test program" -+ return -1 -+} -+ -+# Get things started. -+ -+# Test also the proper resolving of relative library names to absolute ones. -+# \$PWD is easy - it is the absolute way -+# ${subdir} would fail on "print var" -+ -+set absdir [file dirname [standard_output_file ${binsharedbase}]] -+foreach ld_library_path [list $absdir [relative_filename [pwd] $absdir]] name { absolute relative } { -+ -+ gdb_exit -+ gdb_start -+ ###gdb_reinitialize_dir $srcdir/$subdir -+ -+ gdb_test "set env LD_LIBRARY_PATH=$ld_library_path" \ -+ "" \ -+ "set env LD_LIBRARY_PATH is $name" -+ -+ gdb_load ${binmainfile} -+ -+ # For C programs, "start" should stop in main(). -+ -+ gdb_test "start" \ -+ "main \\(\\) at .*${srcmainfile}.*" \ -+ "start" -+ -+ # Check for: Cannot find shared library `/usr/lib/debug/lib/libc-2.4.90.so.debug' in dynamic linker's load module list -+ # as happens with TLS variables and `separate_debug_objfile_backlink'. -+ -+ gdb_test "print var" \ -+ "\\\$1 = \[0-9\].*" \ -+ "print TLS variable from a shared library with $name-directory separate debug info file" -+} diff --git a/0010-gdb-6.5-last-address-space-byte-test.patch b/0010-gdb-6.5-last-address-space-byte-test.patch deleted file mode 100644 index e99d81185339a1a2ee7467c91eb9992d1b7efd6e..0000000000000000000000000000000000000000 --- a/0010-gdb-6.5-last-address-space-byte-test.patch +++ /dev/null @@ -1,62 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.5-last-address-space-byte-test.patch - -;; Testcase for deadlocking on last address space byte; for corrupted backtraces. -;;=fedoratest - -diff --git a/gdb/testsuite/gdb.base/largecore-last-address-lock.exp b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp -@@ -0,0 +1,49 @@ -+# 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 -+} -+ -+# Get things started. -+ -+gdb_exit -+gdb_start -+ -+# i386 (32-bit) only: gdb with Red Hat largecore patch did lock up: -+# https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=103263 -+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=210614 -+ -+# i386: Bug exists when the `target_xfer_memory' condition -+# `(memaddr + len < region->hi)' operates on 64-bit operands on -+# largecore-patched with 32-bit addresses and so it can get `false' with -+# arbitrary `len'. -+ -+# x86_64: The bug is not present as the operands and calculations have the same -+# bit size. Would would still need to pass there the highest address -+# (`memaddr == 0xffffffffffffffff') but we would need to pass `len == 0' -+# to make the condition `(memaddr + len < region->hi)' false. -+# `len == 0' would get caught eariler. -+ -+# Error in the success case is immediate. -+set timeoutold ${timeout} -+set timeout 10 -+ -+gdb_test "x/xb 0xffffffff" \ -+ "Cannot access memory at address 0xffffffff" \ -+ "Read the last address space byte" -+ -+set timeout ${timeoutold} diff --git a/0011-gdb-6.5-readline-long-line-crash-test.patch b/0011-gdb-6.5-readline-long-line-crash-test.patch deleted file mode 100644 index 087f9163b7c23cbd66bcfb00a20f07c2ae07f7c9..0000000000000000000000000000000000000000 --- a/0011-gdb-6.5-readline-long-line-crash-test.patch +++ /dev/null @@ -1,111 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.5-readline-long-line-crash-test.patch - -;; Fix readline segfault on excessively long hand-typed lines. -;;=fedoratest - -https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196 - -diff --git a/gdb/testsuite/gdb.base/readline-overflow.exp b/gdb/testsuite/gdb.base/readline-overflow.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/readline-overflow.exp -@@ -0,0 +1,96 @@ -+# 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 -+ -+# This file was written by Jan Kratochvil -+ -+# This file is part of the gdb testsuite. -+ -+# -+# Tests for readline buffer overflow. -+# -+ -+if $tracelevel { -+ strace $tracelevel -+} -+ -+global env -+ -+save_vars { env(GDBHISTFILE) env(HISTSIZE) TERM timeout } { -+ # The arrow key test relies on the standard VT100 bindings, so -+ # make sure that an appropriate terminal is selected. The same -+ # bug doesn't show up if we use ^P / ^N instead. -+ setenv TERM vt100 -+ -+ set timeout 600 -+ -+ set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history" -+ set env(HISTSIZE) "10" -+ -+ gdb_exit -+ gdb_start -+ gdb_reinitialize_dir $srcdir/$subdir -+ -+ -+ set width 11 -+ gdb_test "set width $width" \ -+ "" \ -+ "Setting width to $width." -+ #gdb_test "set height 1" \ -+ # "" \ -+ # "Setting height to 1." -+ send_gdb "run X" -+ set i 0 -+ # It crashes using `set width 7' on `set total 3560'. -+ # Sometimes it corrupts screen on `set width 7'. -+ # Bugreport used `set total 130001': -+ # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196 -+ # Check also `timeout' above. -+ set total 4200 -+ gdb_expect { -+ -re X { -+ incr i -+ if {$i <= $total} { -+ send_gdb "X" -+ exp_continue -+ } -+ } -+ -re "\[ \b\r\n\]" { -+ exp_continue -+ } -+ eof { -+ fail "gdb sending total $total characters" -+ note "Failed after sending $i characters, reason: EOF" -+ gdb_clear_suppressed -+ } -+ timeout { -+ fail "gdb sending total $total characters" -+ note "Failed after sending $i characters (timeout $timeout), reason: TIMEOUT" -+ gdb_clear_suppressed -+ } -+ default { -+ fail "gdb sending total $total characters" -+ note "Failed after sending $i characters, reason: 0=\[$expect_out(0,string)\] buffer=\[$expect_out(buffer)\]" -+ gdb_clear_suppressed -+ } -+ } -+ send_gdb "\r" -+ gdb_test "" \ -+ "No executable file specified..*" \ -+ "All the characters transferred" -+} diff --git a/0013-gdb-6.5-bz109921-DW_AT_decl_file-test.patch b/0013-gdb-6.5-bz109921-DW_AT_decl_file-test.patch deleted file mode 100644 index 8d03e3f11690f7bc930e926fa2bcd53cfd6fca35..0000000000000000000000000000000000000000 --- a/0013-gdb-6.5-bz109921-DW_AT_decl_file-test.patch +++ /dev/null @@ -1,134 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jan Kratochvil -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.5-bz109921-DW_AT_decl_file-test.patch - -;; Find symbols properly at their original (included) file (BZ 109921). -;;=fedoratest - -https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921 - -It is duplicite to its upstream variant: -http://sourceware.org/ml/gdb-cvs/2007-01/msg00157.html -http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html -2007-01-21 Jan Kratochvil - Daniel Jacobowitz - - * gdb.base/included.c, gdb.base/included.exp, - gdb.base/included.h: New files. - ------------------------------------------------------------------------------- - -2007-01-09 Jan Kratochvil - - * gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c, - gdb.dwarf2/dw2-included.h: New files. - -diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.c b/gdb/testsuite/gdb.dwarf2/dw2-included.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.c -@@ -0,0 +1,26 @@ -+/* 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. */ -+ -+#include "dw2-included.h" -+ -+int -+main() -+{ -+ return 0; -+} -diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.exp b/gdb/testsuite/gdb.dwarf2/dw2-included.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.exp -@@ -0,0 +1,47 @@ -+# 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. -+ -+# Minimal DWARF-2 unit test -+ -+# This test can only be run on targets which support DWARF-2. -+# For now pick a sampling of likely targets. -+if {![istarget *-*-linux*] -+ && ![istarget *-*-gnu*] -+ && ![istarget *-*-elf*] -+ && ![istarget *-*-openbsd*] -+ && ![istarget arm-*-eabi*] -+ && ![istarget powerpc-*-eabi*]} { -+ return 0 -+} -+ -+set testfile "dw2-included" -+set srcfile ${testfile}.c -+set binfile [standard_output_file ${testfile}] -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { -+ return -1 -+} -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+gdb_test "set listsize 1" "" -+gdb_test "list integer" "int integer;\r" -+gdb_test "ptype integer" "type = int\r" -+# Path varies depending on the build location. -+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\n${decimal}:.*int integer;\r" -diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.h b/gdb/testsuite/gdb.dwarf2/dw2-included.h -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.h -@@ -0,0 +1,20 @@ -+/* 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. */ -+ -+int integer; diff --git a/0014-gdb-6.3-bz140532-ppc-unwinding-test.patch b/0014-gdb-6.3-bz140532-ppc-unwinding-test.patch deleted file mode 100644 index 2e38a262e7b2718186e818e8b0cd02573be734be..0000000000000000000000000000000000000000 --- a/0014-gdb-6.3-bz140532-ppc-unwinding-test.patch +++ /dev/null @@ -1,320 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-bz140532-ppc-unwinding-test.patch - -;; Update PPC unwinding patches to their upstream variants (BZ 140532). -;;=fedoratest - -diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S -@@ -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@ha -+ lwz 9,var@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,"",@progbits -+ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)" -+ -+/* Original source file: -+ -+#include -+ -+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 --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S -@@ -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.@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.@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@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,"",@progbits -+ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)" -+ -+/* Original source file: -+ -+#include -+ -+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 --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c -@@ -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 --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp -@@ -0,0 +1,72 @@ -+# 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 ![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 [standard_output_file ${testfile}-asm.o] -+set binfile [standard_output_file ${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 -+ } -+} -diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp ---- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp -+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp -@@ -16,8 +16,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 - } diff --git a/0015-gdb-6.3-bz202689-exec-from-pthread-test.patch b/0015-gdb-6.3-bz202689-exec-from-pthread-test.patch deleted file mode 100644 index 74684ddddd593175bab85af8cd609e59a47a18e1..0000000000000000000000000000000000000000 --- a/0015-gdb-6.3-bz202689-exec-from-pthread-test.patch +++ /dev/null @@ -1,109 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jan Kratochvil -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-bz202689-exec-from-pthread-test.patch - -;; Testcase for exec() from threaded program (BZ 202689). -;;=fedoratest - -2007-01-17 Jan Kratochvil - - * gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files. - -diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.threads/threaded-exec.c -@@ -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 -+#include -+#include -+#include -+#include -+ -+ -+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 (); -+} -diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp -@@ -0,0 +1,41 @@ -+# threaded-exec.exp -- Check reset of the tracked threads on exec*(2) -+# Copyright (C) 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. -+ -+# Please email any bugs, comments, and/or additions to this file to: -+# bug-gdb@prep.ai.mit.edu -+ -+set testfile threaded-exec -+set srcfile ${testfile}.c -+set binfile [standard_output_file ${testfile}] -+ -+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } { -+ return -1 -+} -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+ -+gdb_load ${binfile} -+ -+gdb_run_cmd -+ -+gdb_test_multiple {} "Program exited" { -+ -re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" { -+ pass "Program exited" -+ } -+} diff --git a/0016-gdb-6.6-bz230000-power6-disassembly-test.patch b/0016-gdb-6.6-bz230000-power6-disassembly-test.patch deleted file mode 100644 index 2b361476f7a7340964f9d30b312fd601607dcd71..0000000000000000000000000000000000000000 --- a/0016-gdb-6.6-bz230000-power6-disassembly-test.patch +++ /dev/null @@ -1,94 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.6-bz230000-power6-disassembly-test.patch - -;; Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). -;;=fedoratest - -https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000 - -The original testcase - https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1 -requires too recent GCC. - -diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.exp b/gdb/testsuite/gdb.arch/powerpc-power6.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/powerpc-power6.exp -@@ -0,0 +1,54 @@ -+# 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. -+ -+# Test PowerPC Power6 instructions disassembly. -+ -+if {![istarget "powerpc*-*-*"]} then { -+ verbose "Skipping PowerPC Power6 instructions disassembly." -+ return -+} -+ -+set testfile "powerpc-power6" -+set srcfile ${testfile}.s -+set objfile [standard_output_file ${testfile}.o] -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } { -+ untested "PowerPC prologue tests" -+ return -1 -+} -+ -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${objfile} -+ -+# Disassemble the function. -+ -+gdb_test "disass func" ":\tblr\r\n.*" "Basic disassembly" -+ -+gdb_test "disass func" ":\tdcbzl *r8,r9\r\n.*" "Power5 disassembly dcbzl" -+gdb_test "disass func" ":\tfrsqrtes *f10,f11\r\n.*" "Power5 disassembly frsqrtes" -+gdb_test "disass func" ":\tdadd *f1,f2,f1\r\n.*" "Power6 disassembly dadd" -+gdb_test "disass func" ":\tdaddq *f0,f2,f0\r\n.*" "Power6 disassembly daddq" -+gdb_test "disass func" ":\tdsub *f1,f2,f1\r\n.*" "Power6 disassembly dsub" -+gdb_test "disass func" ":\tdsubq *f0,f2,f0\r\n.*" "Power6 disassembly dsubq" -+gdb_test "disass func" ":\tdmul *f1,f2,f1\r\n.*" "Power6 disassembly dmul" -+gdb_test "disass func" ":\tdmulq *f0,f2,f0\r\n.*" "Power6 disassembly dmulq" -+gdb_test "disass func" ":\tddiv *f1,f2,f1\r\n.*" "Power6 disassembly ddiv" -+gdb_test "disass func" ":\tddivq *f0,f2,f0\r\n.*" "Power6 disassembly ddivq" -+gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu" -+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f0\r\n.*" "Power6 disassembly dcmpuq" -diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.s b/gdb/testsuite/gdb.arch/powerpc-power6.s -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/powerpc-power6.s -@@ -0,0 +1,16 @@ -+ .text -+ .globl func -+func: -+ blr -+ .long 0x7c284fec /* dcbzl r8,r9 */ -+ .long 0xed405834 /* frsqrtes f10,f11 */ -+ .long 0xec220804 /* dadd f1,f2,f1 */ -+ .long 0xfc020004 /* daddq f0,f2,f0 */ -+ .long 0xec220c04 /* dsub f1,f2,f1 */ -+ .long 0xfc020404 /* dsubq f0,f2,f0 */ -+ .long 0xec220844 /* dmul f1,f2,f1 */ -+ .long 0xfc020044 /* dmulq f0,f2,f0 */ -+ .long 0xec220c44 /* ddiv f1,f2,f1 */ -+ .long 0xfc020444 /* ddivq f0,f2,f0 */ -+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */ -+ .long 0xfc820504 /* dcmpuq cr1,f2,f0 */ diff --git a/0025-gdb-6.7-charsign-test.patch b/0025-gdb-6.7-charsign-test.patch deleted file mode 100644 index 1a663900e7101b00df8ca75d0c90223732ddc226..0000000000000000000000000000000000000000 --- a/0025-gdb-6.7-charsign-test.patch +++ /dev/null @@ -1,130 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jan Kratochvil -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.7-charsign-test.patch - -;; Fix displaying of numeric char arrays as strings (BZ 224128). -;;=fedoratest: But it is failing anyway, one should check the behavior more. - -https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128 - -2007-01-25 Jan Kratochvil - - * gdb.base/charsign.exp, gdb.base/charsign.c: New files. - [ stripped ] - -2007-10-19 Jan Kratochvil - - Port to GDB-6.7 - only the testcase left, patch has been reverted, - char-vectors restricted. - -diff --git a/gdb/testsuite/gdb.base/charsign.c b/gdb/testsuite/gdb.base/charsign.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/charsign.c -@@ -0,0 +1,37 @@ -+/* 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. -+ -+ Please email any bugs, comments, and/or additions to this file to: -+ bug-gdb@prep.ai.mit.edu */ -+ -+int main() -+{ -+ return 0; -+} -+ -+char n[]="A"; -+signed char s[]="A"; -+unsigned char u[]="A"; -+ -+typedef char char_n; -+typedef signed char char_s; -+typedef unsigned char char_u; -+ -+char_n n_typed[]="A"; -+char_s s_typed[]="A"; -+char_u u_typed[]="A"; -diff --git a/gdb/testsuite/gdb.base/charsign.exp b/gdb/testsuite/gdb.base/charsign.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/charsign.exp -@@ -0,0 +1,63 @@ -+# 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. -+ -+set testfile charsign -+set srcfile ${testfile}.c -+set binfile [standard_output_file ${testfile}] -+ -+proc do_test { cflags } { -+ global srcdir -+ global binfile -+ global subdir -+ global srcfile -+ global gdb_prompt -+ -+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=$cflags]] != "" } { -+ 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 "p n" \ -+ "= \"A\"" -+ gdb_test "p s" \ -+ "= \\{65 'A', 0 '\\\\0'\\}" -+ gdb_test "p u" \ -+ "= \\{65 'A', 0 '\\\\0'\\}" -+ gdb_test "p n_typed" \ -+ "= \"A\"" -+ gdb_test "p s_typed" \ -+ "= \\{65 'A', 0 '\\\\0'\\}" -+ gdb_test "p u_typed" \ -+ "= \\{65 'A', 0 '\\\\0'\\}" -+} -+ -+# The string identification works despite the compiler flags below due to -+# gdbtypes.c: -+# if (name && strcmp (name, "char") == 0) -+# TYPE_FLAGS (type) |= TYPE_FLAG_NOSIGN; -+ -+do_test {} -+do_test {-fsigned-char} -+do_test {-funsigned-char} diff --git a/0027-gdb-6.7-testsuite-stable-results.patch b/0027-gdb-6.7-testsuite-stable-results.patch deleted file mode 100644 index 0eca1a740be05885051dd1591568f32458558ea7..0000000000000000000000000000000000000000 --- a/0027-gdb-6.7-testsuite-stable-results.patch +++ /dev/null @@ -1,104 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jan Kratochvil -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.7-testsuite-stable-results.patch - -;; Testsuite fixes for more stable/comparable results. -;;=fedoratest - -gdb/testsuite/gdb.base/fileio.c: -gdb/testsuite/gdb.base/fileio.exp: -2007-12-08 Jan Kratochvil - - * gdb.base/fileio.c (ROOTSUBDIR): New macro. - (main): CHDIR into ROOTSUBDIR. CHOWN ROOTSUBDIR and CHDIR into - ROOTSUBDIR if we are being run as root. - * gdb.base/fileio.exp: Change the startup and finish cleanup. - Change the test file reference to be into the `fileio.dir' directory. - -sources/gdb/testsuite/gdb.base/dump.exp: -Found on RHEL-5.s390x. - -gdb-6.8.50.20090209/gdb/testsuite/gdb.base/auxv.exp: -random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore - -gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp: -frames-invalid can happen asynchronously. - -diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c ---- a/gdb/testsuite/gdb.base/fileio.c -+++ b/gdb/testsuite/gdb.base/fileio.c -@@ -559,6 +559,28 @@ strerrno (int err) - int - main () - { -+ /* These tests -+ Open for write but no write permission returns EACCES -+ Unlinking a file in a directory w/o write access returns EACCES -+ fail if we are being run as root - drop the privileges here. */ -+ -+ if (geteuid () == 0) -+ { -+ uid_t uid = 99; -+ -+ if (chown (OUTDIR, uid, uid) != 0) -+ { -+ printf ("chown %d.%d %s: %s\n", (int) uid, (int) uid, -+ OUTDIR, strerror (errno)); -+ exit (1); -+ } -+ if (setuid (uid) || geteuid () == 0) -+ { -+ printf ("setuid %d: %s\n", (int) uid, strerror (errno)); -+ exit (1); -+ } -+ } -+ - /* Don't change the order of the calls. They partly depend on each other */ - test_open (); - test_write (); -diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp ---- a/gdb/testsuite/gdb.base/fileio.exp -+++ b/gdb/testsuite/gdb.base/fileio.exp -@@ -24,9 +24,9 @@ if [target_info exists gdb,nofileio] { - standard_testfile - - if {[is_remote host]} { -- set outdir . -+ set outdir "fileio.dir" - } else { -- set outdir [standard_output_file {}] -+ set outdir [standard_output_file "fileio.dir"] - } - - if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ -@@ -47,7 +47,8 @@ set dir2 [standard_output_file dir2.fileio.test] - if {[file exists $dir2] && ![file writable $dir2]} { - system "chmod +w $dir2" - } --system "rm -rf [standard_output_file *.fileio.test]" -+system "rm -rf [standard_output_file fileio.dir]" -+system "mkdir -m777 [standard_output_file fileio.dir]" - - set oldtimeout $timeout - set timeout [expr "$timeout + 60"] -@@ -89,7 +90,7 @@ gdb_test continue \ - - gdb_test "continue" ".*" "" - --catch "system \"chmod -f -w [standard_output_file nowrt.fileio.test]\"" -+catch "system \"chmod -f -w [standard_output_file fileio.dir/nowrt.fileio.test]\"" - - gdb_test continue \ - "Continuing\\..*open 5:.*EACCES$stop_msg" \ -@@ -276,9 +277,7 @@ gdb_test continue \ - gdb_exit - - # Make dir2 writable again so rm -rf of a build tree Just Works. --if {[file exists $dir2] && ![file writable $dir2]} { -- system "chmod +w $dir2" --} -+system "chmod -R +w $outdir" - - set timeout $oldtimeout - return 0 diff --git a/0033-gdb-6.8-bz442765-threaded-exec-test.patch b/0033-gdb-6.8-bz442765-threaded-exec-test.patch deleted file mode 100644 index 90685c7dfbcba8ce5e3a247f1d1ba781f05d707f..0000000000000000000000000000000000000000 --- a/0033-gdb-6.8-bz442765-threaded-exec-test.patch +++ /dev/null @@ -1,181 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.8-bz442765-threaded-exec-test.patch - -;; Test various forms of threads tracking across exec() (BZ 442765). -;;=fedoratest - -Test various forms of threads tracking across exec(2). - -diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c ---- a/gdb/testsuite/gdb.threads/threaded-exec.c -+++ b/gdb/testsuite/gdb.threads/threaded-exec.c -@@ -18,21 +18,95 @@ - Boston, MA 02111-1307, USA. */ - - #include --#include - #include - #include - #include -+#include - -+#ifdef THREADS -+ -+# include - - static void * - threader (void *arg) - { -- return NULL; -+ return NULL; - } - -+#endif -+ - int --main (void) -+main (int argc, char **argv) - { -+ char *exec_nothreads, *exec_threads, *cmd; -+ int phase; -+ char phase_s[8]; -+ -+ setbuf (stdout, NULL); -+ -+ if (argc != 4) -+ { -+ fprintf (stderr, "%s \n", argv[0]); -+ return 1; -+ } -+ -+#ifdef THREADS -+ puts ("THREADS: Y"); -+#else -+ puts ("THREADS: N"); -+#endif -+ exec_nothreads = argv[1]; -+ printf ("exec_nothreads: %s\n", exec_nothreads); -+ exec_threads = argv[2]; -+ printf ("exec_threads: %s\n", exec_threads); -+ phase = atoi (argv[3]); -+ printf ("phase: %d\n", phase); -+ -+ /* Phases: threading -+ 0: N -> N -+ 1: N -> Y -+ 2: Y -> Y -+ 3: Y -> N -+ 4: N -> exit */ -+ -+ cmd = NULL; -+ -+#ifndef THREADS -+ switch (phase) -+ { -+ case 0: -+ cmd = exec_nothreads; -+ break; -+ case 1: -+ cmd = exec_threads; -+ break; -+ case 2: -+ fprintf (stderr, "%s: We should have threads for phase %d!\n", argv[0], -+ phase); -+ return 1; -+ case 3: -+ fprintf (stderr, "%s: We should have threads for phase %d!\n", argv[0], -+ phase); -+ return 1; -+ case 4: -+ return 0; -+ default: -+ assert (0); -+ } -+#else /* THREADS */ -+ switch (phase) -+ { -+ case 0: -+ fprintf (stderr, "%s: We should not have threads for phase %d!\n", -+ argv[0], phase); -+ return 1; -+ case 1: -+ fprintf (stderr, "%s: We should not have threads for phase %d!\n", -+ argv[0], phase); -+ return 1; -+ case 2: -+ cmd = exec_threads; -+ { - pthread_t t1; - int i; - -@@ -40,7 +114,34 @@ main (void) - assert (i == 0); - i = pthread_join (t1, NULL); - assert (i == 0); -+ } -+ break; -+ case 3: -+ cmd = exec_nothreads; -+ { -+ pthread_t t1; -+ int i; -+ -+ i = pthread_create (&t1, NULL, threader, (void *) NULL); -+ assert (i == 0); -+ i = pthread_join (t1, NULL); -+ assert (i == 0); -+ } -+ break; -+ case 4: -+ fprintf (stderr, "%s: We should not have threads for phase %d!\n", -+ argv[0], phase); -+ return 1; -+ default: -+ assert (0); -+ } -+#endif /* THREADS */ -+ -+ assert (cmd != NULL); -+ -+ phase++; -+ snprintf (phase_s, sizeof phase_s, "%d", phase); - -- execl ("/bin/true", "/bin/true", NULL); -- abort (); -+ execl (cmd, cmd, exec_nothreads, exec_threads, phase_s, NULL); -+ assert (0); - } -diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp ---- a/gdb/testsuite/gdb.threads/threaded-exec.exp -+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp -@@ -20,9 +20,14 @@ - - set testfile threaded-exec - set srcfile ${testfile}.c --set binfile [standard_output_file ${testfile}] -+set binfile_nothreads [standard_output_file ${testfile}N] -+set binfile_threads [standard_output_file ${testfile}Y] - --if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } { -+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile_nothreads}" executable {additional_flags=-UTHREADS}] != "" } { -+ return -1 -+} -+ -+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile_threads}" executable {additional_flags=-DTHREADS}] != "" } { - return -1 - } - -@@ -30,9 +35,9 @@ gdb_exit - gdb_start - gdb_reinitialize_dir $srcdir/$subdir - --gdb_load ${binfile} -+gdb_load ${binfile_nothreads} - --gdb_run_cmd -+gdb_run_cmd [list ${binfile_nothreads} ${binfile_threads} 0] - - gdb_test_multiple {} "Program exited" { - -re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" { diff --git a/0038-gdb-ccache-workaround.patch b/0038-gdb-ccache-workaround.patch deleted file mode 100644 index 802fa2b35d777b6bdff1ba7e4b54472a354615d0..0000000000000000000000000000000000000000 --- a/0038-gdb-ccache-workaround.patch +++ /dev/null @@ -1,26 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-ccache-workaround.patch - -;; Workaround ccache making lineno non-zero for command-line definitions. -;;=fedoratest: ccache is rarely used and it is even fixed now. - -diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp ---- a/gdb/testsuite/gdb.base/macscp.exp -+++ b/gdb/testsuite/gdb.base/macscp.exp -@@ -27,6 +27,14 @@ if { [test_compiler_info "gcc-*"] } { - lappend options additional_flags=-fdebug-macro - } - -+# 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" -+ } -+} -+ - # Generate the intermediate object file. This is required by Darwin to - # have access to the .debug_macinfo section. - if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \ diff --git a/0039-gdb-lineno-makeup-test.patch b/0039-gdb-lineno-makeup-test.patch deleted file mode 100644 index 4b96286bcf9fb3ba6180561c6c81c4a6d19fd78b..0000000000000000000000000000000000000000 --- a/0039-gdb-lineno-makeup-test.patch +++ /dev/null @@ -1,165 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-lineno-makeup-test.patch - -;; Testcase for "Do not make up line information" fix by Daniel Jacobowitz. -;;=fedoratest - -New testcase for: -https://bugzilla.redhat.com/show_bug.cgi?id=466222 - (for the first / customer recommended fix) -and the upstream fix: -http://sourceware.org/ml/gdb-patches/2006-11/msg00253.html - [rfc] Do not make up line information -http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html - -diff --git a/gdb/testsuite/gdb.base/lineno-makeup-func.c b/gdb/testsuite/gdb.base/lineno-makeup-func.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/lineno-makeup-func.c -@@ -0,0 +1,21 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2009 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 . */ -+ -+void -+func (void) -+{ -+} -diff --git a/gdb/testsuite/gdb.base/lineno-makeup.c b/gdb/testsuite/gdb.base/lineno-makeup.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/lineno-makeup.c -@@ -0,0 +1,35 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2009 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 . */ -+ -+/* DW_AT_low_pc-DW_AT_high_pc should cover the function without line number -+ information (.debug_line) so we cannot use an external object file. -+ -+ It must not be just a label as it would alias on the next function even for -+ correct GDB. Therefore some stub data must be placed there. -+ -+ We need to provide a real stub function body as at least s390 -+ (s390_analyze_prologue) would skip the whole body till reaching `main'. */ -+ -+extern void func (void); -+asm ("func: .incbin \"" BINFILENAME "\""); -+ -+int -+main (void) -+{ -+ func (); -+ return 0; -+} -diff --git a/gdb/testsuite/gdb.base/lineno-makeup.exp b/gdb/testsuite/gdb.base/lineno-makeup.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/lineno-makeup.exp -@@ -0,0 +1,78 @@ -+# Copyright 2009 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 . -+ -+set testfile "lineno-makeup" -+set srcfuncfile ${testfile}-func.c -+set srcfile ${testfile}.c -+set objfuncfile [standard_output_file ${testfile}-func.o] -+set binfuncfile [standard_output_file ${testfile}-func.bin] -+set binfile [standard_output_file ${testfile}] -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" "${objfuncfile}" object {}] != "" } { -+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -+} -+ -+set objcopy [catch "exec objcopy -O binary --only-section .text ${objfuncfile} ${binfuncfile}" output] -+verbose -log "objcopy=$objcopy: $output" -+if { $objcopy != 0 } { -+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -+} -+set binfuncfilesize [file size $binfuncfile] -+verbose -log "file size $binfuncfile = $binfuncfilesize" -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=-DBINFILENAME=\"$binfuncfile\"]] != "" } { -+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -+} -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+set b_addr "" -+set test "break func" -+gdb_test_multiple $test $test { -+ -re "Breakpoint \[0-9\]+ at (0x\[0-9a-f\]+)\r\n$gdb_prompt $" { -+ set b_addr $expect_out(1,string) -+ pass $test -+ } -+ -re "Breakpoint \[0-9\]+ at (0x\[0-9a-f\]+): .*\r\n$gdb_prompt $" { -+ set b_addr $expect_out(1,string) -+ fail $test -+ } -+} -+verbose -log "b_addr=<$b_addr>" -+ -+set p_addr "" -+set test "print func" -+gdb_test_multiple $test $test { -+ -re "\\$\[0-9\]+ = {} (0x\[0-9a-f\]+) \r\n$gdb_prompt $" { -+ set p_addr $expect_out(1,string) -+ pass $test -+ } -+} -+verbose -log "p_addr=<$p_addr>" -+ -+set test "break address belongs to func" -+if {$b_addr == $p_addr} { -+ pass "$test (exact match)" -+} else { -+ set skip [expr $b_addr - $p_addr] -+ if {$skip > 0 && $skip < $binfuncfilesize} { -+ pass "$test (prologue skip by $skip bytes)" -+ } else { -+ fail $test -+ } -+} diff --git a/0040-gdb-ppc-power7-test.patch b/0040-gdb-ppc-power7-test.patch deleted file mode 100644 index c8b22cf0c29bc4229605a97e961eb5f19d5bf0c3..0000000000000000000000000000000000000000 --- a/0040-gdb-ppc-power7-test.patch +++ /dev/null @@ -1,303 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-ppc-power7-test.patch - -;; Test power7 ppc disassembly. -;;=fedoratest - -diff --git a/gdb/testsuite/gdb.arch/powerpc-power7rh.exp b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp -@@ -0,0 +1,178 @@ -+# Copyright 2009 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 PowerPC Power7 instructions disassembly. -+ -+if {![istarget "powerpc*-*-*"]} then { -+ verbose "Skipping PowerPC Power7 instructions disassembly." -+ return -+} -+ -+set testfile "powerpc-power7rh" -+set srcfile ${testfile}.s -+set objfile [standard_output_file ${testfile}.o] -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } { -+ untested "PowerPC Power7 instructions disassembly" -+ return -1 -+} -+ -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${objfile} -+ -+ -+# Disassemble the function. -+ -+set test "disass func" -+gdb_test_multiple $test $test { -+ -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" { -+ set func $expect_out(1,string) -+ pass $test -+ } -+} -+ -+proc instr_to_patt {offset instr} { -+ # 0x0000000000000018 : stxvd2x vs43,r4,r5 -+ return ".*\r\n\[ \t\]*[string map {0x 0x0*} $offset] <(func)?\\+?\[0-9\]*>:\[ \t\]*[string map [list { } "\[ \t\]+" . {\.}] $instr]\[ \t\]*\r\n.*" -+} -+ -+# KFAIL strings would not exist if -Many would print the same as -Mpower7. -+# That means the power7 form should be the preferred one. -+# http://sourceware.org/ml/gdb-patches/2009-03/threads.html#00020 -+ -+proc func_check {offset instr {kfail ""}} { -+ global func -+ -+ set test "Found $offset: $instr" -+ if [regexp -nocase -line [instr_to_patt $offset $instr] $func] { -+ pass $test -+ } elseif {$kfail != "" && [regexp -nocase -line [instr_to_patt $offset $kfail] $func]} { -+ kfail gdb/NNNN $test -+ } else { -+ fail $test -+ } -+} -+ -+func_check 0x0 "lxvd2x vs3,r4,r5" -+# [PATCH] Remove support for POWER7 VSX load/store with update instructions -+# http://sourceware.org/ml/binutils/2009-09/msg00680.html -+# http://sourceware.org/ml/binutils-cvs/2009-09/msg00331.html -+func_check 0x4 "lxvb16x vs3,r4,r5" -+func_check 0x8 "lxvd2x vs43,r4,r5" -+func_check 0xc "lxvb16x vs43,r4,r5" -+func_check 0x10 "stxvd2x vs3,r4,r5" -+func_check 0x14 "stxvb16x vs3,r4,r5" -+func_check 0x18 "stxvd2x vs43,r4,r5" -+func_check 0x1c "stxvb16x vs43,r4,r5" -+func_check 0x20 "xxmrghd vs3,vs4,vs5" -+func_check 0x24 "xxmrghd vs43,vs44,vs45" -+func_check 0x28 "xxmrgld vs3,vs4,vs5" -+func_check 0x2c "xxmrgld vs43,vs44,vs45" -+func_check 0x30 "xxmrghd vs3,vs4,vs5" -+func_check 0x34 "xxmrghd vs43,vs44,vs45" -+func_check 0x38 "xxmrgld vs3,vs4,vs5" -+func_check 0x3c "xxmrgld vs43,vs44,vs45" -+func_check 0x40 "xxpermdi vs3,vs4,vs5,1" -+func_check 0x44 "xxpermdi vs43,vs44,vs45,1" -+func_check 0x48 "xxpermdi vs3,vs4,vs5,2" -+func_check 0x4c "xxpermdi vs43,vs44,vs45,2" -+func_check 0x50 "xvmovdp vs3,vs4" -+func_check 0x54 "xvmovdp vs43,vs44" -+func_check 0x58 "xvmovdp vs3,vs4" -+func_check 0x5c "xvmovdp vs43,vs44" -+func_check 0x60 "xvcpsgndp vs3,vs4,vs5" -+func_check 0x64 "xvcpsgndp vs43,vs44,vs45" -+func_check 0x68 "wait" -+func_check 0x6c "wait" -+func_check 0x70 "waitrsv" -+func_check 0x74 "waitrsv" -+func_check 0x78 "waitimpl" -+func_check 0x7c "waitimpl" -+func_check 0x80 "doze" -+func_check 0x84 "nap" -+func_check 0x88 "sleep" -+func_check 0x8c "rvwinkle" -+func_check 0x90 "prtyw r3,r4" -+func_check 0x94 "prtyd r13,r14" -+func_check 0x98 "mfcfar r10" "mfspr r10,28" -+func_check 0x9c "mtcfar r11" "mtspr 28,r11" -+func_check 0xa0 "cmpb r3,r4,r5" -+func_check 0xa4 "lwzcix r10,r11,r12" -+func_check 0xa8 "dadd f16,f17,f18" -+func_check 0xac "daddq f20,f22,f24" -+func_check 0xb0 "dss 3" -+func_check 0xb4 "dssall" -+func_check 0xb8 "dst r5,r4,1" -+func_check 0xbc "dstt r8,r7,0" -+func_check 0xc0 "dstst r5,r6,3" -+func_check 0xc4 "dststt r4,r5,2" -+func_check 0xc8 "divwe r10,r11,r12" -+func_check 0xcc "divwe. r11,r12,r13" -+func_check 0xd0 "divweo r12,r13,r14" -+func_check 0xd4 "divweo. r13,r14,r15" -+func_check 0xd8 "divweu r10,r11,r12" -+func_check 0xdc "divweu. r11,r12,r13" -+func_check 0xe0 "divweuo r12,r13,r14" -+func_check 0xe4 "divweuo. r13,r14,r15" -+func_check 0xe8 "bpermd r7,r17,r27" -+func_check 0xec "popcntw r10,r20" -+func_check 0xf0 "popcntd r10,r20" -+func_check 0xf4 "ldbrx r20,r21,r22" -+func_check 0xf8 "stdbrx r20,r21,r22" -+func_check 0xfc "lfiwzx f10,0,r10" -+func_check 0x100 "lfiwzx f10,r9,r10" -+func_check 0x104 "fcfids f4,f5" -+func_check 0x108 "fcfids. f4,f5" -+func_check 0x10c "fcfidus f4,f5" -+func_check 0x110 "fcfidus. f4,f5" -+func_check 0x114 "fctiwu f4,f5" -+func_check 0x118 "fctiwu. f4,f5" -+func_check 0x11c "fctiwuz f4,f5" -+func_check 0x120 "fctiwuz. f4,f5" -+func_check 0x124 "fctidu f4,f5" -+func_check 0x128 "fctidu. f4,f5" -+func_check 0x12c "fctiduz f4,f5" -+func_check 0x130 "fctiduz. f4,f5" -+func_check 0x134 "fcfidu f4,f5" -+func_check 0x138 "fcfidu. f4,f5" -+func_check 0x13c "ftdiv cr0,f10,f11" -+func_check 0x140 "ftdiv cr7,f10,f11" -+func_check 0x144 "ftsqrt cr0,f10" -+func_check 0x148 "ftsqrt cr7,f10" -+func_check 0x14c "dcbtt r8,r9" "dcbt 16,r8,r9" -+func_check 0x150 "dcbtstt r8,r9" "dcbtst 16,r8,r9" -+func_check 0x154 "dcffix f10,f12" -+func_check 0x158 "dcffix. f20,f22" -+func_check 0x15c "lbarx r10,r11,r12" -+func_check 0x160 "lbarx r10,r11,r12" -+func_check 0x164 "lbarx r10,r11,r12,1" -+func_check 0x168 "lharx r20,r21,r22" -+func_check 0x16c "lharx r20,r21,r22" -+func_check 0x170 "lharx r20,r21,r22,1" -+func_check 0x174 "stbcx. r10,r11,r12" -+func_check 0x178 "sthcx. r10,r11,r12" -+func_check 0x17c "fre f14,f15" -+func_check 0x180 "fre. f14,f15" -+func_check 0x184 "fres f14,f15" -+func_check 0x188 "fres. f14,f15" -+func_check 0x18c "frsqrte f14,f15" -+func_check 0x190 "frsqrte. f14,f15" -+func_check 0x194 "frsqrtes f14,f15" -+func_check 0x198 "frsqrtes. f14,f15" -+func_check 0x19c "isel r2,r3,r4,28" -diff --git a/gdb/testsuite/gdb.arch/powerpc-power7rh.s b/gdb/testsuite/gdb.arch/powerpc-power7rh.s -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.s -@@ -0,0 +1,107 @@ -+ .text -+ .globl func -+func: -+ .long 0x7c642e98 /* 0: lxvd2x vs3,r4,r5 */ -+ .long 0x7c642ed8 /* 4: lxvd2ux vs3,r4,r5 */ -+ .long 0x7d642e99 /* 8: lxvd2x vs43,r4,r5 */ -+ .long 0x7d642ed9 /* c: lxvd2ux vs43,r4,r5 */ -+ .long 0x7c642f98 /* 10: stxvd2x vs3,r4,r5 */ -+ .long 0x7c642fd8 /* 14: stxvd2ux vs3,r4,r5 */ -+ .long 0x7d642f99 /* 18: stxvd2x vs43,r4,r5 */ -+ .long 0x7d642fd9 /* 1c: stxvd2ux vs43,r4,r5 */ -+ .long 0xf0642850 /* 20: xxmrghd vs3,vs4,vs5 */ -+ .long 0xf16c6857 /* 24: xxmrghd vs43,vs44,vs45 */ -+ .long 0xf0642b50 /* 28: xxmrgld vs3,vs4,vs5 */ -+ .long 0xf16c6b57 /* 2c: xxmrgld vs43,vs44,vs45 */ -+ .long 0xf0642850 /* 30: xxmrghd vs3,vs4,vs5 */ -+ .long 0xf16c6857 /* 34: xxmrghd vs43,vs44,vs45 */ -+ .long 0xf0642b50 /* 38: xxmrgld vs3,vs4,vs5 */ -+ .long 0xf16c6b57 /* 3c: xxmrgld vs43,vs44,vs45 */ -+ .long 0xf0642950 /* 40: xxpermdi vs3,vs4,vs5,1 */ -+ .long 0xf16c6957 /* 44: xxpermdi vs43,vs44,vs45,1 */ -+ .long 0xf0642a50 /* 48: xxpermdi vs3,vs4,vs5,2 */ -+ .long 0xf16c6a57 /* 4c: xxpermdi vs43,vs44,vs45,2 */ -+ .long 0xf0642780 /* 50: xvmovdp vs3,vs4 */ -+ .long 0xf16c6787 /* 54: xvmovdp vs43,vs44 */ -+ .long 0xf0642780 /* 58: xvmovdp vs3,vs4 */ -+ .long 0xf16c6787 /* 5c: xvmovdp vs43,vs44 */ -+ .long 0xf0642f80 /* 60: xvcpsgndp vs3,vs4,vs5 */ -+ .long 0xf16c6f87 /* 64: xvcpsgndp vs43,vs44,vs45 */ -+ .long 0x7c00007c /* 68: wait */ -+ .long 0x7c00007c /* 6c: wait */ -+ .long 0x7c20007c /* 70: waitrsv */ -+ .long 0x7c20007c /* 74: waitrsv */ -+ .long 0x7c40007c /* 78: waitimpl */ -+ .long 0x7c40007c /* 7c: waitimpl */ -+ .long 0x4c000324 /* 80: doze */ -+ .long 0x4c000364 /* 84: nap */ -+ .long 0x4c0003a4 /* 88: sleep */ -+ .long 0x4c0003e4 /* 8c: rvwinkle */ -+ .long 0x7c830134 /* 90: prtyw r3,r4 */ -+ .long 0x7dcd0174 /* 94: prtyd r13,r14 */ -+ .long 0x7d5c02a6 /* 98: mfcfar r10 */ -+ .long 0x7d7c03a6 /* 9c: mtcfar r11 */ -+ .long 0x7c832bf8 /* a0: cmpb r3,r4,r5 */ -+ .long 0x7d4b662a /* a4: lwzcix r10,r11,r12 */ -+ .long 0xee119004 /* a8: dadd f16,f17,f18 */ -+ .long 0xfe96c004 /* ac: daddq f20,f22,f24 */ -+ .long 0x7c60066c /* b0: dss 3 */ -+ .long 0x7e00066c /* b4: dssall */ -+ .long 0x7c2522ac /* b8: dst r5,r4,1 */ -+ .long 0x7e083aac /* bc: dstt r8,r7,0 */ -+ .long 0x7c6532ec /* c0: dstst r5,r6,3 */ -+ .long 0x7e442aec /* c4: dststt r4,r5,2 */ -+ .long 0x7d4b6356 /* c8: divwe r10,r11,r12 */ -+ .long 0x7d6c6b57 /* cc: divwe. r11,r12,r13 */ -+ .long 0x7d8d7756 /* d0: divweo r12,r13,r14 */ -+ .long 0x7dae7f57 /* d4: divweo. r13,r14,r15 */ -+ .long 0x7d4b6316 /* d8: divweu r10,r11,r12 */ -+ .long 0x7d6c6b17 /* dc: divweu. r11,r12,r13 */ -+ .long 0x7d8d7716 /* e0: divweuo r12,r13,r14 */ -+ .long 0x7dae7f17 /* e4: divweuo. r13,r14,r15 */ -+ .long 0x7e27d9f8 /* e8: bpermd r7,r17,r27 */ -+ .long 0x7e8a02f4 /* ec: popcntw r10,r20 */ -+ .long 0x7e8a03f4 /* f0: popcntd r10,r20 */ -+ .long 0x7e95b428 /* f4: ldbrx r20,r21,r22 */ -+ .long 0x7e95b528 /* f8: stdbrx r20,r21,r22 */ -+ .long 0x7d4056ee /* fc: lfiwzx f10,0,r10 */ -+ .long 0x7d4956ee /* 100: lfiwzx f10,r9,r10 */ -+ .long 0xec802e9c /* 104: fcfids f4,f5 */ -+ .long 0xec802e9d /* 108: fcfids. f4,f5 */ -+ .long 0xec802f9c /* 10c: fcfidus f4,f5 */ -+ .long 0xec802f9d /* 110: fcfidus. f4,f5 */ -+ .long 0xfc80291c /* 114: fctiwu f4,f5 */ -+ .long 0xfc80291d /* 118: fctiwu. f4,f5 */ -+ .long 0xfc80291e /* 11c: fctiwuz f4,f5 */ -+ .long 0xfc80291f /* 120: fctiwuz. f4,f5 */ -+ .long 0xfc802f5c /* 124: fctidu f4,f5 */ -+ .long 0xfc802f5d /* 128: fctidu. f4,f5 */ -+ .long 0xfc802f5e /* 12c: fctiduz f4,f5 */ -+ .long 0xfc802f5f /* 130: fctiduz. f4,f5 */ -+ .long 0xfc802f9c /* 134: fcfidu f4,f5 */ -+ .long 0xfc802f9d /* 138: fcfidu. f4,f5 */ -+ .long 0xfc0a5900 /* 13c: ftdiv cr0,f10,f11 */ -+ .long 0xff8a5900 /* 140: ftdiv cr7,f10,f11 */ -+ .long 0xfc005140 /* 144: ftsqrt cr0,f10 */ -+ .long 0xff805140 /* 148: ftsqrt cr7,f10 */ -+ .long 0x7e084a2c /* 14c: dcbtt r8,r9 */ -+ .long 0x7e0849ec /* 150: dcbtstt r8,r9 */ -+ .long 0xed406644 /* 154: dcffix f10,f12 */ -+ .long 0xee80b645 /* 158: dcffix. f20,f22 */ -+ .long 0x7d4b6068 /* 15c: lbarx r10,r11,r12 */ -+ .long 0x7d4b6068 /* 160: lbarx r10,r11,r12 */ -+ .long 0x7d4b6069 /* 164: lbarx r10,r11,r12,1 */ -+ .long 0x7e95b0e8 /* 168: lharx r20,r21,r22 */ -+ .long 0x7e95b0e8 /* 16c: lharx r20,r21,r22 */ -+ .long 0x7e95b0e9 /* 170: lharx r20,r21,r22,1 */ -+ .long 0x7d4b656d /* 174: stbcx. r10,r11,r12 */ -+ .long 0x7d4b65ad /* 178: sthcx. r10,r11,r12 */ -+ .long 0xfdc07830 /* 17c: fre f14,f15 */ -+ .long 0xfdc07831 /* 180: fre. f14,f15 */ -+ .long 0xedc07830 /* 184: fres f14,f15 */ -+ .long 0xedc07831 /* 188: fres. f14,f15 */ -+ .long 0xfdc07834 /* 18c: frsqrte f14,f15 */ -+ .long 0xfdc07835 /* 190: frsqrte. f14,f15 */ -+ .long 0xedc07834 /* 194: frsqrtes f14,f15 */ -+ .long 0xedc07835 /* 198: frsqrtes. f14,f15 */ -+ .long 0x7c43271e /* 19c: isel r2,r3,r4,28 */ diff --git a/0042-gdb-bz601887-dwarf4-rh-test.patch b/0042-gdb-bz601887-dwarf4-rh-test.patch deleted file mode 100644 index 966c986e9ecea136b335943454e80ff7a13f03f8..0000000000000000000000000000000000000000 --- a/0042-gdb-bz601887-dwarf4-rh-test.patch +++ /dev/null @@ -1,254 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-bz601887-dwarf4-rh-test.patch - -;; Backport DWARF-4 support (BZ 601887, Tom Tromey). -;;=fedoratest - -diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S -@@ -0,0 +1,167 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2010 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 . */ -+ -+ .file "rh-dwarf4-x86_64.c" -+ .section .debug_abbrev,"",@progbits -+.Ldebug_abbrev0: -+ .section .debug_info,"",@progbits -+.Ldebug_info0: -+ .section .debug_line,"",@progbits -+.Ldebug_line0: -+ .text -+.Ltext0: -+.globl main -+ .type main, @function -+main: -+.LFB0: -+ .file 1 "gdb.dwarf2/rh-dwarf4-x86_64.c" -+ # gdb.dwarf2/rh-dwarf4-x86_64.c:20 -+ .loc 1 20 0 -+ .cfi_startproc -+ # basic block 2 -+ pushq %rbp -+ .cfi_def_cfa_offset 16 -+ movq %rsp, %rbp -+ .cfi_offset 6, -16 -+ .cfi_def_cfa_register 6 -+ # gdb.dwarf2/rh-dwarf4-x86_64.c:21 -+ .loc 1 21 0 -+ movl $0, %eax -+ # gdb.dwarf2/rh-dwarf4-x86_64.c:22 -+ .loc 1 22 0 -+ leave -+ .cfi_def_cfa 7, 8 -+ ret -+ .cfi_endproc -+.LFE0: -+ .size main, .-main -+.Letext0: -+ .section .debug_info -+ .long 0x4e # Length of Compilation Unit Info -+ .value 0x4 # DWARF version number -+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section -+ .byte 0x8 # Pointer Size (in bytes) -+ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit) -+ .long .LASF0 # DW_AT_producer: "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)" -+ .byte 0x1 # DW_AT_language -+ .long .LASF1 # DW_AT_name: "gdb.dwarf2/rh-dwarf4-x86_64.c" -+ .long .LASF2 # DW_AT_comp_dir -+ .quad .Ltext0 # DW_AT_low_pc -+ .quad .Letext0 # DW_AT_high_pc -+ .long .Ldebug_line0 # DW_AT_stmt_list -+ .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram) -+ # DW_AT_external -+ .long .LASF3 # DW_AT_name: "main" -+ .byte 0x1 # DW_AT_decl_file (gdb.dwarf2/rh-dwarf4-x86_64.c) -+ .byte 0x13 # DW_AT_decl_line -+ # DW_AT_prototyped -+ .long 0x4a # DW_AT_type -+ .quad .LFB0 # DW_AT_low_pc -+ .quad .LFE0 # DW_AT_high_pc -+ .uleb128 0x1 # DW_AT_frame_base -+ .byte 0x9c # DW_OP_call_frame_cfa -+ .uleb128 0x3 # (DIE (0x4a) DW_TAG_base_type) -+ .byte 0x4 # DW_AT_byte_size -+ .byte 0x5 # DW_AT_encoding -+ .ascii "int\0" # DW_AT_name -+ .byte 0x0 # end of children of DIE 0xb -+ .section .debug_abbrev -+ .uleb128 0x1 # (abbrev code) -+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit) -+ .byte 0x1 # DW_children_yes -+ .uleb128 0x25 # (DW_AT_producer) -+ .uleb128 0xe # (DW_FORM_strp) -+ .uleb128 0x13 # (DW_AT_language) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3 # (DW_AT_name) -+ .uleb128 0xe # (DW_FORM_strp) -+ .uleb128 0x1b # (DW_AT_comp_dir) -+ .uleb128 0xe # (DW_FORM_strp) -+ .uleb128 0x11 # (DW_AT_low_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x12 # (DW_AT_high_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x10 # (DW_AT_stmt_list) -+ .uleb128 0x17 # (DW_FORM_sec_offset) -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x2 # (abbrev code) -+ .uleb128 0x2e # (TAG: DW_TAG_subprogram) -+ .byte 0x0 # DW_children_no -+ .uleb128 0x3f # (DW_AT_external) -+ .uleb128 0x19 # (DW_FORM_flag_present) -+ .uleb128 0x3 # (DW_AT_name) -+ .uleb128 0xe # (DW_FORM_strp) -+ .uleb128 0x3a # (DW_AT_decl_file) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3b # (DW_AT_decl_line) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x27 # (DW_AT_prototyped) -+ .uleb128 0x19 # (DW_FORM_flag_present) -+ .uleb128 0x49 # (DW_AT_type) -+ .uleb128 0x13 # (DW_FORM_ref4) -+ .uleb128 0x11 # (DW_AT_low_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x12 # (DW_AT_high_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x40 # (DW_AT_frame_base) -+ .uleb128 0x18 # (DW_FORM_exprloc) -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x3 # (abbrev code) -+ .uleb128 0x24 # (TAG: DW_TAG_base_type) -+ .byte 0x0 # DW_children_no -+ .uleb128 0xb # (DW_AT_byte_size) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3e # (DW_AT_encoding) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3 # (DW_AT_name) -+ .uleb128 0x8 # (DW_FORM_string) -+ .byte 0x0 -+ .byte 0x0 -+ .byte 0x0 -+ .section .debug_pubnames,"",@progbits -+ .long 0x17 # Length of Public Names Info -+ .value 0x2 # DWARF Version -+ .long .Ldebug_info0 # Offset of Compilation Unit Info -+ .long 0x52 # Compilation Unit Length -+ .long 0x2d # DIE offset -+ .ascii "main\0" # external name -+ .long 0x0 -+ .section .debug_aranges,"",@progbits -+ .long 0x2c # Length of Address Ranges Info -+ .value 0x2 # DWARF Version -+ .long .Ldebug_info0 # Offset of Compilation Unit Info -+ .byte 0x8 # Size of Address -+ .byte 0x0 # Size of Segment Descriptor -+ .value 0x0 # Pad to 16 byte boundary -+ .value 0x0 -+ .quad .Ltext0 # Address -+ .quad .Letext0-.Ltext0 # Length -+ .quad 0x0 -+ .quad 0x0 -+ .section .debug_str,"MS",@progbits,1 -+.LASF2: -+ .string "." -+.LASF0: -+ .string "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)" -+.LASF1: -+ .string "gdb.dwarf2/rh-dwarf4-x86_64.c" -+.LASF3: -+ .string "main" -+ .ident "GCC: (GNU) 4.4.4 20100503 (Red Hat 4.4.4-2)" -+ .section .note.GNU-stack,"",@progbits -diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c -@@ -0,0 +1,22 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2010 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 . */ -+ -+int -+main (void) -+{ -+ return 0; -+} -diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp -@@ -0,0 +1,42 @@ -+# Copyright 2010 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 . -+ -+# This test can only be run on targets which support DWARF-2 and use gas. -+# For now pick a sampling of likely targets. -+if {![istarget *-*-linux*] -+ && ![istarget *-*-gnu*] -+ && ![istarget *-*-elf*] -+ && ![istarget *-*-openbsd*] -+ && ![istarget arm-*-eabi*] -+ && ![istarget powerpc-*-eabi*]} { -+ return 0 -+} -+ -+if {![istarget x86_64-*]} { -+ return 0 -+} -+ -+set testfile "rh-dwarf4-x86_64" -+set srcfile ${testfile}.S -+set executable ${testfile}.x -+set binfile [standard_output_file ${executable}] -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { -+ return -1 -+} -+ -+clean_restart $executable -+ -+gdb_test "ptype main" {type = int \(void\)} diff --git a/0046-gdb-test-pid0-core.patch b/0046-gdb-test-pid0-core.patch deleted file mode 100644 index fea4defa99a4226390c2a75a2c17f3297136f18e..0000000000000000000000000000000000000000 --- a/0046-gdb-test-pid0-core.patch +++ /dev/null @@ -1,92 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-test-pid0-core.patch - -;; New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435). -;;=fedoratest - -https://bugzilla.redhat.com/show_bug.cgi?id=611435 - -Fix: -Re: [RFA]corelow.c: Add tid to add_to_thread_list -http://sourceware.org/ml/gdb-patches/2010-08/msg00085.html -http://sourceware.org/ml/gdb-cvs/2010-08/msg00026.html -2e5bcfdef1ec3883d48c3f87a4be5c0dff25e17e - -diff --git a/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu b/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu -@@ -0,0 +1,20 @@ -+begin 600 x86_64-pid0-core.core.bz2 -+M0EIH.3%!629362,CA>P!$/'_____^*#EZ-A!SP36P&_:G0#=14``04A&8,'U -+M2*9`>$$)P`*RN"#*;#4R()IJ8C$TT&FC3$&@`T`#:C1H8C0T,@,FC,D"4T2! -+M"/2CU'B90]31ZAD#U`&AZF@/4:``!HT&F@!H<`#0-`-#0``#3$-&F@```#0R -+M``#")2FD]2>4]0TTT-!HTT--,0,"#$`R!I@AD`#1H,3&GZT.4TO$#H40/`0C -+M2$IRXS,<55!8T,&&,R.Z441"?J9I%G6GUA2!.[]Z"C5S[&19,%VS7E6[3"60 -+M@`-*2G)QEQ(;?0Y<=MK]/U?Q)LB%+F37TJ9BI*46)H'*Z@V"`"$"P7]&XZ:JE0E<*:#1M$P3G]>VCI)(A!O$64`5$4`E$$-.``7&(09`8HO`B6K!Q^& -+M562%N)2+0@*HB@%D@5$%!*0!L1&0D4D6\:-$A`)`+<6D82PP*H(J(H!?F;0$ -+M%PXB7N!2D4!44`W7"ADEQM6O9TBO5,_]1) -+M($Q2))#),UE,QQK)E$,3D\W.>!4)QO8A_@^Z_SXS4;Q8=HV6[:&$@2$@$R29IBW)K%3"O` -+M9^Y0YJ&BXY1U2HTZ5)2H-V\_(.DZHWE+C#WS($(!I"3CUH2#(+(OWUV"*<<9 -+MJ%A!J[%O.P&V%GI.`L7<1@0>,^1F\MY=V5UT,&NOG%7TTZ[03!@BHB@&)P` -+` -+end -diff --git a/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp b/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp -@@ -0,0 +1,46 @@ -+# This testcase is part of GDB, the GNU debugger. -+# -+# Copyright 2010 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. -+ -+# Some kernel core files have PID 0 - for the idle task. -+ -+if ![istarget "x86_64-*-*"] { -+ verbose "Skipping x86_64-pid0-core test." -+ return -+} -+ -+set testfile "x86_64-pid0-core" -+set corebz2uufile ${srcdir}/${subdir}/${testfile}.core.bz2.uu -+set corefile [standard_output_file ${testfile}.core] -+ -+if {[catch "system \"uudecode -o - ${corebz2uufile} | bzip2 -dc >${corefile}\""] != 0} { -+ untested "failed uudecode or bzip2" -+ return -1 -+} -+file stat ${corefile} corestat -+if {$corestat(size) != 8798208} { -+ untested "uudecode or bzip2 produce invalid result" -+ return -1 -+} -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+ -+# Former crash was: -+# thread.c:884: internal-error: switch_to_thread: Assertion `inf != NULL' failed. -+gdb_test "core-file ${corefile}" "Program terminated with signal (11|SIGSEGV), Segmentation fault\\.\r\n.*" diff --git a/0048-gdb-test-expr-cumulative-archer.patch b/0048-gdb-test-expr-cumulative-archer.patch deleted file mode 100644 index 28a903dd9b4c7b65f8967b43b6154f863c0b234b..0000000000000000000000000000000000000000 --- a/0048-gdb-test-expr-cumulative-archer.patch +++ /dev/null @@ -1,223 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-test-expr-cumulative-archer.patch - -;; [archer-keiths-expr-cumulative+upstream] Import C++ testcases. -;;=fedoratest - -archer archer-keiths-expr-cumulative -b5a7497340b24199f0c7ba7fdf0d54d4df44d6bc - -diff --git a/gdb/testsuite/gdb.cp/namespace-nested-imports.cc b/gdb/testsuite/gdb.cp/namespace-nested-imports.cc -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/namespace-nested-imports.cc -@@ -0,0 +1,36 @@ -+namespace A -+{ -+ namespace B -+ { -+ int ab = 11; -+ } -+} -+ -+namespace C -+{ -+ namespace D -+ { -+ using namespace A::B; -+ -+ int -+ second() -+ { -+ ab; -+ return 0; -+ } -+ } -+ -+ int -+ first() -+ { -+ //ab; -+ return D::second(); -+ } -+} -+ -+int -+main() -+{ -+ //ab; -+ return C::first(); -+} -diff --git a/gdb/testsuite/gdb.cp/namespace-nested-imports.exp b/gdb/testsuite/gdb.cp/namespace-nested-imports.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/namespace-nested-imports.exp -@@ -0,0 +1,50 @@ -+# Copyright 2008 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 . -+ -+set testfile namespace-nested-imports -+set srcfile ${testfile}.cc -+set binfile [standard_output_file ${testfile}] -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } { -+ untested "Couldn't compile test program" -+ return -1 -+} -+ -+# Get things started. -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+############################################ -+if ![runto_main] then { -+ perror "couldn't run to breakpoint main" -+ continue -+} -+ -+gdb_test "print ab" "No symbol .* in current context." -+ -+############################################ -+gdb_breakpoint C::first -+gdb_continue_to_breakpoint "C::first" -+ -+gdb_test "print ab" "No symbol .* in current context." -+gdb_test "print C::D::ab" "= 11" -+ -+############################################ -+gdb_breakpoint C::D::second -+gdb_continue_to_breakpoint "C::D::second" -+ -+gdb_test "print ab" "= 11" -diff --git a/gdb/testsuite/gdb.cp/namespace-no-imports.cc b/gdb/testsuite/gdb.cp/namespace-no-imports.cc -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/namespace-no-imports.cc -@@ -0,0 +1,37 @@ -+ -+namespace A -+{ -+ int _a = 11; -+ -+ namespace B{ -+ -+ int ab = 22; -+ -+ namespace C{ -+ -+ int abc = 33; -+ -+ int second(){ -+ return 0; -+ } -+ -+ } -+ -+ int first(){ -+ _a; -+ ab; -+ C::abc; -+ return C::second(); -+ } -+ } -+} -+ -+ -+int -+main() -+{ -+ A::_a; -+ A::B::ab; -+ A::B::C::abc; -+ return A::B::first(); -+} -diff --git a/gdb/testsuite/gdb.cp/namespace-no-imports.exp b/gdb/testsuite/gdb.cp/namespace-no-imports.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/namespace-no-imports.exp -@@ -0,0 +1,69 @@ -+# Copyright 2008 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 . -+ -+set testfile namespace-no-imports -+set srcfile ${testfile}.cc -+set binfile [standard_output_file ${testfile}] -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } { -+ untested "Couldn't compile test program" -+ return -1 -+} -+ -+# Get things started. -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+############################################ -+if ![runto_main] then { -+ perror "couldn't run to breakpoint main" -+ continue -+} -+ -+gdb_test "print A::_a" "= 11" -+gdb_test "print A::B::ab" "= 22" -+gdb_test "print A::B::C::abc" "= 33" -+ -+gdb_test "print _a" "No symbol .* in current context." -+gdb_test "print ab" "No symbol .* in current context." -+gdb_test "print abc" "No symbol .* in current context." -+ -+############################################ -+gdb_breakpoint A::B::first -+gdb_continue_to_breakpoint "A::B::first" -+ -+gdb_test "print A::_a" "= 11" -+gdb_test "print A::B::ab" "= 22" -+gdb_test "print A::B::C::abc" "= 33" -+ -+gdb_test "print _a" "= 11" -+gdb_test "print ab" "= 22" -+gdb_test "print C::abc" "= 33" -+ -+gdb_test "print abc" "No symbol .* in current context." -+ -+############################################ -+gdb_breakpoint A::B::C::second -+gdb_continue_to_breakpoint "A::B::C::second" -+ -+gdb_test "print A::_a" "= 11" -+gdb_test "print A::B::ab" "= 22" -+gdb_test "print A::B::C::abc" "= 33" -+ -+gdb_test "print _a" "= 11" -+gdb_test "print ab" "= 22" -+gdb_test "print abc" "= 33" diff --git a/0049-gdb-physname-pr11734-test.patch b/0049-gdb-physname-pr11734-test.patch deleted file mode 100644 index 835e18c99bf91bb2c8dfc9205a10bf077f610500..0000000000000000000000000000000000000000 --- a/0049-gdb-physname-pr11734-test.patch +++ /dev/null @@ -1,229 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-physname-pr11734-test.patch - -;; Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). -;;=fedoratest - -http://sourceware.org/ml/gdb-patches/2010-12/msg00263.html - -diff --git a/gdb/testsuite/gdb.cp/pr11734-1.cc b/gdb/testsuite/gdb.cp/pr11734-1.cc -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/pr11734-1.cc -@@ -0,0 +1,29 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2010 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 . -+ -+ Please email any bugs, comments, and/or additions to this file to: -+ bug-gdb@gnu.org */ -+ -+#include "pr11734.h" -+ -+int -+main () -+{ -+ pr11734 *p = new pr11734; -+ p->foo (); -+ return 0; -+} -diff --git a/gdb/testsuite/gdb.cp/pr11734-2.cc b/gdb/testsuite/gdb.cp/pr11734-2.cc -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/pr11734-2.cc -@@ -0,0 +1,26 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2010 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 . -+ -+ Please email any bugs, comments, and/or additions to this file to: -+ bug-gdb@gnu.org */ -+ -+#include "pr11734.h" -+ -+void -+pr11734::foo(void) -+{ -+} -diff --git a/gdb/testsuite/gdb.cp/pr11734-3.cc b/gdb/testsuite/gdb.cp/pr11734-3.cc -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/pr11734-3.cc -@@ -0,0 +1,26 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2010 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 . -+ -+ Please email any bugs, comments, and/or additions to this file to: -+ bug-gdb@gnu.org */ -+ -+#include "pr11734.h" -+ -+void -+pr11734::foo (int a) -+{ -+} -diff --git a/gdb/testsuite/gdb.cp/pr11734-4.cc b/gdb/testsuite/gdb.cp/pr11734-4.cc -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/pr11734-4.cc -@@ -0,0 +1,26 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2010 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 . -+ -+ Please email any bugs, comments, and/or additions to this file to: -+ bug-gdb@gnu.org */ -+ -+#include "pr11734.h" -+ -+void -+pr11734::foo (char *a) -+{ -+} -diff --git a/gdb/testsuite/gdb.cp/pr11734.exp b/gdb/testsuite/gdb.cp/pr11734.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/pr11734.exp -@@ -0,0 +1,55 @@ -+# Copyright 2010 Free Software Foundation, Inc. -+# -+# Contributed by Red Hat, originally written by Keith Seitz. -+# -+# 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 . -+ -+# This file is part of the gdb testsuite. -+ -+if { [skip_cplus_tests] } { continue } -+ -+set testfile "pr11734" -+set class $testfile -+ -+set srcfiles {} -+for {set i 1} {$i < 5} {incr i} { -+ lappend srcfiles $testfile-$i.cc -+} -+ -+prepare_for_testing pr11734 $testfile $srcfiles {c++ debug} -+ -+if {![runto_main]} { -+ perror "couldn't run to breakpoint" -+ continue -+} -+ -+# An array holding the overload types for the method pr11734::foo. The -+# first element is the overloaded method parameter. The second element -+# is the expected source file number, e.g. "pr11734-?.cc". -+array set tests { -+ "char*" 4 -+ "int" 3 -+ "" 2 -+} -+ -+# Test each overload instance twice: once quoted, once unquoted -+foreach ovld [array names tests] { -+ set method "${class}::foo\($ovld\)" -+ set result "Breakpoint (\[0-9\]).*file .*/$class-$tests($ovld).*" -+ gdb_test "break $method" $result -+ gdb_test "break '$method'" $result -+} -+ -+gdb_exit -+return 0 -diff --git a/gdb/testsuite/gdb.cp/pr11734.h b/gdb/testsuite/gdb.cp/pr11734.h -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/pr11734.h -@@ -0,0 +1,27 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2010 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 . -+ -+ Please email any bugs, comments, and/or additions to this file to: -+ bug-gdb@gnu.org */ -+ -+class pr11734 -+{ -+ public: -+ void foo (); -+ void foo (int); -+ void foo (char *); -+}; diff --git a/0050-gdb-physname-pr12273-test.patch b/0050-gdb-physname-pr12273-test.patch deleted file mode 100644 index 6c943ad89e9c451bc88dd577b94cc8c6f3af2fdd..0000000000000000000000000000000000000000 --- a/0050-gdb-physname-pr12273-test.patch +++ /dev/null @@ -1,103 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-physname-pr12273-test.patch - -;; Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). -;;=fedoratest - -http://sourceware.org/ml/gdb-patches/2010-12/msg00264.html - -diff --git a/gdb/testsuite/gdb.cp/pr12273.cc b/gdb/testsuite/gdb.cp/pr12273.cc -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/pr12273.cc -@@ -0,0 +1,37 @@ -+/* This test case is part of GDB, the GNU debugger. -+ -+ Copyright 2010 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 . */ -+ -+template -+class GDB -+{ -+ public: -+ static int simple (void) { return 0; } -+ static int harder (T a) { return 1; } -+ template -+ static X even_harder (T a) { return static_cast (a); } -+ int operator == (GDB const& other) -+ { return 1; } -+}; -+ -+int main(int argc, char **argv) -+{ -+ GDB a, b; -+ if (a == b) -+ return GDB::harder('a') + GDB::harder(3) -+ + GDB::even_harder ('a'); -+ return GDB::simple (); -+} -diff --git a/gdb/testsuite/gdb.cp/pr12273.exp b/gdb/testsuite/gdb.cp/pr12273.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.cp/pr12273.exp -@@ -0,0 +1,46 @@ -+# Copyright 2010 Free Software Foundation, Inc. -+# -+# Contributed by Red Hat, originally written by Keith Seitz. -+# -+# 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 . -+ -+# This file is part of the gdb testsuite. -+ -+if {[skip_cplus_tests]} { continue } -+ -+set testfile "pr12273" -+# Do NOT compile with debug flag. -+prepare_for_testing pr12273 $testfile $testfile.cc {c++} -+ -+gdb_test_no_output "set language c++" -+ -+# A list of minimal symbol names to check. -+# Note that GDB::even_harder(char) is quoted and includes -+# the return type. This is necessary because this is the demangled name -+# of the minimal symbol. -+set min_syms [list \ -+ "GDB::operator ==" \ -+ "GDB::operator==(GDB const&)" \ -+ "GDB::harder(char)" \ -+ "GDB::harder(int)" \ -+ {"int GDB::even_harder(char)"} \ -+ "GDB::simple()"] -+ -+foreach sym $min_syms { -+ if {[gdb_breakpoint $sym]} { -+ pass "setting breakpoint at $sym" -+ } -+} -+ -+gdb_exit diff --git a/0051-gdb-test-ivy-bridge.patch b/0051-gdb-test-ivy-bridge.patch deleted file mode 100644 index ed827897bb8d6497d3960ec04a4393e53e98314f..0000000000000000000000000000000000000000 --- a/0051-gdb-test-ivy-bridge.patch +++ /dev/null @@ -1,468 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-test-ivy-bridge.patch - -;; Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890). -;;=fedoratest - -diff --git a/gdb/testsuite/gdb.arch/amd64-ivy-bridge.S b/gdb/testsuite/gdb.arch/amd64-ivy-bridge.S -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/amd64-ivy-bridge.S -@@ -0,0 +1,98 @@ -+/* 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 . -+ -+ This file is part of the gdb testsuite. */ -+ -+ .globl _start -+_start: .text -+ -+/* gas/i386/x86-64-rdrnd.s */ -+ .att_syntax prefix -+ rdrand %bx -+ rdrand %ebx -+ rdrand %rbx -+ rdrand %r8w -+ rdrand %r8d -+ rdrand %r8 -+ -+ .intel_syntax noprefix -+ rdrand bx -+ rdrand ebx -+ rdrand rbx -+ rdrand r8w -+ rdrand r8d -+ rdrand r8 -+ -+/* gas/i386/x86-64-f16c.s */ -+ .att_syntax prefix -+ vcvtph2ps %xmm4,%ymm4 -+ vcvtph2ps (%r8),%ymm8 -+ vcvtph2ps %xmm4,%xmm6 -+ vcvtph2ps (%rcx),%xmm4 -+ vcvtps2ph $0x2,%ymm4,%xmm4 -+ vcvtps2ph $0x2,%ymm8,(%r8) -+ vcvtps2ph $0x2,%xmm4,%xmm4 -+ vcvtps2ph $0x2,%xmm4,(%rcx) -+ -+ .intel_syntax noprefix -+ vcvtph2ps ymm4,xmm4 -+ vcvtph2ps ymm8,XMMWORD PTR [r8] -+ vcvtph2ps ymm4,[rcx] -+ vcvtph2ps xmm6,xmm4 -+ vcvtph2ps xmm4,QWORD PTR [rcx] -+ vcvtph2ps xmm4,[rcx] -+ vcvtps2ph xmm4,ymm4,0x2 -+ vcvtps2ph XMMWORD PTR [rcx],ymm4,0x2 -+ vcvtps2ph [rcx],ymm4,0x2 -+ vcvtps2ph xmm4,xmm4,0x2 -+ vcvtps2ph QWORD PTR [r8],xmm8,0x2 -+ vcvtps2ph [rcx],xmm4,0x2 -+ -+/* gas/i386/x86-64-fsgs.s */ -+ .att_syntax prefix -+ rdfsbase %ebx -+ rdfsbase %rbx -+ rdfsbase %r8d -+ rdfsbase %r8 -+ rdgsbase %ebx -+ rdgsbase %rbx -+ rdgsbase %r8d -+ rdgsbase %r8 -+ wrfsbase %ebx -+ wrfsbase %rbx -+ wrfsbase %r8d -+ wrfsbase %r8 -+ wrgsbase %ebx -+ wrgsbase %rbx -+ wrgsbase %r8d -+ wrgsbase %r8 -+ -+ .intel_syntax noprefix -+ rdfsbase ebx -+ rdfsbase rbx -+ rdfsbase r8d -+ rdfsbase r8 -+ rdgsbase ebx -+ rdgsbase rbx -+ rdgsbase r8d -+ rdgsbase r8 -+ wrfsbase ebx -+ wrfsbase rbx -+ wrfsbase r8d -+ wrfsbase r8 -+ wrgsbase ebx -+ wrgsbase rbx -+ wrgsbase r8d -+ wrgsbase r8 -diff --git a/gdb/testsuite/gdb.arch/amd64-ivy-bridge.exp b/gdb/testsuite/gdb.arch/amd64-ivy-bridge.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/amd64-ivy-bridge.exp -@@ -0,0 +1,170 @@ -+# 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 . -+ -+if {![istarget "x86_64-*-*"]} then { -+ return -+} -+ -+set testfile amd64-ivy-bridge -+set test compilation -+if [prepare_for_testing ${testfile}.exp ${testfile}.x ${testfile}.S [list debug "additional_flags=-m64 -nostdlib"]] { -+ unsupported $test -+ return -1 -+} -+pass $test -+ -+gdb_test_no_output "set disassembly-flavor att" -+# gas/i386/x86-64-rdrnd.d -+# gas/i386/x86-64-f16c.d -+# gas/i386/x86-64-fsgs.d -+gdb_test "disassemble/r _start" "\r -+Dump of assembler code for function _start:\r -+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r -+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r -+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand %rbx\r -+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand %r8w\r -+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand %r8d\r -+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand %r8\r -+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r -+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r -+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand %rbx\r -+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand %r8w\r -+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand %r8d\r -+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand %r8\r -+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps %xmm4,%ymm4\r -+\[^\r\n\]+:\tc4 42 7d 13 00\t\( \)?vcvtph2ps \\(%r8\\),%ymm8\r -+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps %xmm4,%xmm6\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%rcx\\),%xmm4\r -+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r -+\[^\r\n\]+:\tc4 43 7d 1d 00 02\t\( \)?vcvtps2ph \\\$0x2,%ymm8,\\(%r8\\)\r -+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r -+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%rcx\\)\r -+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps %xmm4,%ymm4\r -+\[^\r\n\]+:\tc4 42 7d 13 00\t\( \)?vcvtph2ps \\(%r8\\),%ymm8\r -+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps \\(%rcx\\),%ymm4\r -+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps %xmm4,%xmm6\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%rcx\\),%xmm4\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%rcx\\),%xmm4\r -+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r -+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%rcx\\)\r -+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%rcx\\)\r -+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r -+\[^\r\n\]+:\tc4 43 79 1d 00 02\t\( \)?vcvtps2ph \\\$0x2,%xmm8,\\(%r8\\)\r -+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%rcx\\)\r -+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r -+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase %rbx\r -+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase %r8d\r -+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase %r8\r -+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r -+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase %rbx\r -+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase %r8d\r -+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase %r8\r -+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r -+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase %rbx\r -+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase %r8d\r -+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase %r8\r -+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r -+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase %rbx\r -+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase %r8d\r -+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase %r8\r -+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r -+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase %rbx\r -+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase %r8d\r -+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase %r8\r -+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r -+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase %rbx\r -+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase %r8d\r -+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase %r8\r -+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r -+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase %rbx\r -+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase %r8d\r -+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase %r8\r -+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r -+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase %rbx\r -+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase %r8d\r -+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase %r8\r -+End of assembler dump\\." "att" -+ -+gdb_test_no_output "set disassembly-flavor intel" -+# gas/i386/x86-64-rdrnd-intel.d -+# gas/i386/x86-64-f16c-intel.d -+# gas/i386/x86-64-fsgs-intel.d -+gdb_test "disassemble/r _start" "\r -+Dump of assembler code for function _start:\r -+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r -+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r -+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand rbx\r -+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand r8w\r -+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand r8d\r -+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand r8\r -+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r -+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r -+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand rbx\r -+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand r8w\r -+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand r8d\r -+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand r8\r -+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r -+\[^\r\n\]+:\tc4 42 7d 13 00\t\( \)?vcvtph2ps ymm8,XMMWORD PTR \\\[r8\\\]\r -+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r -+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r -+\[^\r\n\]+:\tc4 43 7d 1d 00 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[r8\\\],ymm8,0x2\r -+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r -+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[rcx\\\],xmm4,0x2\r -+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r -+\[^\r\n\]+:\tc4 42 7d 13 00\t\( \)?vcvtph2ps ymm8,XMMWORD PTR \\\[r8\\\]\r -+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[rcx\\\]\r -+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r -+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r -+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[rcx\\\],ymm4,0x2\r -+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[rcx\\\],ymm4,0x2\r -+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r -+\[^\r\n\]+:\tc4 43 79 1d 00 02\t\( \)?vcvtps2ph QWORD PTR \\\[r8\\\],xmm8,0x2\r -+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[rcx\\\],xmm4,0x2\r -+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r -+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase rbx\r -+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase r8d\r -+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase r8\r -+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r -+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase rbx\r -+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase r8d\r -+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase r8\r -+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r -+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase rbx\r -+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase r8d\r -+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase r8\r -+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r -+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase rbx\r -+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase r8d\r -+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase r8\r -+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r -+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase rbx\r -+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase r8d\r -+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase r8\r -+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r -+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase rbx\r -+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase r8d\r -+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase r8\r -+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r -+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase rbx\r -+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase r8d\r -+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase r8\r -+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r -+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase rbx\r -+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase r8d\r -+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase r8\r -+End of assembler dump\\." "intel" -diff --git a/gdb/testsuite/gdb.arch/i386-ivy-bridge.S b/gdb/testsuite/gdb.arch/i386-ivy-bridge.S -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/i386-ivy-bridge.S -@@ -0,0 +1,66 @@ -+/* 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 . -+ -+ This file is part of the gdb testsuite. */ -+ -+ .globl _start -+_start: .text -+ -+/* gas/i386/rdrnd.s */ -+ .att_syntax prefix -+ rdrand %bx -+ rdrand %ebx -+ -+ .intel_syntax noprefix -+ rdrand bx -+ rdrand ebx -+ -+/* gas/i386/f16c.s */ -+ .att_syntax prefix -+ vcvtph2ps %xmm4,%ymm4 -+ vcvtph2ps (%ecx),%ymm4 -+ vcvtph2ps %xmm4,%xmm6 -+ vcvtph2ps (%ecx),%xmm4 -+ vcvtps2ph $0x2,%ymm4,%xmm4 -+ vcvtps2ph $0x2,%ymm4,(%ecx) -+ vcvtps2ph $0x2,%xmm4,%xmm4 -+ vcvtps2ph $0x2,%xmm4,(%ecx) -+ -+ .intel_syntax noprefix -+ vcvtph2ps ymm4,xmm4 -+ vcvtph2ps ymm4,XMMWORD PTR [ecx] -+ vcvtph2ps ymm4,[ecx] -+ vcvtph2ps xmm6,xmm4 -+ vcvtph2ps xmm4,QWORD PTR [ecx] -+ vcvtph2ps xmm4,[ecx] -+ vcvtps2ph xmm4,ymm4,0x2 -+ vcvtps2ph XMMWORD PTR [ecx],ymm4,0x2 -+ vcvtps2ph [ecx],ymm4,0x2 -+ vcvtps2ph xmm4,xmm4,0x2 -+ vcvtps2ph QWORD PTR [ecx],xmm4,0x2 -+ vcvtps2ph [ecx],xmm4,0x2 -+ -+/* gas/i386/fsgs.s */ -+ .att_syntax prefix -+ rdfsbase %ebx -+ rdgsbase %ebx -+ wrfsbase %ebx -+ wrgsbase %ebx -+ -+ .intel_syntax noprefix -+ rdfsbase ebx -+ rdgsbase ebx -+ wrfsbase ebx -+ wrgsbase ebx -diff --git a/gdb/testsuite/gdb.arch/i386-ivy-bridge.exp b/gdb/testsuite/gdb.arch/i386-ivy-bridge.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/i386-ivy-bridge.exp -@@ -0,0 +1,106 @@ -+# 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 . -+ -+if {![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]} then { -+ return -+} -+ -+set testfile i386-ivy-bridge -+set test compilation -+if [prepare_for_testing ${testfile}.exp ${testfile}.x ${testfile}.S [list debug "additional_flags=-m32 -nostdlib"]] { -+ fail $test -+ return -1 -+} -+pass $test -+ -+gdb_test_no_output "set disassembly-flavor att" -+# gas/i386/rdrnd.d -+# gas/i386/f16c.d -+# gas/i386/fsgs.d -+gdb_test "disassemble/r _start" "\r -+Dump of assembler code for function _start:\r -+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r -+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r -+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r -+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r -+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps %xmm4,%ymm4\r -+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%ymm4\r -+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps %xmm4,%xmm6\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%xmm4\r -+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r -+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%ecx\\)\r -+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r -+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%ecx\\)\r -+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps %xmm4,%ymm4\r -+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%ymm4\r -+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%ymm4\r -+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps %xmm4,%xmm6\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%xmm4\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%xmm4\r -+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r -+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%ecx\\)\r -+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%ecx\\)\r -+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r -+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%ecx\\)\r -+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%ecx\\)\r -+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r -+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r -+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r -+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r -+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r -+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r -+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r -+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r -+End of assembler dump\\." "att" -+ -+gdb_test_no_output "set disassembly-flavor intel" -+# gas/i386/rdrnd-intel.d -+# gas/i386/f16c-intel.d -+# gas/i386/fsgs-intel.d -+gdb_test "disassemble/r _start" "\r -+Dump of assembler code for function _start:\r -+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r -+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r -+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r -+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r -+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r -+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r -+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r -+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r -+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r -+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r -+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r -+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r -+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r -+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r -+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r -+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r -+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r -+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r -+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r -+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r -+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r -+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r -+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r -+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r -+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r -+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r -+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r -+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r -+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r -+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r -+End of assembler dump\\." "intel" diff --git a/0052-gdb-runtest-pie-override.patch b/0052-gdb-runtest-pie-override.patch deleted file mode 100644 index 25c2bb864871408c9223224b8590384f9c4360d8..0000000000000000000000000000000000000000 --- a/0052-gdb-runtest-pie-override.patch +++ /dev/null @@ -1,49 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-runtest-pie-override.patch - -;; Hack for proper PIE run of the testsuite. -;;=fedoratest - -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. - -diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp ---- a/gdb/testsuite/lib/future.exp -+++ b/gdb/testsuite/lib/future.exp -@@ -197,6 +197,10 @@ proc gdb_default_target_compile_1 {source destfile type options} { - 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" - } -@@ -531,10 +535,6 @@ proc gdb_default_target_compile_1 {source destfile type options} { - } - } - -- if {[board_info $dest exists multilib_flags]} { -- append add_flags " [board_info $dest multilib_flags]" -- } -- - verbose "doing compile" - - set sources "" diff --git a/0054-gdb-rhel5.9-testcase-xlf-var-inside-mod.patch b/0054-gdb-rhel5.9-testcase-xlf-var-inside-mod.patch deleted file mode 100644 index b130d1f677eb03883ee33ba9af62842abfd486e2..0000000000000000000000000000000000000000 --- a/0054-gdb-rhel5.9-testcase-xlf-var-inside-mod.patch +++ /dev/null @@ -1,731 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch - -;; Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789). -;;=fedoratest - -diff --git a/gdb/testsuite/gdb.fortran/xlf-variable.S b/gdb/testsuite/gdb.fortran/xlf-variable.S -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/xlf-variable.S -@@ -0,0 +1,638 @@ -+/* Copyright (C) 2012 Free Software Foundation, Inc. -+ -+ This file is part of GDB. -+ -+ 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 . */ -+ -+/* This file has been generated from the file named `xlf-variable.f', which -+ should be present in this directory. The command used to generate this -+ file was: -+ -+ xlf -qnoopt -g9 -S xlf-variable.f -o xlf-variable.S -+ -+ After issuing this command, you must hand-edit this file and remove the -+ mentions for `_xlfExit', since it is only present in XLF-specific -+ libraries. You must also make sure to remove the file named `mod1.mod' -+ which will be created in the compilation directory. -+ -+ In order to generated this file, the following XLF package was used: -+ -+ xlf.14.1.0.0.linux.eval.tar.gz -+ -+ These instructions may be different for different versions of the XLF -+ compiler. */ -+ -+.set r0,0; .set SP,1; .set RTOC,2; .set r3,3; .set r4,4 -+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 -+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 -+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 -+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 -+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 -+.set r30,30; .set r31,31 -+.set fp0,0; .set fp1,1; .set fp2,2; .set fp3,3; .set fp4,4 -+.set fp5,5; .set fp6,6; .set fp7,7; .set fp8,8; .set fp9,9 -+.set fp10,10; .set fp11,11; .set fp12,12; .set fp13,13; .set fp14,14 -+.set fp15,15; .set fp16,16; .set fp17,17; .set fp18,18; .set fp19,19 -+.set fp20,20; .set fp21,21; .set fp22,22; .set fp23,23; .set fp24,24 -+.set fp25,25; .set fp26,26; .set fp27,27; .set fp28,28; .set fp29,29 -+.set fp30,30; .set fp31,31 -+.set v0,0; .set v1,1; .set v2,2; .set v3,3; .set v4,4 -+.set v5,5; .set v6,6; .set v7,7; .set v8,8; .set v9,9 -+.set v10,10; .set v11,11; .set v12,12; .set v13,13; .set v14,14 -+.set v15,15; .set v16,16; .set v17,17; .set v18,18; .set v19,19 -+.set v20,20; .set v21,21; .set v22,22; .set v23,23; .set v24,24 -+.set v25,25; .set v26,26; .set v27,27; .set v28,28; .set v29,29 -+.set v30,30; .set v31,31 -+.set q0,0; .set q1,1; .set q2,2; .set q3,3; .set q4,4 -+.set q5,5; .set q6,6; .set q7,7; .set q8,8; .set q9,9 -+.set q10,10; .set q11,11; .set q12,12; .set q13,13; .set q14,14 -+.set q15,15; .set q16,16; .set q17,17; .set q18,18; .set q19,19 -+.set q20,20; .set q21,21; .set q22,22; .set q23,23; .set q24,24 -+.set q25,25; .set q26,26; .set q27,27; .set q28,28; .set q29,29 -+.set q30,30; .set q31,31 -+.set MQ,0; .set XER,1; .set FROM_RTCU,4; .set FROM_RTCL,5; .set FROM_DEC,6 -+.set LR,8; .set CTR,9; .set TID,17; .set DSISR,18; .set DAR,19; .set TO_RTCU,20 -+.set TO_RTCL,21; .set TO_DEC,22; .set SDR_0,24; .set SDR_1,25; .set SRR_0,26 -+.set SRR_1,27 -+.set BO_dCTR_NZERO_AND_NOT,0; .set BO_dCTR_NZERO_AND_NOT_1,1 -+.set BO_dCTR_ZERO_AND_NOT,2; .set BO_dCTR_ZERO_AND_NOT_1,3 -+.set BO_IF_NOT,4; .set BO_IF_NOT_1,5; .set BO_IF_NOT_2,6 -+.set BO_IF_NOT_3,7; .set BO_dCTR_NZERO_AND,8; .set BO_dCTR_NZERO_AND_1,9 -+.set BO_dCTR_ZERO_AND,10; .set BO_dCTR_ZERO_AND_1,11; .set BO_IF,12 -+.set BO_IF_1,13; .set BO_IF_2,14; .set BO_IF_3,15; .set BO_dCTR_NZERO,16 -+.set BO_dCTR_NZERO_1,17; .set BO_dCTR_ZERO,18; .set BO_dCTR_ZERO_1,19 -+.set BO_ALWAYS,20; .set BO_ALWAYS_1,21; .set BO_ALWAYS_2,22 -+.set BO_ALWAYS_3,23; .set BO_dCTR_NZERO_8,24; .set BO_dCTR_NZERO_9,25 -+.set BO_dCTR_ZERO_8,26; .set BO_dCTR_ZERO_9,27; .set BO_ALWAYS_8,28 -+.set BO_ALWAYS_9,29; .set BO_ALWAYS_10,30; .set BO_ALWAYS_11,31 -+.set CR0_LT,0; .set CR0_GT,1; .set CR0_EQ,2; .set CR0_SO,3 -+.set CR1_FX,4; .set CR1_FEX,5; .set CR1_VX,6; .set CR1_OX,7 -+.set CR2_LT,8; .set CR2_GT,9; .set CR2_EQ,10; .set CR2_SO,11 -+.set CR3_LT,12; .set CR3_GT,13; .set CR3_EQ,14; .set CR3_SO,15 -+.set CR4_LT,16; .set CR4_GT,17; .set CR4_EQ,18; .set CR4_SO,19 -+.set CR5_LT,20; .set CR5_GT,21; .set CR5_EQ,22; .set CR5_SO,23 -+.set CR6_LT,24; .set CR6_GT,25; .set CR6_EQ,26; .set CR6_SO,27 -+.set CR7_LT,28; .set CR7_GT,29; .set CR7_EQ,30; .set CR7_SO,31 -+.set TO_LT,16; .set TO_GT,8; .set TO_EQ,4; .set TO_LLT,2; .set TO_LGT,1 -+ -+ .file "xlf-variable.f" -+ .globl __mod1_NMOD_____mod1 -+ .type __mod1_NMOD_____mod1,@function -+ .size __mod1_NMOD_____mod1,32 -+ .globl main -+ .type main,@function -+ .size main,68 -+ .globl __mod1_NMOD_sub1 -+ .type __mod1_NMOD_sub1,@function -+ .size __mod1_NMOD_sub1,136 -+ .globl _main -+ .type _main,@function -+ .size _main,68 -+ -+ .section ".text" -+ .align 7 -+.LC.text: -+__mod1_NMOD_____mod1: -+ stwu SP,-32(SP) -+ stw r31,28(SP) -+ or r31,SP,SP -+ b $+0x4 -+ addi r11,r31,32 -+ lwz r31,-4(r11) -+ or SP,r11,r11 -+ bclr BO_ALWAYS,CR0_LT -+.LC.text32: -+ -+__mod1_NMOD_sub1: -+ stwu SP,-32(SP) -+ stw r31,28(SP) -+ stw r30,24(SP) -+ or r31,SP,SP -+ addis r30,r0,.const_dr@ha -+ addi r30,r30,.const_dr@l -+ addis r3,r0,__N_mod1@ha -+ addi r3,r3,__N_mod1@l -+ addi r0,r0,1 -+ stb r0,4(r3) -+ addi r4,r0,14 -+ stb r4,5(r3) -+ stb r0,7(r3) -+ addis r5,r0,__N__mod1@ha -+ addi r5,r5,__N__mod1@l -+ stw r5,0(r3) -+ lbz r5,6(r3) -+ rlwinm r5,r5,0,25,25 -+ ori r5,r5,0x0040 -+ stb r5,6(r3) -+ lwz r5,0(r3) -+ lfs fp0,0(r30) -+ stfs fp0,0(r5) -+ stb r0,4(r3) -+ stb r4,5(r3) -+ addi r4,r0,0 -+ stb r4,6(r3) -+ stb r0,7(r3) -+ b $+0x4 -+ addi r11,r31,32 -+ lwz r30,-8(r11) -+ lwz r31,-4(r11) -+ or SP,r11,r11 -+ bclr BO_ALWAYS,CR0_LT -+.LC.text168: -+ .long 0 -+ .skip 0x54 -+.LC.text256: -+ -+main: -+_main: -+ mfspr r0,LR -+ stwu SP,-32(SP) -+ stw r31,28(SP) -+ stw r0,36(SP) -+ or r31,SP,SP -+ bl __mod1_NMOD_sub1 -+ addi r3,r0,0 -+.LC.text288: -+ -+ tw TO_EQ,r14,r14 -+ addi r3,r0,0 -+ b $+0x4 -+ addi r11,r31,32 -+ lwz r31,-4(r11) -+ lwz r0,4(r11) -+ mtspr LR,r0 -+ or SP,r11,r11 -+ bclr BO_ALWAYS,CR0_LT -+.LC.text324: -+ -+ -+ .section ".rodata","a" -+ .align 2 -+.LC.rodata: -+ .type .const_dr,@object -+ .size .const_dr,4 -+.const_dr: -+ .long 0x40400000 -+ -+ .section ".eh_frame","wa" -+ .align 2 -+.LC.eh_frame: -+ .long 0x0000000c -+ .long 0x00000000 -+ .long 0x0100047c -+ .long 0x410c0100 -+ .long 0x0000001c -+ .long 0x00000014 -+ .long .LC.text -+ .long 0x00000020 -+ .long 0x410e2041 -+ .long 0x9f01410d -+ .long 0x1f410a42 -+ .long 0xdf420b00 -+ .long 0x00000020 -+ .long 0x00000034 -+ .long .LC.text32 -+ .long 0x00000088 -+ .long 0x410e2041 -+ .long 0x9f01419e -+ .long 0x02410d1f -+ .long 0x590a42de -+ .long 0x41df420b -+ .long 0x0000000c -+ .long 0x00000000 -+ .long 0x0100047c -+ .long 0x410c0100 -+ .long 0x00000020 -+ .long 0x00000014 -+ .long .LC.text256 -+ .long 0x00000044 -+ .long 0x420e2041 -+ .long 0x9f014111 -+ .long 0x417f410d -+ .long 0x1f460a42 -+ .long 0xdf440b00 -+ -+ .section ".data","wa" -+ .align 4 -+.LC.data: -+ .globl __N_mod1 -+ .type __N_mod1,@object -+ .size __N_mod1,8 -+__N_mod1: -+ .long 0x00000000 -+ .long 0x01000001 -+ -+ .section ".except.1","wa" -+ .align 1 -+.LC.except.1: -+ .long .LC.text288 -+ .byte 0x01 -+ .byte 0x09 -+ -+ .ident "Fri Jun 15 16:35:45 2012 .IBM XL Fortran for Linux, V14.1 (5765-J05, 5725-C75) Version 14.01.0000.0000.Fri Jun 15 16:35:45 2012 .IBM XL Fortran for Linux, V14.1 (5765-J05, 5725-C75) Version 14.01.0000.0000." -+ -+ .section ".debug_aranges" -+ .align 0 -+.LC.debug_aranges: -+ .long 0x0000001c -+ .byte 0x00 -+ .byte 0x02 -+ .long .LC.debug_info -+ .long 0x04000000 -+ .byte 0x00 -+ .byte 0x00 -+ .long .LC.text -+ .long 0x000000a8 -+ .long 0x00000000 -+ .long 0x00000000 -+ .long 0x0000001c -+ .byte 0x00 -+ .byte 0x02 -+ .long .LC.debug_info273 -+ .long 0x04000000 -+ .byte 0x00 -+ .byte 0x00 -+ .long .LC.text256 -+ .long 0x00000044 -+ .long 0x00000000 -+ .long 0x00000000 -+ -+ .section ".debug_pubnames" -+ .align 0 -+.LC.debug_pubnames: -+ .long 0x0000002f -+ .byte 0x00 -+ .byte 0x02 -+ .long .LC.debug_info -+ .long 0x00000111 -+ .long 0x000000dc -+ .long 0x79000000 -+ .long 0x00ec7a00 -+ .long 0x000000fc -+ .long 0x5f5f6d6f -+ .long 0x64315f4e -+ .long 0x4d4f445f -+ .long 0x73756231 -+ .long 0x00000000 -+ .long 0x00000000 -+ .byte 0x18 -+ .byte 0x00 -+ .byte 0x02 -+ .long .LC.debug_info273 -+ .long 0x00000127 -+ .long 0x0000010f -+ .long 0x5f6d6169 -+ .long 0x6e000000 -+ .byte 0x00 -+ .byte 0x00 -+ -+ .section ".debug_info" -+ .align 0 -+.LC.debug_info: -+ .long 0x0000010d -+ .byte 0x00 -+ .byte 0x02 -+ .long .LC.debug_abbrev -+ .long 0x0401786c -+ .long 0x662d7661 -+ .long 0x72696162 -+ .long 0x6c652e66 -+ .byte 0x00 -+ .long .LC.debug_line -+ .long .LC.text -+ .long .LC.text168 -+ .long 0x082f726f -+ .long 0x6f742f73 -+ .long 0x65726769 -+ .long 0x6f646a2f -+ .long 0x6764622d -+ .long 0x372e302e -+ .long 0x312d3432 -+ .long 0x2e656c35 -+ .long 0x2f676462 -+ .long 0x2d372e30 -+ .long 0x2e312f67 -+ .long 0x64622f74 -+ .long 0x65737473 -+ .long 0x75697465 -+ .long 0x2f676462 -+ .long 0x2e666f72 -+ .long 0x7472616e -+ .long 0x0049424d -+ .long 0x20584c20 -+ .long 0x466f7274 -+ .long 0x72616e20 -+ .long 0x666f7220 -+ .long 0x4c696e75 -+ .long 0x782c2056 -+ .long 0x31342e31 -+ .long 0x20283537 -+ .long 0x36352d4a -+ .long 0x30352c20 -+ .long 0x35373235 -+ .long 0x2d433735 -+ .long 0x29205665 -+ .long 0x7273696f -+ .long 0x6e203134 -+ .long 0x2e30312e -+ .long 0x30303030 -+ .long 0x2e303030 -+ .long 0x30000249 -+ .long 0x4e544547 -+ .long 0x45520004 -+ .long 0x05030005 -+ .long 0x02524541 -+ .long 0x4c000404 -+ .long 0x04050000 -+ .long 0x0000c706 -+ .long 0x6d6f6431 -+ .long 0x00070503 -+ .long __N_mod1 -+ .long 0x79000100 -+ .long 0x01000000 -+ .long 0xd0070503 -+ .long __N__mod1 -+ .long 0x7a000100 -+ .long 0x01000000 -+ .long 0xc7087375 -+ .byte 0x62 -+ .byte 0x31 -+ .byte 0x00 -+ .long .LC.text32 -+ .long .LC.text168 -+ .long 0x01180101 -+ .byte 0x6f -+ .byte 0x00 -+ .byte 0x00 -+.LC.debug_info273: -+ .long 0x00000123 -+ .byte 0x00 -+ .byte 0x02 -+ .long .LC.debug_abbrev97 -+ .long 0x0401786c -+ .long 0x662d7661 -+ .long 0x72696162 -+ .long 0x6c652e66 -+ .byte 0x00 -+ .long .LC.debug_line98 -+ .long .LC.text256 -+ .long .LC.text324 -+ .long 0x082f726f -+ .long 0x6f742f73 -+ .long 0x65726769 -+ .long 0x6f646a2f -+ .long 0x6764622d -+ .long 0x372e302e -+ .long 0x312d3432 -+ .long 0x2e656c35 -+ .long 0x2f676462 -+ .long 0x2d372e30 -+ .long 0x2e312f67 -+ .long 0x64622f74 -+ .long 0x65737473 -+ .long 0x75697465 -+ .long 0x2f676462 -+ .long 0x2e666f72 -+ .long 0x7472616e -+ .long 0x0049424d -+ .long 0x20584c20 -+ .long 0x466f7274 -+ .long 0x72616e20 -+ .long 0x666f7220 -+ .long 0x4c696e75 -+ .long 0x782c2056 -+ .long 0x31342e31 -+ .long 0x20283537 -+ .long 0x36352d4a -+ .long 0x30352c20 -+ .long 0x35373235 -+ .long 0x2d433735 -+ .long 0x29205665 -+ .long 0x7273696f -+ .long 0x6e203134 -+ .long 0x2e30312e -+ .long 0x30303030 -+ .long 0x2e303030 -+ .long 0x30000249 -+ .long 0x4e544547 -+ .long 0x45520004 -+ .long 0x05030005 -+ .long 0x02524541 -+ .long 0x4c000404 -+ .long 0x04000000 -+ .long 0xb9050000 -+ .long 0x0000c706 -+ .long 0x000000f4 -+ .long 0x26264e26 -+ .long 0x6d6f6431 -+ .long 0x00080779 -+ .long 0x00022300 -+ .long 0x000000d4 -+ .long 0x00060000 -+ .long 0x010f2626 -+ .long 0x4e26266d -+ .long 0x6f643100 -+ .long 0x04077a00 -+ .long 0x02230000 -+ .long 0x0000c700 -+ .long 0x085f6d61 -+ .byte 0x69 -+ .byte 0x6e -+ .byte 0x00 -+ .long .LC.text256 -+ .long .LC.text324 -+ .long 0x0201016f -+ .long 0x000000b9 -+ .byte 0x00 -+ -+ .section ".debug_abbrev" -+ .align 0 -+.LC.debug_abbrev: -+ .long 0x01110103 -+ .long 0x08100611 -+ .long 0x01120113 -+ .long 0x0b1b0825 -+ .long 0x08000002 -+ .long 0x24000308 -+ .long 0x0b0b3e0b -+ .long 0x00000324 -+ .long 0x000b0b3e -+ .long 0x0b000004 -+ .long 0x15000000 -+ .long 0x050f0033 -+ .long 0x0b491300 -+ .long 0x00061e01 -+ .long 0x03080000 -+ .long 0x07340002 -+ .long 0x0a03083a -+ .long 0x0b3b0b3f -+ .long 0x0c491300 -+ .long 0x00082e00 -+ .long 0x03081101 -+ .long 0x12013a0b -+ .long 0x3b0b3f0c -+ .long 0x400a0000 -+ .byte 0x00 -+.LC.debug_abbrev97: -+ .long 0x01110103 -+ .long 0x08100611 -+ .long 0x01120113 -+ .long 0x0b1b0825 -+ .long 0x08000002 -+ .long 0x24000308 -+ .long 0x0b0b3e0b -+ .long 0x00000324 -+ .long 0x000b0b3e -+ .long 0x0b000004 -+ .long 0x15004913 -+ .long 0x0000050f -+ .long 0x00330b49 -+ .long 0x13000006 -+ .long 0x13010113 -+ .long 0x03080b0b -+ .long 0x0000070d -+ .long 0x00030838 -+ .long 0x0a491300 -+ .long 0x00082e00 -+ .long 0x03081101 -+ .long 0x1201360b -+ .long 0x3f0c400a -+ .long 0x49130000 -+ .byte 0x00 -+ -+ .section ".debug_line" -+ .align 0 -+.LC.debug_line: -+ .long 0x0000005e -+ .long 0x00020000 -+ .long 0x00220101 -+ .long 0x9cdc0a00 -+ .long 0x01010101 -+ .long 0x00000001 -+ .long 0x00786c66 -+ .long 0x2d766172 -+ .long 0x6961626c -+ .long 0x652e6600 -+ .long 0x00000000 -+ .long 0x04010005 -+ .byte 0x02 -+ .long .LC.text -+ .long 0x03130109 -+ .long 0x000c0309 -+ .long 0x01090014 -+ .long 0x037b0109 -+ .long 0x00180301 -+ .long 0x01090038 -+ .long 0x03010109 -+ .long 0x000c0301 -+ .long 0x01090014 -+ .long 0x03010109 -+ .long 0x00180001 -+ .byte 0x01 -+.LC.debug_line98: -+ .long 0x00000046 -+ .long 0x00020000 -+ .long 0x00220101 -+ .long 0x9cdc0a00 -+ .long 0x01010101 -+ .long 0x00000001 -+ .long 0x00786c66 -+ .long 0x2d766172 -+ .long 0x6961626c -+ .long 0x652e6600 -+ .long 0x00000000 -+ .long 0x04010005 -+ .byte 0x02 -+ .long .LC.text256 -+ .long 0x031f0109 -+ .long 0x00140300 -+ .long 0x01090004 -+ .long 0x03010109 -+ .long 0x002c0001 -+ .byte 0x01 -+ -+ .section ".debug_frame" -+ .align 0 -+.LC.debug_frame: -+ .long 0x0000000c -+ .long 0xffffffff -+ .long 0x0100047c -+ .long 0x410c0100 -+ .long 0x0000001c -+ .long .LC.debug_frame -+ .long .LC.text -+ .long 0x00000020 -+ .long 0x410e2041 -+ .long 0x9f01410d -+ .long 0x1f410a42 -+ .long 0xdf420b00 -+ .long 0x00000020 -+ .long .LC.debug_frame -+ .long .LC.text32 -+ .long 0x00000088 -+ .long 0x410e2041 -+ .long 0x9f01419e -+ .long 0x02410d1f -+ .long 0x590a42de -+ .long 0x41df420b -+.LC.debug_frame84: -+ .long 0x0000000c -+ .long 0xffffffff -+ .long 0x0100047c -+ .long 0x410c0100 -+ .long 0x00000020 -+ .long .LC.debug_frame84 -+ .long .LC.text256 -+ .long 0x00000044 -+ .long 0x420e2041 -+ .long 0x9f014111 -+ .long 0x417f410d -+ .long 0x1f460a42 -+ .long 0xdf440b00 -+ -+ .section ".debug_pubtypes" -+ .align 0 -+.LC.debug_pubtypes: -+ .long 0x00000023 -+ .byte 0x00 -+ .byte 0x02 -+ .long .LC.debug_info -+ .long 0x00000111 -+ .long 0x000000b9 -+ .long 0x494e5445 -+ .long 0x47455200 -+ .long 0x000000c7 -+ .long 0x5245414c -+ .long 0x00000000 -+ .long 0x00000000 -+ .byte 0x3e -+ .byte 0x00 -+ .byte 0x02 -+ .long .LC.debug_info273 -+ .long 0x00000127 -+ .long 0x000000b9 -+ .long 0x494e5445 -+ .long 0x47455200 -+ .long 0x000000c7 -+ .long 0x5245414c -+ .long 0x00000000 -+ .long 0xda26264e -+ .long 0x266d6f64 -+ .long 0x31000000 -+ .long 0x00f42626 -+ .long 0x4e26266d -+ .long 0x6f643100 -+ .long 0x00000000 -+ -+ .comm __N__mod1,4,16 -diff --git a/gdb/testsuite/gdb.fortran/xlf-variable.exp b/gdb/testsuite/gdb.fortran/xlf-variable.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/xlf-variable.exp -@@ -0,0 +1,37 @@ -+# Copyright 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 . -+ -+# This test can only be run on PPC64 machines. -+ -+if { ![istarget powerpc64-*] || ![is_ilp32_target] } { -+ return -1 -+} -+ -+set testfile "xlf-variable" -+set srcfile ${testfile}.S -+ -+if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { -+ return -1 -+} -+ -+if { ![runto_main] } { -+ return -1 -+} -+ -+gdb_test "step" ".*y => z.*" "y => z" -+gdb_test "step" ".*y = 3\.0.*" "y = 3.0" -+gdb_test "step" ".*nullify \\(y\\).*" "nullify (y)" -+gdb_test "print z" "= 3" "z = 3" -+gdb_test "ptype z" "= REAL" "z is REAL" -diff --git a/gdb/testsuite/gdb.fortran/xlf-variable.f b/gdb/testsuite/gdb.fortran/xlf-variable.f -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/xlf-variable.f -@@ -0,0 +1,33 @@ -+c Copyright 2012 Free Software Foundation, Inc. -+c -+c This program is free software; you can redistribute it and/or modify -+c it under the terms of the GNU General Public License as published by -+c the Free Software Foundation; either version 3 of the License, or -+c (at your option) any later version. -+c -+c This program is distributed in the hope that it will be useful, -+c but WITHOUT ANY WARRANTY; without even the implied warranty of -+c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+c GNU General Public License for more details. -+c -+c You should have received a copy of the GNU General Public License -+c along with this program. If not, see . -+ -+c This file is the Fortran source file for xlf-variable.f. -+c It was used to generate the assembly output called xlf-variable.S, -+c which was generated using IBM's XLF compiler. -+ -+ module mod1 -+ real, pointer :: y -+ real, target :: z -+ contains -+ subroutine sub1 -+ y => z -+ y = 3.0 -+ nullify (y) -+ end subroutine -+ end module -+ -+ use mod1 -+ call sub1 -+ end diff --git a/0059-gdb-fortran-frame-string.patch b/0059-gdb-fortran-frame-string.patch deleted file mode 100644 index 4bdd0593fee88636e9c521e54892427d22937536..0000000000000000000000000000000000000000 --- a/0059-gdb-fortran-frame-string.patch +++ /dev/null @@ -1,104 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-fortran-frame-string.patch - -;; Display Fortran strings in backtraces. -;;=fedoratest - -http://sourceware.org/ml/gdb-patches/2014-07/msg00709.html - -Hi, - -for Fortran it fixes displaying normal strings also in frames/backtraces: - -(gdb) frame --> - -The patch is simple and I do not see why it should not be this way. - -For C/C++ TYPE_CODE_STRING is not used. I am not aware of Pascal but that -language is currently not really much supported in GDB anyway. - -This was a part of my archer/jankratochvil/vla branch but it is not a part of -the Intel VLA patchset as it in fact is completely unrelated to "VLA". - -No regressions on {x86_64,x86_64-m32,i686}-fedora22pre-linux-gnu. - -Thanks, -Jan - -diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.exp b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp -@@ -0,0 +1,36 @@ -+# Copyright 2014 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. -+ -+standard_testfile .f90 -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } { -+ return -1 -+} -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+ -+gdb_breakpoint [gdb_get_line_number "s = s"] -+gdb_continue_to_breakpoint "s = s" -+ -+gdb_test "ptype s" {type = character\*3} -+gdb_test "p s" " = 'foo'" -+ -+# Fix rejected upstream: -+# https://sourceware.org/ml/gdb-patches/2014-07/msg00768.html -+setup_kfail "rejected" *-*-* -+gdb_test "frame" { \(s='foo', .*} -diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.f90 b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90 -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90 -@@ -0,0 +1,28 @@ -+! Copyright 2014 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. -+! -+! Ihis file is the Fortran source file for dynamic.exp. -+! Original file written by Jakub Jelinek . -+! Modified for the GDB testcase by Jan Kratochvil . -+ -+ subroutine f(s) -+ character*3 s -+ s = s -+ end -+ -+ program main -+ call f ('foo') -+ end diff --git a/0063-gdb-rhbz1350436-type-printers-error.patch b/0063-gdb-rhbz1350436-type-printers-error.patch deleted file mode 100644 index 33223276cebd9b84af21e5488c451c58d00d49e0..0000000000000000000000000000000000000000 --- a/0063-gdb-rhbz1350436-type-printers-error.patch +++ /dev/null @@ -1,83 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-rhbz1350436-type-printers-error.patch - -;; Test 'info type-printers' Python error (RH BZ 1350436). -;;=fedoratest - -Typo in Python support breaks info type-printers command -https://bugzilla.redhat.com/show_bug.cgi?id=1350436 - -[testsuite patch] PR python/17136: 'info type-printers' causes an exception when there are per-objfile printers -https://sourceware.org/ml/gdb-patches/2016-06/msg00455.html - -diff --git a/gdb/testsuite/gdb.python/py-typeprint.cc b/gdb/testsuite/gdb.python/py-typeprint.cc ---- a/gdb/testsuite/gdb.python/py-typeprint.cc -+++ b/gdb/testsuite/gdb.python/py-typeprint.cc -@@ -31,6 +31,12 @@ templ s; - - basic_string bs; - -+class Other -+{ -+}; -+ -+Other ovar; -+ - int main() - { - return 0; -diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp ---- a/gdb/testsuite/gdb.python/py-typeprint.exp -+++ b/gdb/testsuite/gdb.python/py-typeprint.exp -@@ -50,3 +50,7 @@ gdb_test_no_output "enable type-printer string" - gdb_test "whatis bs" "string" "whatis with enabled printer" - - gdb_test "whatis s" "templ" -+ -+gdb_test "info type-printers" "Type printers for \[^\r\n\]*/py-typeprint:\r\n *other\r\n.*" \ -+ "info type-printers for other" -+gdb_test "whatis ovar" "type = Another" -diff --git a/gdb/testsuite/gdb.python/py-typeprint.py b/gdb/testsuite/gdb.python/py-typeprint.py ---- a/gdb/testsuite/gdb.python/py-typeprint.py -+++ b/gdb/testsuite/gdb.python/py-typeprint.py -@@ -15,8 +15,7 @@ - - import gdb - -- --class Recognizer(object): -+class StringRecognizer(object): - def __init__(self): - self.enabled = True - -@@ -32,7 +31,27 @@ class StringTypePrinter(object): - self.enabled = True - - def instantiate(self): -- return Recognizer() -+ return StringRecognizer() - - - gdb.type_printers.append(StringTypePrinter()) -+ -+class OtherRecognizer(object): -+ def __init__(self): -+ self.enabled = True -+ -+ def recognize(self, type_obj): -+ if type_obj.tag == 'Other': -+ return 'Another' -+ return None -+ -+class OtherTypePrinter(object): -+ def __init__(self): -+ self.name = 'other' -+ self.enabled = True -+ -+ def instantiate(self): -+ return OtherRecognizer() -+ -+import gdb.types -+gdb.types.register_type_printer(gdb.objfiles()[0], OtherTypePrinter()) diff --git a/0066-gdb-opcodes-clflushopt-test.patch b/0066-gdb-opcodes-clflushopt-test.patch deleted file mode 100644 index f95999e9cfcba50d9266d42bef5edece0a076348..0000000000000000000000000000000000000000 --- a/0066-gdb-opcodes-clflushopt-test.patch +++ /dev/null @@ -1,62 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-opcodes-clflushopt-test.patch - -;; Test clflushopt instruction decode (for RH BZ 1262471). -;;=fedoratest - -diff --git a/gdb/testsuite/gdb.arch/amd64-clflushopt.S b/gdb/testsuite/gdb.arch/amd64-clflushopt.S -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/amd64-clflushopt.S -@@ -0,0 +1,19 @@ -+/* Copyright 2016 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 . -+ -+ This file is part of the gdb testsuite. */ -+ -+_start: .globl _start -+ clflushopt (%edi) -diff --git a/gdb/testsuite/gdb.arch/amd64-clflushopt.exp b/gdb/testsuite/gdb.arch/amd64-clflushopt.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/amd64-clflushopt.exp -@@ -0,0 +1,25 @@ -+# Copyright 2016 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 . -+ -+if { ![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"] } then { -+ verbose "Skipping amd64 clflushopt test." -+ return -+} -+ -+if [prepare_for_testing amd64-clflushopt.exp amd64-clflushopt amd64-clflushopt.S [list debug "additional_flags=-nostdlib"]] { -+ return -1 -+} -+ -+gdb_test "disas _start" "Dump of assembler code for function _start:\r\n *0x\[0-9a-f\]+ <\[+\]0>:\tclflushopt \\(%edi\\)\r\nEnd of assembler dump\\." "clflushopt" diff --git a/0067-gdb-6.6-buildid-locate-rpm-scl.patch b/0067-gdb-6.6-buildid-locate-rpm-scl.patch deleted file mode 100644 index 7d4389a6ce167dd82c12f526dc9f3b1989bedfa1..0000000000000000000000000000000000000000 --- a/0067-gdb-6.6-buildid-locate-rpm-scl.patch +++ /dev/null @@ -1,42 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.6-buildid-locate-rpm-scl.patch - -;; [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585). -;;=push+jan - -warning: Skipping deprecated .gdb_index section -https://bugzilla.redhat.com/show_bug.cgi?id=953585 - -diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c ---- a/gdb/dwarf2/read.c -+++ b/gdb/dwarf2/read.c -@@ -2797,6 +2797,16 @@ read_gdb_index_from_buffer (const char *filename, - "set use-deprecated-index-sections on". */ - if (version < 6 && !deprecated_ok) - { -+#ifdef GDB_INDEX_VERIFY_VENDOR -+ extern int rpm_verify_vendor (const char *filename); -+ -+ /* Red Hat Developer Toolset exception. */ -+ if (rpm_verify_vendor (filename)) -+ {} -+ else -+ { -+ -+#endif - static int warning_printed = 0; - if (!warning_printed) - { -@@ -2808,6 +2818,10 @@ to use the section anyway."), - warning_printed = 1; - } - return 0; -+#ifdef GDB_INDEX_VERIFY_VENDOR -+ -+ } -+#endif - } - /* Version 7 indices generated by gold refer to the CU for a symbol instead - of the TU (for symbols coming from TUs), diff --git a/0070-gdb-rhbz1325795-framefilters-test.patch b/0070-gdb-rhbz1325795-framefilters-test.patch deleted file mode 100644 index cfe309d970889951a284734387c7a165a518ad1e..0000000000000000000000000000000000000000 --- a/0070-gdb-rhbz1325795-framefilters-test.patch +++ /dev/null @@ -1,176 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-rhbz1325795-framefilters-test.patch - -;; New test for Python "Cannot locate object file for block" (for RH BZ 1325795). -;;=fedoratest - -diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.c b/gdb/testsuite/gdb.python/py-framefilter-thread.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.c -@@ -0,0 +1,39 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2016 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 . */ -+ -+#include -+#include -+ -+static void * -+start (void *arg) -+{ -+ return arg; /* Backtrace end breakpoint */ -+} -+ -+int -+main (void) -+{ -+ pthread_t thread1; -+ int i; -+ -+ i = pthread_create (&thread1, NULL, start, NULL); -+ assert (i == 0); -+ i = pthread_join (thread1, NULL); -+ assert (i == 0); -+ -+ return 0; -+} -diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.exp b/gdb/testsuite/gdb.python/py-framefilter-thread.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.exp -@@ -0,0 +1,54 @@ -+# Copyright (C) 2016 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 . -+ -+load_lib gdb-python.exp -+ -+standard_testfile -+ -+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug pthreads}]} { -+ return -1 -+} -+ -+# Skip all tests if Python scripting is not enabled. -+if { [skip_python_tests] } { continue } -+ -+if ![runto_main] then { -+ return -+} -+gdb_test_no_output "set python print-stack full" \ -+ "Set python print-stack to full" -+ -+# Load global frame-filters -+set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py] -+gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \ -+ "Load python file" -+ -+gdb_breakpoint [gdb_get_line_number "Backtrace end breakpoint"] -+gdb_continue_to_breakpoint "Backtrace end breakpoint" -+ -+# #2 0x00007ffff75f228d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113^M -+gdb_test "bt no-filters" " in (\\.?_*clone|thread_start) \[^\r\n\]*" "bt no-filters" -+ -+# #2 0x00007ffff75f228d in 941595343737041 () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113^M -+# vs. -+# #2 0x00007ffff75f228d in 941595343737041Traceback (most recent call last): -+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 145, in frame_args -+# return self._base.frame_args() -+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 152, in frame_args -+# return args.fetch_frame_args() -+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 276, in fetch_frame_args -+# block = self.frame.block() -+# RuntimeError: Cannot locate object file for block. -+gdb_test "bt" " in \[0-9\]+ \[^\r\n\]*" "bt with filters" -diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.py b/gdb/testsuite/gdb.python/py-framefilter-thread.py -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.py -@@ -0,0 +1,60 @@ -+# Copyright (C) 2016 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 . -+ -+# This file is part of the GDB testsuite. It tests Python-based -+# frame-filters. -+ -+# This test is specifically crafted for RH BZ 1197665. -+ -+import gdb -+import itertools -+from gdb.FrameDecorator import FrameDecorator -+import copy -+ -+class Reverse_Function (FrameDecorator): -+ -+ def __init__(self, fobj): -+ super(Reverse_Function, self).__init__(fobj) -+ self.fobj = fobj -+ -+ def function (self): -+ # This function call should not fail. -+ gdb.target_charset () -+ -+ fname = str (self.fobj.function()) -+ if (fname == None or fname == ""): -+ return None -+ else: -+ fname = fname[::-1] -+ return fname -+ -+class FrameFilter (): -+ -+ def __init__ (self): -+ self.name = "Reverse" -+ self.priority = 100 -+ self.enabled = True -+ gdb.frame_filters [self.name] = self -+ -+ def filter (self, frame_iter): -+ # Python 3.x moved the itertools.imap functionality to map(), -+ # so check if it is available. -+ if hasattr(itertools, "imap"): -+ frame_iter = itertools.imap (Reverse_Function, frame_iter) -+ else: -+ frame_iter = map (Reverse_Function, frame_iter) -+ return frame_iter -+ -+FrameFilter() diff --git a/0072-gdb-libexec-add-index.patch b/0072-gdb-libexec-add-index.patch deleted file mode 100644 index 19f6b5489a21ab67a96acdbaf0b9b25326a5400c..0000000000000000000000000000000000000000 --- a/0072-gdb-libexec-add-index.patch +++ /dev/null @@ -1,37 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-libexec-add-index.patch - -;; Fix gdb-headless /usr/bin/ executables (BZ 1390251). -;; -;; Also, make /usr/bin/gdb.minimal be the default GDB used, if it's -;; present. For rationale, see: -;; -;; https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot -;;=fedora - -diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh ---- a/gdb/contrib/gdb-add-index.sh -+++ b/gdb/contrib/gdb-add-index.sh -@@ -22,6 +22,20 @@ GDB=${GDB:=gdb} - OBJCOPY=${OBJCOPY:=objcopy} - READELF=${READELF:=readelf} - -+GDB2=/usr/libexec/gdb -+if test -x $GDB2 && ! which $GDB &>/dev/null; then -+ GDB=$GDB2 -+fi -+ -+# We default to using /usr/bin/gdb.minimal if it's present. See -+# https://bugzilla.redhat.com/show_bug.cgi?id=1695015 and -+# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot for -+# explanations. -+GDB3=/usr/bin/gdb.minimal -+if test -x $GDB3; then -+ GDB=$GDB3 -+fi -+ - myname="${0##*/}" - - dwarf5="" diff --git a/0073-gdb-rhbz1398387-tab-crash-test.patch b/0073-gdb-rhbz1398387-tab-crash-test.patch deleted file mode 100644 index d0555c06111f28eda829324390223e871e874ec7..0000000000000000000000000000000000000000 --- a/0073-gdb-rhbz1398387-tab-crash-test.patch +++ /dev/null @@ -1,454 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-rhbz1398387-tab-crash-test.patch - -;; New testcase for: Fix -completion crash (Gary Benson, RH BZ 1398387). -;;=fedoratest - -diff --git a/gdb/testsuite/gdb.base/tab-crash.bz2.uu b/gdb/testsuite/gdb.base/tab-crash.bz2.uu -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/tab-crash.bz2.uu -@@ -0,0 +1,393 @@ -+begin 644 /tmp/libgcc_s-6.3.1-20161221.so.1-objcopyR.debug.bz2 -+M0EIH.3%!6293622@"44`>Q=_____________________________________ -+M________X#\<>SD#OM[7/HAP:R]\H#D"=!/";NP7!]OOJG>U[N;WW'KVV?9I -+M[[,[X.\/;%2U``[[NUM7P^T[U617V#12M]6M7W;M7CZU<=!]/8WL[LI=AZZ> -+MJ5XW;QP]W]DVHY@]/6RS= -+M8[:2][W/F01Z:GIID,IC$GHU-HR$:@T0F -+M@$PC($P"`$PF)D9-&IZFCT-4\$TRI^330-$TR>32>FFF@F!H0GJ>TD_*9!E, -+MR3Q3/11M-,%#T-3:-3T9(P-3T3TT@;1ZD>C1E,AM0:`@@303"`(Q*>FGHU)Z -+MGDFR8FFJ'L5/1C313R3U/*?JF]&35-J!Y3U/TI^1$\IZGFBGJ>HVF4>H])ZA -+MZC)ZFT)H>IH]0>H!H&RC0,F0T9E!HT-`TT`)-1(A$R&J?J3T80]313\F0GHC -+MU3:90\H]$]3:C93U-!LH\IIZ$]0R>:D>329J--`/4_5'I-`TT9#3U!ZC0>H# -+M0])H!H9!Z@#30VH#30-/4T'J`]09%$!4\)A3R,-1'J`S2#0--,$:/$C9-3TG -+MH:FR9-(T>D\4],HT'I`/4`>HVFIIZFR:FR:)Y,3*/3*;"FT:(VIYJC:FF)Z: -+MCTFAIZCTAH:#U!F*")1`0!`"9#4Q-,FT(R33R-4VFE/U&TU-3RGZ1FJ>&H]2 -+M;U38GJ-J3TQ0Q'DU-'J?JF]2&30-'J:>H,FC1HWJ@#RFC0!Z#2-/4T&&4T-/ -+M2:&(>D'J,5#"1JH5B["KJTH:1R2I95!0TXN8+PQ'&*+8%8JVQCC/1G1D0A-S -+M91MLJJLK];M*G>^]MGIW=W7E>KL -+M)MXKMO7VV\M77ANM3H=6LGI)+AR&CF'#<66)4&4S6:;*26:S5DUQGS$+>97< -+M!3.,U$LQELITU,X3Y5[GW>0?IM4(5>Z!^AE04E8=:H(X[7T$U.`@QRT\Z]_" -+M7?`4-8Q_UDP"AQ@$1,B`G(D*S"^7Z%ABZ-%T6MS+#&8M+G -+M)M>_Y9ME3-K"RMO>,UK^9/4HYU5!3:6'45^1-AA23JG7FH&=KT9ZK-!6>?\- -+M;_HD;$V3C,[X\-20B*R?`.(:CK$3A&J2!XYI6TW[U*HI*560[F!42LB.:FO9 -+MT2S-`KC"H/^S^JJFC(54?*/HIBKH,!73^2++62,G98Y/*,\,%R,Y08$R@$&L -+MC#"P#E53*YTZS&>L\]4*"<8&2^]*I?02,46;3.V(P+2P`3$>F+HNTY/(%Z<` -+MM.P&I]6,NED[M1J4`O?!J@8`&>?1 -+M%!8/]>.7UF-'?ZO,O??);\\L:3X7JN-O^ZWAPV:'ONI*N$I2REEE+$\Q47N6 -+M)NB0W\O.LZ)TMD[9VG1NS+?94@_.$$=!P2#U2(8;*%.99OOW:1@#`W]ZV:OR -+M1IWEL,R4\*2Y2^>SP[^QB -+M_,U-)GY3;9KT/P=Q.GX.7G"Q:>QK&9"$ -+M[#-J-&>2W>*T.XDRFC(,4I`"ED(D0(($(R0#&6;D6H(.:&R(R,:JBHZ!54G< -+M11T9V@K&&$`@8+T3IN#,:<5@P(RTBD1%(JP%55$2*#^!4E,%ER22`*-**JU6 -+MJZII6%N>*+(`*J_?LDI@")%A1D1`@0D?O:UXU=+B+/%.C.3P3935G@9N(=B( -+M39SA1$,K(<1`/."P@;M&4XI&*(9N(H[,#92F)PFDD,V:;%@V(`6%EHV(`6$+T`+00*I0;U -+M`+6F`+<5+:@OPH!:+<%V-Y:H6@0ST6@@$DQO&U0"]M7&.2N,;AN4`HP8H!<7 -+MT;QP4`N;A(R`&`P88BZ-&+V-:04?;20GS/LL>$_B,!&RT)$%@$(*)!"$E!7/ -+M#&8("!8N/9=K.,FB'MY.._/VD>C9#^`XS.XJ/S:XR1TI^MMN1AER0/FI,QI< -+MI!S/-3&8!4S2B>DK$=5/`G2Z><=$L7)SB`(%.`?MXB?J?H_!K]]%1:Q0>>D5 -+M@*,0!$21@`8Q[N?N_7_H;4[#S/![4O,^[NUOC?7F"'Z'YMMYO*;_)-K^K9([W=II7_32_/>'@"M-U3'I3>\5F/7!,>LN:H3*N!L;; -+M")']UU7>>-S\,?K65#!/&(542)(!76C2F<92T@@7G-NX#D][M'6*;YS)AF7< -+M!W7=#3Y1,RGT_`:&!`EU8>JEM/&JEI"+[5?4O\_]DT0",,XH95*#$@#=L,AO4L+ -+M1BB(3Q$X?C1IAS!$AY.>_%4]AI=*'&F6&\>U;\YG,QV14-HP9\BY30H/3].G -+MTW36AQ.N"4&8U(-$CSEJ:IAKE6J,KC=.U9$\H:1I/5!WK37"2WTTCL+"6YJD -+MVV8?W_`MAI=@)]J^U-YAOBS;:'(S4SPBJP))LEQ'+GK;<]US[@5VN)U.SEI] -+M@B6(>WE8&UNN(Z_Y^_U`>?=I*[4=\'V/"\YOXXU=RH7$2P -+MZ8AP5/2@#F" -+M^(R"5",K@5=:R=P=>/%\_!=LCS0>*ISX$*;G?\$9(P-<"734Z=7:V/E#,EJ3 -+MR#)DN].):$0+S";E13Q8UADO"%],GD)5UBLWUDCN34&A3.I3U+69_K:PL#9:%6F) -+M[AU5/05TLKLJ2*QB0,US:"U%(#G!9N81MN&'7T1O*J^]%%^#HV->-]LNGN*= -+M"C%H8>WG7$,^&0"244E4:#V6Y!289:<&E<<-ZGKH1[>$BW"MUU,#SL;,,),V -+M565B6/E!Z,H8E#]WD=(P%@X(,/C7GD0D -+MP-:,NZ$0>8GQY;JN=^^\XXXN0&5=W>Z5]AZ1HYC%E&S'8*.!D@5[<8]"EYC) -+M7*.I"&7-3RH1V#K4>$VO7@MZ*G*`]>M6049!\$(C%$3O$(">"B@IT'Y=.=H)`'G -+MP?T,;OF2.6;FQ;,.#Y<(PT)/0+73.OI!]&#-""F[4ST51A!FJDN2B3PA -+MCB(Q@J)!V14/5@R7:FG%FN\:RY!,K%>T32S-L$$!!OM9<,*\;?V9^D]EW* -+MBQ6*UR5PQ\J=9&)2U[%%,*&2VK(M$(BHTDQO)TV^76K`\E7:.HV99X,B$L68 -+MSG"]BK3]QP^-(JA!,M42_#=-`S`(@)8T4R,S_Y[7P__.8YW/0JJJJJJJNK8X -+M-=3PO'T&C*J9)`]F0`%K%$*P$#"""'MX"\OETF6EW>4IT9RN8.;PY_?U:<^? -+M*X$4&<5`%`1414BR`"1@4.DH8`QG9@#`TT7)^C&:7C@IA^%"_<3WTX+Q5*-=*7Y#/IE(_)_ -+MYYO52X/>^`A8NS+]GQ6$%J!9HFB5*_*22UE#*>TYS.T"1U[AFR44'A(ZIZ$N -+M7O')DXRK49/4T!7XG8#F7\)CF+,TPJAPV;\#4,AD7,Z/*?9D2DQDGR.^]LB( -+M%[`,/\]CK_:F,LN`#`T>]RT?A*WQ[K='\FN+&[/YKKD[GOG)".MPK9KOE&2> -+M4312<,\Y^C:>3=S-OHU-R)^F^*9H5Q"=7^-'_#GT?0V-ZX-3_S"6N2Q?O;7: -+M=G#ZR=L/JQG[ -+MO\_!J];07#9:XP=/JNC6V$KW5]`_.82T05/S?='X=WG0YS.[I94'X$?S()[N -+M#_Y@OQH(_`@/2399*2&\0*8=X^IVZ-3#*-44=7^#1YU#@<+A<&%:']\FNF[I -+M29_6J&Z$R.&H/.2,M8LDC$UZC*6*@F7SBW:"GQ3@-&AS/D'%[PAX*Z.!&Q`! -+MK?M_?V/CA,ZX91WMR-A0992O)T0BR^HF9=VIA-3&20"GDL&" -+M2O*AJJ$K`'3#X"@L61'"0N\_-&J])J,%%(*O_R0A*R3X>_<_]4=+TNCF/6?< -+M]IGY%UQ&M/IX7^;)C'TSL++)C1,MUVW257A0K(-$P.$V@S/RDA=MA.W#)`^< -+MI.1!C(@-*E;AB)^IQOD_^YWQ:2]K^31Z+%2J$@W$OT7PD.02BH.>E@'022(E -+M3@Y$+>HD)''I -+MK!<&,1@9T",6@FYM(V?[Q8KX6%]RJ`*8F:0\/6K-)X%%08$0"I?TTOH7J&:2 -+MP"RV[FF`@B!MYU]ZA5,A0DG2_Q)37"OW#@@D%P1P53,Y9BTRN'V=+Z4!-QP> -+M0Y0QJ(A,6"07X?-ZWOBHFM&@L1]UFNEG^IKIM+R/9>.LI"N99-[D[:+A+S@] -+M9SU/\?K]_\Q%2,`!A(D20!4>@D8$G;HBBL(!"(2`J'98-5R/N2MRE[9.N+,! -+MO"/VT9Y%Q@(TM(/8\%_VL"*'2P^*D+N2,C?4!XXM?3VL;&:5WJ^+#L>F7!H_,N -+MIUM`#L5Y[#M_O]A6"9J&&AI_78:(A$4RYACP^Q[,#B9?EORFBL,[/%'C)]'[ -+M.CACW"3O$#=`(=[_-\UU>&,/=25L+C^"'BK/E0!N1^$_"JB+_JPA`*]8CO(: -+M`,.^+BG;`ZF7BV09<[-_][:8^4KLHF.(1`0<SWGYJ3I.3K!0![LX-.34%X -+MKYZ.+[/.9+T`A+UD=Y@88X+WRYRQ#Z.0GAL_X^DU8%6CXLM.6/V<%ZXA\X\>Z?;"LR((5^)BH[ -+M9YVM6QCU[L+>4:^0@[(+A[*2R473>#_#80G05=[MO!0B83]S4Y#69SL\FU;, -+MM[%]++>'XGB[M<9CU9H/*ZY^J8LEQ/Y>=4H#=D -+M076@OV1*HU!09+VY&I##%336?/5%)M>9>5%%"0;X0^D(!5LP%ZR;J#4AL2A( -+MVL=+2L3>4N`V%1T%AG`R@("$$@E`4)0]>@`6#Y_ -+M!?KZ5D(#B^G8"OV,(-.'8LE-"R&W?C;5W&U,*%TS9#DQGG02?LI;-V'6_'VD:/[B\[^!BK._+R4O,AIRU>SJ67X@ -+M9BGP5'Z*.")D_)5(1^2U>5IE7MC^?6;KS0@W,1]%[_1Q>7T[6YJ6XJQ.^W;Y -+M/EBI?KRW$W[U(3Z"^#'K&C9:437[_,^`K\[(S?[&%\T)U''KMU:$5SAVI&?1 -+MO)WDB92)(QL1_:14'+!3-4<$"%!A'EL*M:SVOPL/C22OB0/^XF -+MK<69BJ[(VD8/"J7=>==O$-;WW//)P10\;N+6!'EH$U.A3!PVG>^?[V.QP)[E -+MM#M7!J:JJ5FI.V-&A9([(@[VAQ'!<$'(1S;SN=_.6>^5#L1AQ&_D'TL&-9`/ -+M68$)7J_190&=D@#5'\F^+AINR/5:*)DDUZ[PNR9<+9KN3=Z?U+GOLD3<33S= -+MITE&9$Q@::(*8DUSZ<4:QI+(U)BWK2;WBIFENWDW[`N'(FMFG:Z>V\N0-.!C -+M]U#!U]T8<9HC9P8<^B_][RM5^;"??IE6G\((HDSM:T1.%M7\:[:DU2F*_DM4 -+MYS/(B9,$-F_^*?"5:RW^<#:*&>C'":.!%4R6T1D?:_G=$H[JG;^K-&;DAU5X -+M&\$R"F*J1F;BV>]?N_E7K/--@V7(QI0@&I.NR=19-&!(=T.&_,X7T=/'`?1* -+M%W!R_DXWII`J:7?>BE$CIAWG*'YBZ$Q'_%_<27$JIQGYCU"!+X5C(PDS@W[\ -+M7\*E`_CB_W[+#`2HNE+Z5(.40BX]1`,]W]9L2=-5S\JMIA,-W<&@; -+M^[8^O76V>0CBYD0'SW%)\GD[WPO%X,)C%,*J;0T`C:JCB'+92>O:H';H,-[R -+M=DRZ#I]-'NVA`SO3(FDOZW8P4EL?@9A=5^0Y7FCDLWBFFUTVRG&%.[D2V^=` -+M5#K.+)QE0NXQY^M7*(C1-,N?>U93STMV@CGTY>&R$>RPK3'2R2*?5I5(24S/ -+M3K0$S`PJ(?/0Q9_SG%)RTTU3HP8:\7'A72DJ57`^O/MG`YY><>SSD?WAH=M: -+M"RO5HS+T!`\:(`9QAYB=#3-8"F2'/%UT1%Q3?D&F$[TQ2-M#%>'(OH`!2E./ -+M)389QV:(LHH6GG+(3N1L[?82L*K4K0&9XD2X6@M+0N,)U%K,T-":?/Y]\MK5 -+MK_Z:_I>'2UZ7+0:AKH\.K%VYPA6E!DHVG,PO?KU25M)+DT,P/AGJ<1$85R9% -+MPF!G=#T]U45@%VRRB)A-TW^ZQ(Q_ZZED+F:K/ -+M%[7I:0$4UD$#WL$0]Y40\#A.AW7;\'O>+#S^/JY/1OZ/3K>4XW>>[AD]#5PU -+M:AAQU[/W.(AMMJ>4Q`29&#B9U_*;%>_:VI]+:'MP6ICV=R&`\X8;_^^!.GMS -+M[CNN,)<#02E3:J,LVK(;7-QHKD@J'][T+:HKY^3V'XE@FQ3YWDML=KUMVS9T -+M--UE*6'ES*\2LIZ+T;BH^&&6:[X%`OG)G&&W,6 -+M)H$T1"14@OL:/PY6'YT^RE4`/70$D`%\6*J_[>]LELD`/3H$FC6R':]3T>]R:N[G/F>L^-Z8W(@05",604",9-Y"A3TN;K^7U_D?5 -+M]+)>,!C#_7R<;\D\CX1PL]S$^X[C@`P,/0"-31'T61;6DR@][DZ>GRX>I6>`E\3;J]#&J;J-QZDEZ -+MN`Z"S<>Q9D;G8V4DQ'4T:78NL=:(*1TE&S_R-!0N)EE'3[0&B*! -+MXQ*NL=1!1^MME#CP3"#Z\>EWS"6?=]^))"@K:@'@@WDG:-N)I=7TH:&]V:HU#$8H@2H7&5C!B8/< -+M>+*R`ZN=[,`1\>^V(NU#+I]][;J]J$$)=@@8!C&8F38Z2ZYW@!C;&*7UJH?S -+MQ*8,+&MJ!D'$H2WJ"=:##R1L!V.SV:FBB#KMJZ-A8U=P'F)%DBD+Y(]`W<76 -+M0"B`P'7/I#2C1W`Q//G]JRCF4N!U6V.,:6B(^'F_PM]?37_I^G\>W:F,#`!L -+M#$,?SLN]D@92+./&PT_IX_D\#C]]P.?H=A[GX8-3>EHG#-5Y:9#51"%*"@8, -+MR,#P4(,M6C4*U0!009;_,O-S^;=Q%1U4]/RN)VFLJGPB`SJ%?B]A6)UT%0>\ -+M7?CM)8U>&P!P_@=A7"`%&/ZL=2/B:J/Z>/Q_QN./XO]HL>FR%6\R]CX<7IV1 -+MM0K6BSY&M4Q1/\^R5ZB<#`'BZ1KJHV!@LE\&)<,`$827-VNZ1PXSI0/%T;N2 -+M:'A7:2NQC\#-SZFY*DG.9SA'QL/C0XYFJ`..@)-DDV29VD5#RDE>]G8Q^3VW -+ML)IY;;C3C--_D9B/%?0-[\A)B^]1S.A,'R5))?(UTRN%AZ[R=7^#1>8QD6;? -+M\\>9'WS7+Q2MMQB$4G'&LKKE_5:P6VHX=!IXC/A?V!&;E12BA`S"D%5]>PD& -+MLS[;Q-_NX\>E1,6!J!`.E>BKU-7><]ML_>YUY`*]=J1"%3^'=ZG#M`_=FP\5 -+M_1@U\L5HC!6/M^AK=6RKL$<4WMRZ#=/)WD-JE[^K[$5:2F,WF$W:PM9.*M4Y -+M,1F3/&3Z4AKF[0P[+OYJE&NVX5N("$H-U)M)Q]U1O+/^/[+5!F0AOSIW)JO1 -+M-W"XB@\FPFF^^+'I5<9E=\R":I,J$XM:0Y$V!"D*0/[J>C4]94.6F>7>N3E^ -+MZS4N7`.VR=BDAPI]W\W2SM;LA4L[C%P*HES%0]GNJ_4,L#<[Z^]\A0P/G_9< -+M-GJDQ,;U!M7+G$4.Q774HG@<3ZR^,@.(C5#=9R1V,1BJ>G;B^X1G8:0*J9PI -+M0O;M#TOG'I,BH@=IM=C3M.?3S+JKI7#,9^+T0K`E=MSFF.*<'F(&]5Y[G99G -+M$Q0MHQB/4_,W&S73.T(4?>X?VDZ)REP[?IQJS%,A"CV=$(_EC6+=\=C[AZ^L -+MT6_?WU:<<"*P,*F!BTVR-7-UZ8R*<(0Z,?*JV<():T68@T1[:_##<>AN:?DT -+MFK>X6UN;;41]M,=73:_5`8T)T.!>[ADD@M$)!&9DX4_BU5+'$2![3L[L]J^Z -+MNB>(E(74J3W"%&E0J0Z!0A1"@K/[XD5C,*BGM#&WV3BL+08N0>"'P6\JH&%[ -+M_'ONYQUCK5P8Z@\6BSVU0/@G(./1*RH.1^?4F$S2GX":4R%3D!X_,0:@()!, -+MX.-/LI6"D^5H9QOY(BMN;Y[FTCO5U^=_V]-005[^R6@N"H]!I"@*J2I9445_ -+M?LM+4&A$:4*A`@3/(K`5895(TB768N-]$Y",C9W-PTE8>7<6FSV_800?X^2Q -+ML6'"\!JHI4"AC#]EJ"+343WC0"P%!X6Z=Z+>/#;E\:3H -+M*J9Z)ZHG?FL$!@@([X%`13X]*>3\4W=4+!:?80*1;@X_:7`V2$",%O%+Y;NW -+MSK?IH.1]7FZJ%F6T;`NP\"[HC>M:RB9@9CM -+MN5V'C^C]SZ+:[B[]+=^EM]A+]F_!\*>SA;M^^UT*,[^Z802/D8,&I$20.*F'Q/!Z_P-@_2/8^OT^"0@))K'@?MU`W<04B($7/6DU3`./KY -+M:1.?^/Y_JBD3"%"(29.P4)IHI_DA+0R?6Z%LR#'D>>-RY]_<[&]";4S'N9LZ -+M"Y_Z2\H5#%Z.7J?>2_*H\+?3*3@?E2>)5$*M1;0//-@K!L7>5:>)F4[WO4.>,LM,94O5/E$SMAZ>H -+M\![?H>XT]I?,L*YE4(_XY&?7:=O,PS0::.'M8IM8F#)34%%76)^HW?:5.S=Y6&,4AE,AE@%G2V47(DXEPJT)0 -+M..PL_..*EQ-^+I,4 -+M56.:ST1Q#2EAT>"]%8+(?\>5O`*'!.B37T7>L6.7PW*[?5@`6%UD\A!('2L+ -+M.$R'/6!C>GKC#<5U,GN3M%F9WZDL`#J-4OYO1/K#W'8/.+L-B!CG -+MX>C5+"2X.U^#\@\X%#M@H7^B?UMO@_`IC<6<>OX?O"ZMQ?_D-P]Z(A[$]Z_% -+M+`/EE#J)UQ1L@*%@C[$1"K]>"A+B&;O@8'Q?I;)U?/;1OP=SD7X(0+@/D`C -+M/D>5DIGL#VVM`4V40(D($48(AZH0`3N`(J^_Z7C^-$K2C]+3I-44+?CE2BE: -+M#.]`(@$(E,*(A?*OS&D'J%0$X>>2#.C>W]UAB?==P[^@X@.USAH$4HVQ5N0` -+MZODUS#,W(T.=7,.=4Z"1PJ7D&>!D_"SMO9HN>!IEBHY@LWU&4`A2C*%!*P@F -+M8:NPEZZ1OJ+8!2PM4`I5D,(BM2`%DHF4@!@-D)G$G;9"2$@VMR@%5`*C5O"T -+M4`BYZ*`8%I9>WMXV(`8>GP<;"C@H!&EW$,0`H)-61KVF4`"BE8`&6*P(T5MY -+M[,,;ND@P0:%;$:!6,4@"?R*`@&(I`?/V.OR$P*:HNV,TP%#5A;Z`2JI_A9J' -+M][V!`!.$/:?0EGVF8TSR<_YI`4.0%0RB(=X"A!$/`!0OJ`)50["B$$0M!0I0 -+M2"H11'R04*J-04+S-FYJBAX210"0]YV;I/?,69?B1'DF7D;]MP`1`).+&>KUBK4B?4=S:MC<=XWW$U4KM[G[J2EVCN; -+M/@/-;<73F[?O[4P!0W`4.`%#R=[`2!W.O9K37>X]!V]56Z^)X;I9Q1+C!41$ -+MA)"20]?3*9`AEP?L?*3)N`Q3!3D0`LC0"E*)%1I%>]!0VP4.J"ALW`8GBTD@ -+M#L^)$P#&[CW_!W%E/`IFIAB>S2DGPA)&9)!F9F`A"*L=/@R,)LXZQI19P9&2 -+M15")D#(0,00(D`:\P,X<1RJ9G3.Q+U&^0G`B'FW@#<8A8&_T9K"I@@00;!0V -+MFV+(\9;GZW-.K6N_:8*<.7D+*!;[0KZ.DM+/;Q1#DO]1P=U0K$SDMIB"0,=)TI=B1D1`&1@9+]015`AUX.G%YCZTQSMP&.NF[Q2D -+MLFF^%S/`X*6,"GT/\-3\I.+EJ[:-C*DVU%JVK?RT55HA5M -+M=IL\W`ZX8X'%R6G6UJ($"HG#NPH6)[9)5#I>#661&#'.,(R#0BA?#,(=4P<9 -+MC849O*SG1$]L9,1UH*!1HCV=J7?)NP'\_L2T\!H*$(67:P!AE18K\Z$!Z8K# -+M3**H"OOKTP&`WF3K!\@2',QTC=T"G1R-J+][XLV -+M(+8U@=`1MFP\,V/E5"&F8=JAMA>ST4A8R]DFB-V.8J;>MYL^"G(IU)_!1T1S -+M1ZKUQC]A"6W+L==(4)^N[[/IW.W'V>OI3ZQ3I)5#=,;"[4`WYH:H"EIO#QP] -+MSLR@!H'@:TL;M]IPBL<^H8]HE8\TV##;I=QSPY_]QF;P -+MM/>O"3T)[*80=VMJ@'7HE+(S=H(%<+PY^)\@S]_< -+M;HPZ-X4BF#W(*'(0`K;8HF.\+K,J(@7U(\$0%_L?>;GX@ZBQQ8+SQM-(KZ,T -+M9C:"/-1$LP6-!UB!H'J`"Z[BU1&&*B])JICY7IM$"$[=1A]Z(`N00(;F^!CC -+M5^P%&$;?H8DTT347F=$+184JBY0.(9!0,+$N[M:9UZ'XN^`PG`&KU$+X:VQP^/6EA!K$],NI#&V[..-H-1%"/>\UILE?@CGDZ_->"R,B!V.L@$ -+M\&)YAC4=[_/OLTGHN.\HM45P\AYL%3UTXX8UK89FA0IA!,I6./VBK\XR="PY -+MX$>0E!].'NBXP53HL[#=M+887P^KJ$O*\J%%R3%HS53F3>PW"W)RE^0XP`&B -+MX5S4FXKO7KFF=!'B*40SE(LCGE4:[%<'28D=N(EZTAK?KT,J8/+0;J:&KD4Q -+MB[OTEDH1OBO+GDKUP8>/$/I/K&79VH!DW(/A#%O11Q,@?43>'>UDD\ER#*FT -+M')J(=2J>5.VW66K+2X(DT)IN(PK1W!R2F&OY&3M18,?"*L,:G@I^8P.Q>&WF -+M#.EZ:?20E*9N80_^%7)T'JNIOAM2U8J7U%SQ!5SP<%>O\CD:[T#9,"[%5=`GHARQIT -+M%\QD4*(FQ4)1^"94)MT,<05.QG++X<\&]/K$6S/WCS493!P1"*-:=F<4IPIN -+M/+HA_?]9K12Z4?9#B^ZG``&8)YPC&'J`:.$+6*I=A&GX74>)[[HP]&G1Q'WD -+M&I$34#4[D:E&0X>6!PZ:3'B0^W>(,D=*^/92`7Q>Q9-VAPUEQY3OTL_HZO#; -+M>#LA+:6P2J`"-2V,RA8$1Z7F[]*K)3,'CQHY$78K\B']@`8P%]=;,/U'E7#N -+M*&)X?MY1EQ%FK,8H:9K>;;!S?'N^@'EQ,87%WG+>)!%3C>! -+MPG)6ZNZG!P'@4%04Y;)`BM,$\7AB]3RL4:\XW7W00(".LJFSTKGT*M2TN^L7 -+M%@0`B`(A<`$"(1N!QX5FD\?@KO;H<;O.81WCXCX0Q*/U9@/0C -+M%(`V()O@A7*8\:4@&#F)EC0I05R7\PBCBCE#2XF,#"KCFN@W -+M>X>>N2Q1:\ZY(2F0,Q?:''2/&A[N9<9W,W"C.BFA"X6`#S/>PH?FQ$NZU?L5 -+M:%KJY31\`:46RYB8I12>4+@=KUF'V84*AZ9)<=+3`TMQSW!&4&1 -+MOVK3F)P\F'+M>@6I@UR)FR&V&]@54]WN43U=;>HIBQ14'9V"IBLL3##*Q],) -+M]QWNQWGS@"VU^,'ZK(O"&XX73+[$P:JK;=PJN[)=#R\,!3RVIIE4%#$M#M:[T;+*^L[L\_E->?;7GBTF.WV'SA^,C -+MI_(U5I*^F0K_A\E2M,7C("1S"";,76BQS-J0\@"(!@A7K8LPYTN8I$"81B%1 -+M`2=VC#?M08HPA"!^5`AU)@H2LH%WI7IIQW$(44H5I@A&_(*0&2]9BH$/S424 -+MA[ID(4F0PG+%CL8%'F96&M\T#-$984"5((`GI9O\^J`G)"3 -+MF$F&UPO%T7I"-_4@?=<7448N.,D(T:\SOC/B0Q[.&;'-BYP3#<._R"(7]"@2 -+MB;[:-2ACE"YUZ)"\@RP@*&P7C0%#GO?PG1Z($QPJPJX;0J% -+MM77KK\]``=R#J10T14"4D%<\6L+ME\?UG3^>^5U.OD!0]L0`3B!0@@KR<9-P -+MXQ-;L=B_?>*S;KP@@@<.\Z#.-M"Q%IPM$S$,EA?"(H)'AE%@E>(`38$0KENH -+M]!A=)P]Y_=LLSAE$R%+").Z_8;-;K9`DT\WCWG0Y"P]#];[*TR"=W$V,V91A -+M71,P*$:G9H`TMG,HETJ\/!38KNF;OK\P*&5H!OJJO>I!4(\(*&-IF"F@%#?: -+MYPX,&FHI(<=[S*;`*%BV3+ -+M@P&<#C!ZMB!2%%`=4,*!O.H4S#`@H%NK\B\5#*>?XGQMCF8W'\*G4SGM?J3$ -+M.[`K2U%`44!BQ&16V,KX'0*3KCCC(@8G90&TX@*';F\]9.BEPZ+322R/-M10 -+MR5`$IZ@@N9>,I984,W=;)`QC)JX*%>Y?0&'-AM15=<-%!(&;ZK>!O.*&]IL/,LNP44\D;(=EVWGN. -+M<:*;Y.R9TN"O:[A73N%1/,)PN)6#(&+%6B&Y"2A!;:[G-0( -+M^-\(=F/B/>'L(+-)POFTHV%?R5\SNC[ABBN!J7%-YELS%@L5(H5@58P5D`B` -+MQ/D!-HQ7,::HBH&,@RH3&"0PAK<0`BHRSV)WVT<&3@">YM+7(7/6<0U33JH% -+MFYS:'!VWP`!*]J2!E)"0B0B*((HQ$11B/WIB!1L2$UPD9"-3(1C`4W^Z@.T2 -+M$RV=VM%5165C3(]7JSZ`N=#Z<"=NM9G/\83I['_K/4_HWCFKHWV:J:Y?Y'7A -+M?DI$1`BM`$0%(``A]#ENPDS3Z^)MN7]3\W6%.*Z'<&R.8+:@@0!@(0% -+M"09`0($!0@H)Q;WT=+2$%0GCY,%V.FV#8+C555,5:JE1I*&A64J4TRPD#?A"`A7A?E=V;H^5^.-Z -+M6;9:`B>RV7/ZWMF<\GFAL7@"0.W=<"A9CT-E%!,43[^,@)S]'FB,H9"!IZQH -+MH1S!EM)#>P@B%+J@H=P:#%`(H!&-^E\:4(U/%V"IIP!0VP4,!8N3#&7E(4*% -+M)0E+QR`H8:"X`T;-Y?41POCSN=O=DYGW<]63['4"AD9$])!#N0$%Y%49R1H] -+M6*"?%YJ!HJ9E39'VPG`9;O/EH#D8L95,.A8F&DHX/>60794`1,M0S,&B"%^> -+M[P>L"]1T,P1:P($'TD0"Y41OAU@4,@*&P>W@],!U&R'%CMFQ:HY5&CU!-N[: -+M:`]:H6HH)F;`H[WL[.Z[\^9ZZ[8.CHFX(ZCAF4T3E@H1&D:F)3>UXW%).3O] -+MRT3:,VU>!F(A42\]S]WA?`OT/W'0ZPB&3&:)2,V*VM25/IZA($,I-Z0HI"08 -+M-.R5&JC:35G(%UE`@`EGDP"BC`(HW^#4+@4(!-L%"/8+F@V"(0E!$*(9H2M" -+MHPD"AN&[" -+MHYN6'+C&PP%&S;A:II;HDMNP,&X`2"C@&373*.8%#/6+@=`;!$.`>9,UQMY*T*=9H'VFCSJY7!1 -+MH?-G*%!;>7G+:^;0H7;MI8I6M-//XE"IS@R@H7E -+MY\2C1W-"$VZCS`4,FYEC"$C)Q.UJUX'2_3P_3?C7Y81 -+MP,^I,KDUEX*'2RG3Z1TR=K[S57UI`^G-6<@AIA:KW**=FLHRLF,>RE9I:;CV -+M4C_OU2_?Z=CQ.71PKA'F+1J.K@V'#!L0F\Q=I##\/`0="-8S0ZE_`R/TQF'CHT4`W8<[TPTZU!0+[.[FW,VK1354`PU6:N@I$Y -+M1)%S)K0='IB5-T]&)5RK!@S/9"_3E$4!NNR>F!0@9T1/(CV^`DDA/[34!0RQ -+M%#(P6<\X#56L2%-:EHOT6QP7!X.0;!#X&/ASC>:8LLPWEBS*LKKB9-)5-!59 -+M;6UU`W:U?"X$VMI5J-"JJM33NIPX&OL!*OGM;9XNSKN6C=V;OA4M:TIL8[8* -+M%^J)980DA-L3E:P4-XO,2W1]3!ORDA(8FT"AA0@TH(;+`IJ,.ZW.(-U!^J\((H=5D)E'S]CYGC\FGS[,.=D#, -+M(@6/J18(LK%TQ`B`(48]'1WW<%0RDAXIVF(Y#P3)VT/;XM?VC8[E<)6]2F'B^O^_4N,>`RGOW`@G[W'RU`?#%[PDA$DU(]^8A?^ -+MDQ/MS"1D8>ER,>3H3/'H7"ZZZZZ8`23.A,Z?;PB*/NR+C\>IA[S;IO[X\L(U -+M*8+6$!40?^>X!1K^-^)7O8>D0_%NKYCSHZS]:)( -+M#/7AQ%$8&:1AS>,M=[MMCGM6%&D&#F`2`,8!0\5[J>,"A_;L#]"=R+AE/7]C -+M8_=MCV(DO(2>>\_GL\JRX/G?045JAA`"?.G7@>0?@4#[;Q3V6/>^I+CR_SZ/ -+M,QH'S_0_0J>U@>)/_$/5:-1JY7&7'UTX3B"P`2@J&]3PK1Y37045.-[&RU@C -+MRZE!QRM1S7R%'CX/#[_R-&9Z3/H$A9[*ITAY+H87N/MQ^XRSN=4GN]8J"*9T -+M4R?\IT_Z'OD_W1@',I\5%O.?>V!^_>KA%_VPS55;10&&]E*IK?KLI,/7_/>L -+M^UO:R&]I_AK"3J+\;_ -+M27^:>[[K:'0_IRO#AY]*0D\W_]V,W?7WO7[;][\4N]4J;74]OKR#I("ZF)[\D.+7[JW<1M_S+T\R07]^.GHN2N_V9W^UAH/?M6L(]G=;K8`^ -+MNGF*OQV7S(P>`QF$K9K.8#_/:_`86%)Q#=W]L'PKE*TZ/Q/>W0X:[]Z!=MVAGZ3XE^R4@7Z<;!&Y2#\_ -+MZ)!2!?*E\$B%&8XI)1DC5[YX0Q.D!U5!X>T_#9.<7W8\W8*\2(#[7OKPL/%P -+MMCZ'U_NJ)T\='S>((D_7A^ELI=U(3,[P-9[+TT'PWDE'"$\!X=_\_).ROW^? -+MC=.S-W,8.>T2CBVG&3T>S'H/R==M"JX)?-VOP7GM- -+M?2\':;;5N;OB<3>9^20W4&3S:/LW:AARVH-G6TXL -+MDV\!)L(@OU(`.H@8<80FQRK)$PE(T\YV=T-QZICXH'U:!W.%:XYY4M:_.D`5 -+M6YB":A=D94"H`(#`W"$#%A,')0]-U:>&S":X@W%\BOH3^V+%,$"HQKE""HB- -+M0A!C@V((WR@$O#G3>I#[/G[2P@U&5UR47BO1?WMZ5$;Y`0%V0?IONU7!O;OQ -+M$->N4W#HL,OL_MU_I-KT.>\Z;3O>4:*LX#Q,&CM7">7Z$\6]4ZMY7I=NTYM% -+MZ)IY48P2K*WEJ^2V-(B`/`IKS(?6MQ2E'=>U[*5&>8($I,!YRH*,FI%59T3G -+MCT@9#11"[,IUXXTZJ=+@L^BO,#!,@8`B,,'D:[,(IRKJN!N(PCUN7ETFMNQ> -+MT.M,<5L4#9FB*%?$W!57FM?/^ZBA@2T-7E"Z%F;\[:8XR0<6)_+$E*H!FF8. -+M-XG<(8#8^U:S%08IU0*`6B3A$>0E<[+JG_>:@;>-`Y1E`&`8=(RYUE')]1`TYY(A:#RB0FG3$PE+)8S -+MGU.@!,R[6^+K@E&1>47'U:5Y9^H"9N$SLJ5J?%:_%JV9"PQ"#C%I;C:?MTG) -+M<_+^*U#T[J#O`$?NA$H`J5@CT><;M?J"+89:J5'/N15EU7F7>F1"I0/G+">Y -+M3+-@8%+J^"D)LAGHE1:IW4%D>L70=!S'KQZ=T/&:X3,<[QS#1;Q0:L.Y4(WR -+MIS8('-XK,_=EA`C,5^$HZS9@[X!)(&TP;5L0+F9IIL:86^R:&;<$8IY<9"=$ -+M980D2B%BWIQ8MF1**D]I;;CK69[X^A0WPLO@0K_*(X]F;<'PTXE7 -+M=W36:V(H)-CY_U'(8WEH]4NH>1WYRQ+BR@4% -+M$1U.K,)S+4!]61]+Q!Q];=1<:0H&&9F^&`@320!JS8'6STZ[:=E*IZ;&BDC7 -+M0Z/7-5O>MY:IK*BM/5>;X56^9&U^#42.H)OFI54HV1)`TJC7_B33GAVXJ]7O -+M;?1"OI([IPP,[MV,/M;SJ$X)F]1/8&A&510:&ID)5D![*U)9=_1^5X(."9$3 -+MAKAD3Q"G(58]/R>7K9'EWM'SQL4<(VSXPXG5&YKMU-_C3ND*S57\G4:0+B9, -+MJ5UN=Z]5!0TZS\:=[S.J>H-)[0]6K0B-@S.BC387!M -+M$S)!YJMA-!`JT[;'[Z^+^[0R-)::%H%GHKM=7G#8VW_]:.U^;<&A9&M/6UP?W""!BY%` -+M#![EE,U-#7?W49=0ZXLS<=KZ:P-?Z3.X9G9?7W,9U.N2TLZ.@I-#Z@G7\7TV -+MWHSA0AEJ*,1,`G^Y-'RV*AEKF,/?,:P^UZ&F<"J&#J0NMG0&<\V@F>9R#G`8 -+M8"2$M4:2?X:&&W[K8\*=>CQHL8G]'<]@CN1F#'"X-ZO8\(=;X+BJT=]2+C:H -+M4PL_D99">XRIU6^@S@B;6=;A"S6J!DD&;F8.@CY3\G*1J,;%1,\3U?C65;#&*>6OE! -+MFVJJJM,IDRO),/K661%M4\6#1,IBT04O9HXN64;!]\FH*H#<46AK6%-'LCF9 -+MR+1L24TY4/W_$$4`;*4R6-)=-<[!3VX70!7=GKY%5A/>5U.!KP4`/^X".'H%Q?;P',T8(,[(O1T\\K!%">*#TZ3L)AZ$/:3# -+MN#L_''38,`!CF+]:(8[7>H+[G4L`8'8$'2;(;A-TB>Y-?`Z0SHGO<-&]>=?1 -+M.%\D]#]-"\?6"0!S,$=]"\WZJKFWW+0,KN8@H5#,P4JO+2[I8+)K.GE;OZ'7 -+MW6^-;6=X]"-%4;W@V9C.#*N(]M'VAWIC7&N_#'E;W?3^T'>]-2-X=9B^4;U\ -+MT'*-(H-.>>8:,Q(3.V46OUD]TQT7D-PM+!C5]1&$A5_.0$FU.WL(&AB[^J(W -+MC9_.U;3@%I%C#)%M;R_(%(ZBT`U7Z%$^2K53FF"->R$&0GTQ1HJCRC*ZNL1@ -+M;F!0>FK6OK[E(YYHF^=GYS,F>9DC+2@>J2@N@/>\BL^-6Z=!H*-?OLIAZ_NK -+MLDN"E,GB8]*I2!;=UH7JBS.6AF88^:>-ZOR=_N7A"M\B,YE=CKV?B(2%+;-$FTH0P@=0=)7(@D5HIYCOV$EW.MZP_:HB -+M&,OED]W=BZGUITM#NKAC8,`1SO"V/<*,?4Q+AGF/V=O(_QZ9Q08'TG;(.%W> -+M3QI"^R0+9F25\+`V81V6@)V/X&8HAATY-]YTO.V[=I1-2`X6_"5%@0JCBP0? -+M!4@"!(7#-S*G*12#Q7ISP]OR(^?&&48%!EP>;\@B($4F'_XNY(IPH2!)0!** -+` -+end -diff --git a/gdb/testsuite/gdb.base/tab-crash.exp b/gdb/testsuite/gdb.base/tab-crash.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/tab-crash.exp -@@ -0,0 +1,43 @@ -+# This testcase is part of GDB, the GNU debugger. -+ -+# Copyright 2017 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 . -+ -+if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { -+ return -+} -+ -+standard_testfile -+ -+# gcc-base-debuginfo-6.3.1-1.fc25.x86_64 -+# /usr/lib/debug/lib64/libgcc_s-6.3.1-20161221.so.1.debug -+# objcopy -R .debug_loc -R .debug_ranges -R .debug_info -R .debug_abbrev -R .debug_aranges -R .debug_str -R .comment ... -+ -+set debugfilebz2uu ${srcdir}/${subdir}/${testfile}.bz2.uu -+set debugfile [standard_output_file ${testfile}] -+ -+if {[catch "system \"uudecode -o - ${debugfilebz2uu} | bzip2 -dc >${debugfile}\""] != 0} { -+ untested "failed uudecode or bzip2" -+ return -1 -+} -+file stat ${debugfile} debugfilestat -+if {$debugfilestat(size) != 71936} { -+ untested "uudecode or bzip2 produce invalid result" -+ return -1 -+} -+ -+clean_restart ${debugfile} -+ -+gdb_test "complete p si" "complete p si\r\np size_of_encoded_value" diff --git a/0074-gdb-rhbz1553104-s390x-arch12-test.patch b/0074-gdb-rhbz1553104-s390x-arch12-test.patch deleted file mode 100644 index 2cb15e5b25fddfc2bec064b5009d8d273e87286c..0000000000000000000000000000000000000000 --- a/0074-gdb-rhbz1553104-s390x-arch12-test.patch +++ /dev/null @@ -1,81 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jan Kratochvil -Date: Fri, 23 Mar 2018 20:42:44 +0100 -Subject: gdb-rhbz1553104-s390x-arch12-test.patch - -;; [s390x] Backport arch12 instructions decoding (RH BZ 1553104). -;; =fedoratest - -diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.S b/gdb/testsuite/gdb.arch/s390x-arch12.S -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/s390x-arch12.S -@@ -0,0 +1,4 @@ -+.text -+.globl load_guarded -+load_guarded: -+.byte 0xeb,0xbf,0xf0,0x58,0x00,0x24,0xe3,0xf0,0xff,0x50,0xff,0x71,0xb9,0x04,0x00,0xbf,0xe3,0x20,0xb0,0xa0,0x00,0x24,0xe3,0x10,0xb0,0xa0,0x00,0x04,0xe3,0x10,0x10,0x00,0x00,0x4c,0xe3,0x10,0xb0,0xa8,0x00,0x24,0xe3,0x10,0xb0,0xa8,0x00,0x04,0xb9,0x04,0x00,0x21,0xe3,0x40,0xb1,0x20,0x00,0x04,0xeb,0xbf,0xb1,0x08,0x00,0x04,0x07,0xf4 -diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.exp b/gdb/testsuite/gdb.arch/s390x-arch12.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/s390x-arch12.exp -@@ -0,0 +1,34 @@ -+# Copyright 2018 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 . -+ -+#if { ![istarget s390x-*linux-*] || ![is_lp64_target] } { -+# verbose "Skipping s390x-prologue-skip.exp" -+# return -+#} -+ -+set testfile "s390x-arch12" -+set uufile "${srcdir}/${subdir}/${testfile}.o.uu" -+set ofile "${srcdir}/${subdir}/${testfile}.o" -+ -+if { [catch "system \"uudecode -o ${ofile} ${uufile}\"" ] != 0 } { -+ untested "failed uudecode" -+ return -1 -+} -+ -+gdb_exit -+gdb_start -+gdb_load $ofile -+ -+gdb_test "disas load_guarded" " <\\+28>:\tlgg\t%r1,0\\(%r1\\)\r\n\[^\r\n\]* <\\+34>:\tstg\t%r1,168\\(%r11\\)\r\n.*" -diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.o.uu b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu -@@ -0,0 +1,20 @@ -+begin 644 s390x-arch12.o -+M?T5,1@("`0`````````````!`!8````!```````````````````````````` -+M``$X``````!```````!```<`!.N_\%@`)./P_U#_<;D$`+_C(+"@`"3C$+"@ -+M``3C$!```$SC$+"H`"3C$+"H``2Y!``AXT"Q(``$Z[^Q"``$!_0`+G-Y;71A -+M8@`N -Date: Tue, 18 Oct 2022 11:10:41 +0200 -Subject: gdb-backport-fix-break-main-file-remove-fail.patch - -;; [gdb/testsuite] Use prototype to call libc functions -;; (Tom de Vries) - -On openSUSE Tumbleweed (using glibc 2.36), I run into: -... -(gdb) print /d (int) munmap (4198400, 4096)^M -Invalid cast.^M -(gdb) FAIL: gdb.base/break-main-file-remove-fail.exp: cmdline: \ - get integer valueof "(int) munmap (4198400, 4096)" -... - -The problem is that after starting the executable, the symbol has type -"void (*) (void)": -... -(gdb) p munmap -$1 = {} 0x401030 -(gdb) start - ... -(gdb) p munmap -$2 = {void (void)} 0x7ffff7feb9a0 <__GI_munmap> -... -which causes the "Invalid cast" error. - -Looking at the debug info for glibc for symbol __GI_munmap: -... - <0><189683>: Abbrev Number: 1 (DW_TAG_compile_unit) - <189691> DW_AT_name : ../sysdeps/unix/syscall-template.S - <189699> DW_AT_producer : GNU AS 2.39.0 -<1><1896ae>: Abbrev Number: 2 (DW_TAG_subprogram) - <1896af> DW_AT_name : __GI___munmap - <1896b3> DW_AT_external : 1 - <1896b4> DW_AT_low_pc : 0x10cad0 - <1896bc> DW_AT_high_pc : 37 -... -that's probably caused by this bit (or similar bits for other munmap aliases). - -This is fixed in gas on trunk by commit 5578fbf672e ("GAS: Add a return type -tag to DWARF DIEs generated for function symbols"). - -Work around this (for say gas 2.39) by explicitly specifying the prototype for -munmap. - -Likewise for getpid in a couple of other test-cases. - -Tested on x86_64-linux. - -diff --git a/gdb/testsuite/gdb.base/break-main-file-remove-fail.exp b/gdb/testsuite/gdb.base/break-main-file-remove-fail.exp ---- a/gdb/testsuite/gdb.base/break-main-file-remove-fail.exp -+++ b/gdb/testsuite/gdb.base/break-main-file-remove-fail.exp -@@ -87,7 +87,9 @@ proc test_remove_bp { initial_load } { - # should warn the user about it. - set pagesize [get_integer_valueof "pg_size" 0] - set align_addr [expr $bp_addr - $bp_addr % $pagesize] -- set munmap [get_integer_valueof "(int) munmap ($align_addr, $pagesize)" -1] -+ set munmap_prototype "int (*) (void *, size_t)" -+ set munmap_expr "(($munmap_prototype) munmap) ($align_addr, $pagesize)" -+ set munmap [get_integer_valueof $munmap_expr -1] - - if {$munmap != 0} { - unsupported "can't munmap foo's page" -diff --git a/gdb/testsuite/gdb.base/dprintf-detach.exp b/gdb/testsuite/gdb.base/dprintf-detach.exp ---- a/gdb/testsuite/gdb.base/dprintf-detach.exp -+++ b/gdb/testsuite/gdb.base/dprintf-detach.exp -@@ -52,7 +52,7 @@ proc dprintf_detach_test { breakpoint_always_inserted dprintf_style disconnected - # Get PID of test program. - set inferior_pid -1 - set test "get inferior process ID" -- gdb_test_multiple "call (int) getpid ()" $test { -+ gdb_test_multiple "call ((int (*) (void)) getpid) ()" $test { - -re ".* = ($decimal).*$gdb_prompt $" { - set inferior_pid $expect_out(1,string) - pass $test -diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp ---- a/gdb/testsuite/gdb.base/info-os.exp -+++ b/gdb/testsuite/gdb.base/info-os.exp -@@ -39,7 +39,7 @@ if ![runto_main] then { - # Get PID of test program. - set inferior_pid "" - set test "get inferior process ID" --gdb_test_multiple "call (int) getpid()" $test { -+gdb_test_multiple "call ((int (*) (void)) getpid) ()" $test { - -re ".* = ($decimal).*$gdb_prompt $" { - set inferior_pid $expect_out(1,string) - pass $test -diff --git a/gdb/testsuite/gdb.threads/siginfo-threads.exp b/gdb/testsuite/gdb.threads/siginfo-threads.exp ---- a/gdb/testsuite/gdb.threads/siginfo-threads.exp -+++ b/gdb/testsuite/gdb.threads/siginfo-threads.exp -@@ -41,7 +41,7 @@ gdb_breakpoint [gdb_get_line_number "break-at-exit"] - - set test "get pid" - set pid "" --gdb_test_multiple "p (int) getpid ()" $test { -+gdb_test_multiple "p ((int (*) (void))getpid) ()" $test { - -re " = (\[0-9\]+)\r\n$gdb_prompt $" { - set pid $expect_out(1,string) - pass $test diff --git a/0076-gdb-backport-readline_support.patch b/0076-gdb-backport-readline_support.patch deleted file mode 100644 index 89f381bd2d647f73a9cb04afd0d0a70c1d09615a..0000000000000000000000000000000000000000 --- a/0076-gdb-backport-readline_support.patch +++ /dev/null @@ -1,31 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= -Date: Mon, 10 Oct 2022 15:44:52 +0200 -Subject: gdb-backport-readline_support.patch - -Add support for readline 8.2 - -In readline 8.2 the type of rl_completer_word_break_characters changed to -include const. - -diff --git a/gdb/completer.c b/gdb/completer.c ---- a/gdb/completer.c -+++ b/gdb/completer.c -@@ -36,7 +36,7 @@ - calling a hook instead so we eliminate the CLI dependency. */ - #include "gdbcmd.h" - --/* Needed for rl_completer_word_break_characters() and for -+/* Needed for rl_completer_word_break_characters and for - rl_filename_completion_function. */ - #include "readline/readline.h" - -@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_throw () - rl_basic_quote_characters = NULL; - } - -- return rl_completer_word_break_characters; -+ return (char *) rl_completer_word_break_characters; - } - - char * diff --git a/gdb-12.1.tar.xz b/gdb-13.2.tar.xz similarity index 68% rename from gdb-12.1.tar.xz rename to gdb-13.2.tar.xz index 8b168549ee742694cbe587951fa8f779d549eec2..b5d2dbf577d87529aef8563108c176c9f62b80c9 100644 Binary files a/gdb-12.1.tar.xz and b/gdb-13.2.tar.xz differ diff --git a/0020-gdb-6.3-attach-see-vdso-test.patch b/gdb-6.3-attach-see-vdso-test.patch similarity index 100% rename from 0020-gdb-6.3-attach-see-vdso-test.patch rename to gdb-6.3-attach-see-vdso-test.patch diff --git a/0002-gdb-6.3-gstack-20050411.patch b/gdb-6.3-gstack-20050411.patch similarity index 97% rename from 0002-gdb-6.3-gstack-20050411.patch rename to gdb-6.3-gstack-20050411.patch index 6f6ecfbe290c0b7642ddc4cabaae3941a92c0ffc..ce9cd652f1978029a53255168784e41c60065f14 100644 --- a/0002-gdb-6.3-gstack-20050411.patch +++ b/gdb-6.3-gstack-20050411.patch @@ -16,7 +16,7 @@ Subject: gdb-6.3-gstack-20050411.patch diff --git a/gdb/Makefile.in b/gdb/Makefile.in --- a/gdb/Makefile.in +++ b/gdb/Makefile.in -@@ -1767,7 +1767,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force +@@ -2011,7 +2011,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force install: all @$(MAKE) $(FLAGS_TO_PASS) install-only @@ -25,7 +25,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e "$$t"` ; \ if test "x$$transformed_name" = x; then \ -@@ -1816,7 +1816,25 @@ install-guile: +@@ -2061,7 +2061,25 @@ install-guile: install-python: $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb @@ -52,7 +52,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e $$t` ; \ if test "x$$transformed_name" = x; then \ -@@ -1847,6 +1865,18 @@ uninstall: force $(CONFIG_UNINSTALL) +@@ -2092,6 +2110,18 @@ uninstall: force $(CONFIG_UNINSTALL) rm -f $(DESTDIR)$(bindir)/$$transformed_name @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do diff --git a/0031-gdb-6.3-mapping-zero-inode-test.patch b/gdb-6.3-mapping-zero-inode-test.patch similarity index 100% rename from 0031-gdb-6.3-mapping-zero-inode-test.patch rename to gdb-6.3-mapping-zero-inode-test.patch diff --git a/0032-gdb-6.3-focus-cmd-prev-test.patch b/gdb-6.3-rh-testversion-20041202.patch similarity index 38% rename from 0032-gdb-6.3-focus-cmd-prev-test.patch rename to gdb-6.3-rh-testversion-20041202.patch index 27c85f1201bda6f22baf31c5cff4d3638e04068f..59132bf7b5893fe77e0b67268a0af9bff4200c8c 100644 --- a/0032-gdb-6.3-focus-cmd-prev-test.patch +++ b/gdb-6.3-rh-testversion-20041202.patch @@ -1,21 +1,20 @@ From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches +From: Andrew Burgess Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-focus-cmd-prev-test.patch +Subject: gdb-6.3-rh-testversion-20041202.patch -;; Test a crash on `focus cmd', `focus prev' commands. -;;=fedoratest +;; Check distro name is included in the version output. -diff --git a/gdb/testsuite/gdb.base/focus-cmd-prev.exp b/gdb/testsuite/gdb.base/focus-cmd-prev.exp +diff --git a/gdb/testsuite/gdb.base/fedora-version.exp b/gdb/testsuite/gdb.base/fedora-version.exp new file mode 100644 --- /dev/null -+++ b/gdb/testsuite/gdb.base/focus-cmd-prev.exp -@@ -0,0 +1,40 @@ -+# Copyright 2008 Free Software Foundation, Inc. ++++ b/gdb/testsuite/gdb.base/fedora-version.exp +@@ -0,0 +1,22 @@ ++# Copyright 2023 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 ++# 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, @@ -24,30 +23,12 @@ new file mode 100644 +# 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. ++# along with this program. If not, see . + -+if $tracelevel then { -+ strace $tracelevel -+} ++# Start with a fresh gdb ++clean_restart + -+gdb_exit -+gdb_start -+ -+# Do not use gdb_test or \r\n there since: -+# commit d7e747318f4d04af033f16325f9b6d74f67079ec -+# Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy -+ -+set test "focus cmd" -+gdb_test_multiple $test $test { -+ -re "$gdb_prompt $" { -+ pass $test -+ } -+} -+ -+set test "focus prev" -+gdb_test_multiple $test $test { -+ -re "$gdb_prompt $" { -+ pass $test -+ } -+} ++# Check the version string contains either the Fedora or RHEL distro ++# name, and that the version number looks roughly correct in format. ++gdb_test "show version" \ ++ "GNU gdb \\((Fedora Linux|Red Hat Enterprise Linux)\\) \[0-9\]+\\.\[0-9\]+-\[0-9\]+.*" diff --git a/0009-gdb-6.5-BEA-testsuite.patch b/gdb-6.5-BEA-testsuite.patch similarity index 100% rename from 0009-gdb-6.5-BEA-testsuite.patch rename to gdb-6.5-BEA-testsuite.patch diff --git a/0007-gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch similarity index 99% rename from 0007-gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch rename to gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch index 304aa38490fac088721aba7fb69ac0d9ee085897..6a9fcad83d0f33f122c6d692f67c62e8a31b7d6e 100644 --- a/0007-gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +++ b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch @@ -44,7 +44,7 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug: diff --git a/gdb/printcmd.c b/gdb/printcmd.c --- a/gdb/printcmd.c +++ b/gdb/printcmd.c -@@ -1306,6 +1306,10 @@ process_print_command_args (const char *args, value_print_options *print_opts, +@@ -1300,6 +1300,10 @@ process_print_command_args (const char *args, value_print_options *print_opts, if (exp != nullptr && *exp) { diff --git a/0012-gdb-6.5-bz218379-ppc-solib-trampoline-test.patch b/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch similarity index 100% rename from 0012-gdb-6.5-bz218379-ppc-solib-trampoline-test.patch rename to gdb-6.5-bz218379-ppc-solib-trampoline-test.patch diff --git a/0021-gdb-6.5-bz243845-stale-testing-zombie-test.patch b/gdb-6.5-bz243845-stale-testing-zombie-test.patch similarity index 100% rename from 0021-gdb-6.5-bz243845-stale-testing-zombie-test.patch rename to gdb-6.5-bz243845-stale-testing-zombie-test.patch diff --git a/0030-gdb-6.5-gcore-buffer-limit-test.patch b/gdb-6.5-gcore-buffer-limit-test.patch similarity index 100% rename from 0030-gdb-6.5-gcore-buffer-limit-test.patch rename to gdb-6.5-gcore-buffer-limit-test.patch diff --git a/0028-gdb-6.5-ia64-libunwind-leak-test.patch b/gdb-6.5-ia64-libunwind-leak-test.patch similarity index 100% rename from 0028-gdb-6.5-ia64-libunwind-leak-test.patch rename to gdb-6.5-ia64-libunwind-leak-test.patch diff --git a/0029-gdb-6.5-missed-trap-on-step-test.patch b/gdb-6.5-missed-trap-on-step-test.patch similarity index 100% rename from 0029-gdb-6.5-missed-trap-on-step-test.patch rename to gdb-6.5-missed-trap-on-step-test.patch diff --git a/0034-gdb-6.5-section-num-fixup-test.patch b/gdb-6.5-section-num-fixup-test.patch similarity index 100% rename from 0034-gdb-6.5-section-num-fixup-test.patch rename to gdb-6.5-section-num-fixup-test.patch diff --git a/0058-gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch b/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch similarity index 100% rename from 0058-gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch rename to gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch diff --git a/0043-gdb-6.6-buildid-locate-rpm-librpm-workaround.patch b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch similarity index 100% rename from 0043-gdb-6.6-buildid-locate-rpm-librpm-workaround.patch rename to gdb-6.6-buildid-locate-rpm-librpm-workaround.patch diff --git a/0024-gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch similarity index 92% rename from 0024-gdb-6.6-buildid-locate-rpm.patch rename to gdb-6.6-buildid-locate-rpm.patch index efaf98999b38189d90cdbf332c935fadea4bb8f0..23f4d55cbd5902e75745153dbe4e21cad5cc7565 100644 --- a/0024-gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -1,6 +1,6 @@ From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 +From: Kevin Buettner +Date: Wed, 22 Feb 2023 22:30:40 -0700 Subject: gdb-6.6-buildid-locate-rpm.patch ;;=push+jan @@ -232,6 +232,40 @@ diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4 # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. +diff --git a/gdb/build-id.c b/gdb/build-id.c +--- a/gdb/build-id.c ++++ b/gdb/build-id.c +@@ -771,10 +771,10 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor) + static rpmts (*rpmtsCreate_p) (void); + extern rpmts rpmtsFree(rpmts ts); + static rpmts (*rpmtsFree_p) (rpmts ts); +- extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, ++ extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, + const void * keyp, size_t keylen); + static rpmdbMatchIterator (*rpmtsInitIterator_p) (const rpmts ts, +- rpmTag rpmtag, ++ rpmDbiTagVal rpmtag, + const void *keyp, + size_t keylen); + #else /* !DLOPEN_LIBRPM */ +@@ -829,7 +829,7 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor) + && (rpmdbNextIterator_p = (Header (*) (rpmdbMatchIterator mi)) dlsym (h, "rpmdbNextIterator")) + && (rpmtsCreate_p = (rpmts (*) (void)) dlsym (h, "rpmtsCreate")) + && (rpmtsFree_p = (rpmts (*) (rpmts ts)) dlsym (h, "rpmtsFree")) +- && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator")))) ++ && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmDbiTagVal rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator")))) + { + warning (_("Opened library \"%s\" is incompatible (%s), " + "missing debuginfos notifications will not be displayed"), +@@ -917,7 +917,7 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor) + + /* RPMDBI_PACKAGES requires keylen == sizeof (int). */ + /* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */ +- mi_debuginfo = rpmtsInitIterator_p (ts, (rpmTag) RPMDBI_LABEL, debuginfo, 0); ++ mi_debuginfo = rpmtsInitIterator_p (ts, (rpmDbiTagVal) RPMDBI_LABEL, debuginfo, 0); + xfree (debuginfo); + if (mi_debuginfo) + { diff --git a/gdb/config.in b/gdb/config.in --- a/gdb/config.in +++ b/gdb/config.in @@ -258,7 +292,7 @@ diff --git a/gdb/config.in b/gdb/config.in diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -775,6 +775,11 @@ TARGET_OBS +@@ -783,6 +783,11 @@ TARGET_OBS ENABLE_BFD_64_BIT_FALSE ENABLE_BFD_64_BIT_TRUE subdirs @@ -270,7 +304,7 @@ diff --git a/gdb/configure b/gdb/configure GDB_DATADIR DEBUGDIR MAKEINFO_EXTRA_FLAGS -@@ -880,6 +885,7 @@ with_gdb_datadir +@@ -912,6 +917,7 @@ with_gdb_datadir with_relocated_sources with_auto_load_dir with_auto_load_safe_path @@ -278,7 +312,7 @@ diff --git a/gdb/configure b/gdb/configure enable_targets enable_64_bit_bfd enable_gdbmi -@@ -959,6 +965,8 @@ PKG_CONFIG_PATH +@@ -992,6 +998,8 @@ PKG_CONFIG_PATH PKG_CONFIG_LIBDIR DEBUGINFOD_CFLAGS DEBUGINFOD_LIBS @@ -286,8 +320,8 @@ diff --git a/gdb/configure b/gdb/configure +RPM_LIBS YACC YFLAGS - XMKMF' -@@ -1635,6 +1643,8 @@ Optional Packages: + ZSTD_CFLAGS +@@ -1678,6 +1686,8 @@ Optional Packages: do not restrict auto-loaded files locations --with-debuginfod Enable debuginfo lookups with debuginfod (auto/yes/no) @@ -296,7 +330,7 @@ diff --git a/gdb/configure b/gdb/configure --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets --with-curses use the curses library instead of the termcap library -@@ -1715,6 +1725,8 @@ Some influential environment variables: +@@ -1761,6 +1771,8 @@ Some influential environment variables: C compiler flags for DEBUGINFOD, overriding pkg-config DEBUGINFOD_LIBS linker flags for DEBUGINFOD, overriding pkg-config @@ -305,7 +339,7 @@ diff --git a/gdb/configure b/gdb/configure YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. -@@ -6634,6 +6646,494 @@ _ACEOF +@@ -17848,6 +17860,495 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 $as_echo "$with_auto_load_safe_path" >&6; } @@ -369,6 +403,7 @@ diff --git a/gdb/configure b/gdb/configure +#include +#include +#include ++#include + +int +main () @@ -485,7 +520,7 @@ diff --git a/gdb/configure b/gdb/configure +extern Header rpmdbNextIterator(rpmdbMatchIterator mi); +extern rpmts rpmtsCreate(void); +extern rpmts rpmtsFree(rpmts ts); -+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, ++extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, + const void * keyp, size_t keylen); + +int @@ -747,7 +782,7 @@ diff --git a/gdb/configure b/gdb/configure +extern Header rpmdbNextIterator(rpmdbMatchIterator mi); +extern rpmts rpmtsCreate(void); +extern rpmts rpmtsFree(rpmts ts); -+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, ++extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, + const void * keyp, size_t keylen); + +int @@ -803,7 +838,7 @@ diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure.ac b/gdb/configure.ac --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -153,6 +153,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir, +@@ -160,6 +160,200 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir, [Directories safe to hold auto-loaded files.]) AC_MSG_RESULT([$with_auto_load_safe_path]) @@ -853,6 +888,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac +#include +#include +#include ++#include + ]], [[ + void *h; + const char *const *rpmverp; @@ -947,7 +983,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac +extern Header rpmdbNextIterator(rpmdbMatchIterator mi); +extern rpmts rpmtsCreate(void); +extern rpmts rpmtsFree(rpmts ts); -+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, ++extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, + const void * keyp, size_t keylen); + ]]), [ + LIBRPM_COMPAT=true @@ -1006,15 +1042,15 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/event-top.c b/gdb/event-top.c --- a/gdb/event-top.c +++ b/gdb/event-top.c -@@ -42,6 +42,7 @@ - #include "gdbsupport/gdb-sigmask.h" +@@ -43,6 +43,7 @@ #include "async-event.h" #include "bt-utils.h" + #include "pager.h" +#include "symfile.h" /* readline include files. */ #include "readline/readline.h" -@@ -374,6 +375,8 @@ display_gdb_prompt (const char *new_prompt) +@@ -391,6 +392,8 @@ display_gdb_prompt (const char *new_prompt) /* Reset the nesting depth used when trace-commands is set. */ reset_command_nest_depth (); @@ -1023,7 +1059,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c /* Do not call the python hook on an explicit prompt change as passed to this function, as this forms a secondary/local prompt, IE, displayed but not set. */ -@@ -800,7 +803,10 @@ command_line_handler (gdb::unique_xmalloc_ptr &&rl) +@@ -852,7 +855,10 @@ command_line_handler (gdb::unique_xmalloc_ptr &&rl) command_handler (cmd); if (ui->prompt_state != PROMPTED) @@ -1038,7 +1074,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c diff --git a/gdb/symfile.h b/gdb/symfile.h --- a/gdb/symfile.h +++ b/gdb/symfile.h -@@ -342,6 +342,7 @@ extern void generic_load (const char *args, int from_tty); +@@ -352,6 +352,7 @@ extern void generic_load (const char *args, int from_tty); /* build-id support. */ extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr); extern void debug_print_missing (const char *binary, const char *debug); diff --git a/0023-gdb-6.6-buildid-locate-solib-missing-ids.patch b/gdb-6.6-buildid-locate-solib-missing-ids.patch similarity index 98% rename from 0023-gdb-6.6-buildid-locate-solib-missing-ids.patch rename to gdb-6.6-buildid-locate-solib-missing-ids.patch index 7dd4fb1688a8dabdaee7b5aaf3b5a711e467c2e0..3b641f8ae18f207de289690d7051bbae847c479c 100644 --- a/0023-gdb-6.6-buildid-locate-solib-missing-ids.patch +++ b/gdb-6.6-buildid-locate-solib-missing-ids.patch @@ -14,7 +14,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1339862 diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c -@@ -1350,14 +1350,28 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1321,14 +1321,28 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, } { @@ -45,7 +45,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c if (build_id != NULL) { char *name, *build_id_filename; -@@ -1372,23 +1386,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1343,23 +1357,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, xfree (name); } else diff --git a/0022-gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch similarity index 92% rename from 0022-gdb-6.6-buildid-locate.patch rename to gdb-6.6-buildid-locate.patch index 1a87c47eb8e146589f6122fe674172b8b470c680..a56ceebdfdf8673ce87ed39cdc2038ed4d6b51dc 100644 --- a/0022-gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -21,7 +21,7 @@ diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h diff --git a/bfd/libbfd.h b/bfd/libbfd.h --- a/bfd/libbfd.h +++ b/bfd/libbfd.h -@@ -120,7 +120,7 @@ static inline char * +@@ -121,7 +121,7 @@ static inline char * bfd_strdup (const char *str) { size_t len = strlen (str) + 1; @@ -59,8 +59,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c +show_build_id_verbose (struct ui_file *file, int from_tty, + struct cmd_list_element *c, const char *value) +{ -+ fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"), -+ value); ++ gdb_printf (file, _("Verbosity level of the build-id locator is %s.\n"), ++ value); +} +/* Locate NT_GNU_BUILD_ID and return its matching debug filename. + FIXME: NOTE decoding should be unified with the BFD core notes decoding. */ @@ -517,9 +517,9 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + if (separate_debug_file_debug) { -- fprintf_unfiltered (gdb_stdlog, _(" Trying %s..."), link.c_str ()); +- gdb_printf (gdb_stdlog, _(" Trying %s..."), link.c_str ()); - gdb_flush (gdb_stdlog); -+ fprintf_unfiltered (gdb_stdlog, _(" Trying %s..."), orig_link.c_str ()); ++ gdb_printf (gdb_stdlog, _(" Trying %s..."), orig_link.c_str ()); + gdb_flush (gdb_stdout); } @@ -539,8 +539,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c - if (filename == NULL) - { - if (separate_debug_file_debug) -- fprintf_unfiltered (gdb_stdlog, -- _(" no, unable to compute real path\n")); +- gdb_printf (gdb_stdlog, +- _(" no, unable to compute real path\n")); + if (seqno > 0) + { + /* There can be multiple build-id symlinks pointing to real files @@ -559,9 +559,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c - if (debug_bfd == NULL) - { - if (separate_debug_file_debug) -- fprintf_unfiltered (gdb_stdlog, _(" no, unable to open.\n")); +- gdb_printf (gdb_stdlog, _(" no, unable to open.\n")); + struct stat statbuf_trash; -+ + +- return {}; + /* `access' automatically dereferences LINK. */ + if (lstat (link.c_str (), &statbuf_trash) != 0) + { @@ -583,7 +584,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + if (filename == NULL) + { + if (separate_debug_file_debug) -+ fprintf_unfiltered (gdb_stdlog, ++ gdb_printf (gdb_stdlog, + _(" no, unable to compute real path\n")); + + continue; @@ -595,17 +596,16 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + if (debug_bfd == NULL) + { + if (separate_debug_file_debug) -+ fprintf_unfiltered (gdb_stdlog, _(" no, unable to open.\n")); - -- return {}; ++ gdb_printf (gdb_stdlog, _(" no, unable to open.\n")); ++ + continue; + } + + if (!build_id_verify (debug_bfd.get(), build_id_len, build_id)) + { + if (separate_debug_file_debug) -+ fprintf_unfiltered (gdb_stdlog, -+ _(" no, build-id does not match.\n")); ++ gdb_printf (gdb_stdlog, ++ _(" no, build-id does not match.\n")); + + continue; + } @@ -620,21 +620,21 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + if (ret_bfd != NULL) { if (separate_debug_file_debug) -- fprintf_unfiltered (gdb_stdlog, _(" no, build-id does not match.\n")); -+ fprintf_unfiltered (gdb_stdlog, _(" yes!\n")); +- gdb_printf (gdb_stdlog, _(" no, build-id does not match.\n")); ++ gdb_printf (gdb_stdlog, _(" yes!\n")); + } + else + { + /* If none of the real files is found report as missing file + always the non-.%u-suffixed file. */ + std::string link0 = orig_link; - -- return {}; ++ + /* If the symlink has target request to install the target. + BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing. + https://bugzilla.redhat.com/show_bug.cgi?id=981154 */ + std::string link0_resolved (link_resolve (link0.c_str (), 0)); -+ + +- return {}; + if (link_all.empty ()) + link_all = link0_resolved; + else @@ -646,7 +646,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c } - if (separate_debug_file_debug) -- fprintf_unfiltered (gdb_stdlog, _(" yes!\n")); +- gdb_printf (gdb_stdlog, _(" yes!\n")); + if (link_return != NULL) + { + if (ret_bfd != NULL) @@ -703,7 +703,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c if (debug_bfd != NULL) return debug_bfd; } -@@ -183,30 +687,649 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id, +@@ -183,30 +687,660 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id, return {}; } @@ -1094,20 +1094,26 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + debug_flush_missing -> missing_rpm_list_print ... + + For this reason, we make sure MISSING_RPM_LIST_ENTRIES is zero -+ *before* calling any print function. */ ++ *before* calling any print function. ++ ++ Note: kevinb/2023-02-22: The code below used to call ++ puts_unfiltered() and printf_unfiltered(), but calls to these ++ functions have been replaced by calls to gdb_printf(). The call ++ chain shown above (probably) used to be the case at one time and ++ hopefully something similar is still the case now that ++ gdb_printf() is being used instead. */ + missing_rpm_list_entries = 0; + -+ printf_unfiltered (_("Missing separate debuginfos, use: %s"), ++ gdb_printf (_("Missing separate debuginfos, use: %s"), +#ifdef DNF_DEBUGINFO_INSTALL + "dnf " +#endif + "debuginfo-install"); + for (const char *el : array) + { -+ puts_unfiltered (" "); -+ puts_unfiltered (el); ++ gdb_printf (" %s", el); + } -+ puts_unfiltered ("\n"); ++ gdb_printf ("\n"); + + while (missing_rpm_list != NULL) + { @@ -1306,16 +1312,21 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + /* We do not collect and flush these messages as each such message + already requires its own separate lines. */ + -+ fprintf_unfiltered (gdb_stdlog, -+ _("Missing separate debuginfo for %s\n"), binary); -+ if (debug != NULL) -+ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"), ++ gdb_printf (gdb_stdlog, ++ _("Missing separate debuginfo for %s.\n"), binary); ++ if (debug != NULL) ++ { ++ if (access (debug, F_OK) == 0) { ++ gdb_printf (gdb_stdlog, _("Try: %s %s\n"), +#ifdef DNF_DEBUGINFO_INSTALL -+ "dnf" ++ "dnf" +#else -+ "yum" ++ "yum" +#endif -+ " --enablerepo='*debug*' install", debug); ++ " --enablerepo='*debug*' install", debug); ++ } else ++ gdb_printf (gdb_stdlog, _("The debuginfo package for this file is probably broken.\n")); ++ } + } +} + @@ -1351,17 +1362,17 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c { const struct bfd_build_id *build_id; -- build_id = build_id_bfd_get (objfile->obfd); +- build_id = build_id_bfd_get (objfile->obfd.get ()); + if (build_id_filename_return) + *build_id_filename_return = NULL; + -+ build_id = build_id_bfd_shdr_get (objfile->obfd); ++ build_id = build_id_bfd_shdr_get (objfile->obfd.get ()); if (build_id != NULL) { if (separate_debug_file_debug) -@@ -214,8 +1337,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) - _("\nLooking for separate debug info (build-id) for " - "%s\n"), objfile_name (objfile)); +@@ -214,8 +1348,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) + _("\nLooking for separate debug info (build-id) for " + "%s\n"), objfile_name (objfile)); + char *build_id_filename_cstr = NULL; gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size, @@ -1382,7 +1393,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c /* Prevent looping on a stripped .debug file. */ if (abfd != NULL && filename_cmp (bfd_get_filename (abfd.get ()), -@@ -228,3 +1364,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) +@@ -228,3 +1375,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) return std::string (); } @@ -1455,7 +1466,7 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h diff --git a/gdb/coffread.c b/gdb/coffread.c --- a/gdb/coffread.c +++ b/gdb/coffread.c -@@ -710,7 +710,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -734,7 +734,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) /* Try to add separate debug file if no symbols table found. */ if (!objfile->has_partial_symbols ()) { @@ -1479,7 +1490,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c #include "inferior.h" #include "infrun.h" #include "symtab.h" -@@ -356,6 +360,8 @@ add_to_thread_list (asection *asect, asection *reg_sect) +@@ -391,6 +395,8 @@ add_to_thread_list (asection *asect, asection *reg_sect) switch_to_thread (thr); /* Yes, make it current. */ } @@ -1488,7 +1499,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c /* Issue a message saying we have no core to debug, if FROM_TTY. */ static void -@@ -392,19 +398,26 @@ core_file_command (const char *filename, int from_tty) +@@ -427,12 +433,14 @@ core_file_command (const char *filename, int from_tty) static void locate_exec_from_corefile_build_id (bfd *abfd, int from_tty) { @@ -1503,8 +1514,9 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c + = build_id_to_exec_bfd (build_id->size, build_id->data, + &build_id_filename); - if (execbfd != nullptr) + if (execbfd == nullptr) { +@@ -460,7 +468,12 @@ locate_exec_from_corefile_build_id (bfd *abfd, int from_tty) exec_file_attach (bfd_get_filename (execbfd.get ()), from_tty); symbol_file_add_main (bfd_get_filename (execbfd.get ()), symfile_add_flag (from_tty ? SYMFILE_VERBOSE : 0)); @@ -1517,7 +1529,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c } /* See gdbcore.h. */ -@@ -1209,4 +1222,11 @@ _initialize_corelow () +@@ -1325,4 +1338,11 @@ _initialize_corelow () maintenance_print_core_file_backed_mappings, _("Print core file's file-backed mappings."), &maintenanceprintlist); @@ -1532,7 +1544,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo -@@ -21524,6 +21524,27 @@ information files. +@@ -22037,6 +22037,27 @@ information files. @end table @@ -1563,16 +1575,16 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c --- a/gdb/dwarf2/index-cache.c +++ b/gdb/dwarf2/index-cache.c -@@ -97,7 +97,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile) +@@ -101,7 +101,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile) return; /* Get build id of objfile. */ -- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd); -+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd); +- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd.get ()); ++ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd.get ()); if (build_id == nullptr) { index_cache_debug ("objfile %s has no build id", -@@ -114,7 +114,8 @@ index_cache::store (dwarf2_per_objfile *per_objfile) +@@ -118,7 +118,8 @@ index_cache::store (dwarf2_per_objfile *per_objfile) if (dwz != nullptr) { @@ -1585,16 +1597,16 @@ diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c -@@ -5476,7 +5476,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner) +@@ -5328,7 +5328,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner) static gdb::array_view get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd) { -- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd); -+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd); +- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd.get ()); ++ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd.get ()); if (build_id == nullptr) return {}; -@@ -5489,7 +5489,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd) +@@ -5341,7 +5341,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd) static gdb::array_view get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz) { @@ -1606,7 +1618,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c diff --git a/gdb/elfread.c b/gdb/elfread.c --- a/gdb/elfread.c +++ b/gdb/elfread.c -@@ -1270,7 +1270,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -1213,7 +1213,9 @@ elf_symfile_read_dwarf2 (struct objfile *objfile, && objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile_backlink == NULL) { @@ -1617,21 +1629,22 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c if (debugfile.empty ()) debugfile = find_separate_debug_file_by_debuglink (objfile); -@@ -1285,7 +1287,7 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) - else +@@ -1229,7 +1231,7 @@ elf_symfile_read_dwarf2 (struct objfile *objfile, { has_dwarf2 = false; -- const struct bfd_build_id *build_id = build_id_bfd_get (objfile->obfd); -+ const struct bfd_build_id *build_id = build_id_bfd_shdr_get (objfile->obfd); + const struct bfd_build_id *build_id +- = build_id_bfd_get (objfile->obfd.get ()); ++ = build_id_bfd_shdr_get (objfile->obfd.get ()); + const char *filename = bfd_get_filename (objfile->obfd.get ()); if (build_id != nullptr) - { -@@ -1310,6 +1312,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -1256,6 +1258,11 @@ elf_symfile_read_dwarf2 (struct objfile *objfile, has_dwarf2 = true; } } + /* Check if any separate debug info has been extracted out. */ -+ else if (bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink") ++ else if (bfd_get_section_by_name (objfile->obfd.get (), ++ ".gnu_debuglink") + != NULL) + debug_print_missing (objfile_name (objfile), build_id_filename.get ()); } @@ -1640,7 +1653,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c diff --git a/gdb/exec.c b/gdb/exec.c --- a/gdb/exec.c +++ b/gdb/exec.c -@@ -238,7 +238,7 @@ validate_exec_file (int from_tty) +@@ -237,7 +237,7 @@ validate_exec_file (int from_tty) current_exec_file = get_exec_file (0); const bfd_build_id *exec_file_build_id @@ -1649,7 +1662,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c if (exec_file_build_id != nullptr) { /* Prepend the target prefix, to force gdb_bfd_open to open the -@@ -251,7 +251,7 @@ validate_exec_file (int from_tty) +@@ -250,7 +250,7 @@ validate_exec_file (int from_tty) if (abfd != nullptr) { const bfd_build_id *target_exec_file_build_id @@ -1661,7 +1674,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c diff --git a/gdb/objfiles.h b/gdb/objfiles.h --- a/gdb/objfiles.h +++ b/gdb/objfiles.h -@@ -769,6 +769,10 @@ struct objfile +@@ -786,6 +786,10 @@ struct objfile bool skip_jit_symbol_lookup = false; }; @@ -1675,24 +1688,24 @@ diff --git a/gdb/objfiles.h b/gdb/objfiles.h diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c --- a/gdb/python/py-objfile.c +++ b/gdb/python/py-objfile.c -@@ -132,7 +132,7 @@ objfpy_get_build_id (PyObject *self, void *closure) +@@ -158,7 +158,7 @@ objfpy_get_build_id (PyObject *self, void *closure) try { -- build_id = build_id_bfd_get (objfile->obfd); -+ build_id = build_id_bfd_shdr_get (objfile->obfd); +- build_id = build_id_bfd_get (objfile->obfd.get ()); ++ build_id = build_id_bfd_shdr_get (objfile->obfd.get ()); } catch (const gdb_exception &except) { -@@ -600,7 +600,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id) - /* Don't return separate debug files. */ - if (objfile->separate_debug_objfile_backlink != NULL) - continue; -- obfd_build_id = build_id_bfd_get (objfile->obfd); -+ obfd_build_id = build_id_bfd_shdr_get (objfile->obfd); - if (obfd_build_id == NULL) - continue; - if (objfpy_build_id_matches (obfd_build_id, build_id)) +@@ -629,7 +629,7 @@ gdbpy_lookup_objfile (PyObject *self, PyObject *args, PyObject *kw) + if (obfd == nullptr) + return 0; + +- const bfd_build_id *obfd_build_id = build_id_bfd_get (obfd); ++ const bfd_build_id *obfd_build_id = build_id_bfd_shdr_get (obfd); + if (obfd_build_id == nullptr) + return 0; + diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1702,9 +1715,9 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c #include "probe.h" +#include "build-id.h" - static struct link_map_offsets *svr4_fetch_link_map_offsets (void); - static int svr4_have_link_map_offsets (void); -@@ -1248,9 +1249,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, + #include + +@@ -1319,9 +1320,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, continue; } @@ -1762,19 +1775,19 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c diff --git a/gdb/source.c b/gdb/source.c --- a/gdb/source.c +++ b/gdb/source.c -@@ -1199,7 +1199,7 @@ open_source_file (struct symtab *s) - srcpath += s->filename; +@@ -1196,7 +1196,7 @@ open_source_file (struct symtab *s) } -- const struct bfd_build_id *build_id = build_id_bfd_get (ofp->obfd); -+ const struct bfd_build_id *build_id = build_id_bfd_shdr_get (ofp->obfd); + const struct bfd_build_id *build_id +- = build_id_bfd_get (ofp->obfd.get ()); ++ = build_id_bfd_shdr_get (ofp->obfd.get ()); /* Query debuginfod for the source file. */ if (build_id != nullptr && !srcpath.empty ()) diff --git a/gdb/symfile.h b/gdb/symfile.h --- a/gdb/symfile.h +++ b/gdb/symfile.h -@@ -332,12 +332,18 @@ bool expand_symtabs_matching +@@ -342,12 +342,18 @@ bool expand_symtabs_matching void map_symbol_filenames (gdb::function_view fun, bool need_fullname); @@ -1796,7 +1809,7 @@ diff --git a/gdb/symfile.h b/gdb/symfile.h diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp -@@ -343,3 +343,33 @@ gdb_test_multiple "core-file $corefile" $test { +@@ -349,3 +349,33 @@ gdb_test_multiple "core-file $corefile" $test { pass $test } } @@ -1857,17 +1870,17 @@ diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp -@@ -141,7 +141,8 @@ if ![info exists INTERNAL_GDBFLAGS] { +@@ -217,7 +217,8 @@ if ![info exists INTERNAL_GDBFLAGS] { + "-nw" \ "-nx" \ - "-data-directory $BUILD_DATA_DIRECTORY" \ {-iex "set height 0"} \ - {-iex "set width 0"}]] + {-iex "set width 0"} \ + {-iex "set build-id-verbose 0"}]] - } - # The variable gdb_prompt is a regexp which matches the gdb prompt. -@@ -2200,6 +2201,17 @@ proc default_gdb_start { } { + set INTERNAL_GDBFLAGS [append_gdb_data_directory_option $INTERNAL_GDBFLAGS] + } +@@ -2349,6 +2350,17 @@ proc default_gdb_start { } { } } @@ -1888,7 +1901,7 @@ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp -@@ -322,6 +322,16 @@ proc default_mi_gdb_start { args } { +@@ -330,6 +330,16 @@ proc default_mi_gdb_start { { flags {} } } { warning "Couldn't set the width to 0." } } diff --git a/0017-gdb-6.6-bz229517-gcore-without-terminal.patch b/gdb-6.6-bz229517-gcore-without-terminal.patch similarity index 100% rename from 0017-gdb-6.6-bz229517-gcore-without-terminal.patch rename to gdb-6.6-bz229517-gcore-without-terminal.patch diff --git a/0019-gdb-6.6-bz237572-ppc-atomic-sequence-test.patch b/gdb-6.6-bz237572-ppc-atomic-sequence-test.patch similarity index 100% rename from 0019-gdb-6.6-bz237572-ppc-atomic-sequence-test.patch rename to gdb-6.6-bz237572-ppc-atomic-sequence-test.patch diff --git a/0018-gdb-6.6-testsuite-timeouts.patch b/gdb-6.6-testsuite-timeouts.patch similarity index 100% rename from 0018-gdb-6.6-testsuite-timeouts.patch rename to gdb-6.6-testsuite-timeouts.patch diff --git a/0026-gdb-6.7-ppc-clobbered-registers-O2-test.patch b/gdb-6.7-ppc-clobbered-registers-O2-test.patch similarity index 100% rename from 0026-gdb-6.7-ppc-clobbered-registers-O2-test.patch rename to gdb-6.7-ppc-clobbered-registers-O2-test.patch diff --git a/0035-gdb-6.8-bz466901-backtrace-full-prelinked.patch b/gdb-6.8-bz466901-backtrace-full-prelinked.patch similarity index 100% rename from 0035-gdb-6.8-bz466901-backtrace-full-prelinked.patch rename to gdb-6.8-bz466901-backtrace-full-prelinked.patch diff --git a/0077-gdb-Fix-CVE-2023-39128.patch b/gdb-Fix-CVE-2023-39128.patch similarity index 100% rename from 0077-gdb-Fix-CVE-2023-39128.patch rename to gdb-Fix-CVE-2023-39128.patch diff --git a/0078-gdb-Fix-CVE-2023-39129.patch b/gdb-Fix-CVE-2023-39129.patch similarity index 100% rename from 0078-gdb-Fix-CVE-2023-39129.patch rename to gdb-Fix-CVE-2023-39129.patch diff --git a/0079-gdb-Fix-CVE-2023-39130.patch b/gdb-Fix-CVE-2023-39130.patch similarity index 85% rename from 0079-gdb-Fix-CVE-2023-39130.patch rename to gdb-Fix-CVE-2023-39130.patch index 339754409501093962eebbef0d5aa320190ada33..1cb3d06ee9ebc2d0b6dfc3b026c421846337bf83 100644 --- a/0079-gdb-Fix-CVE-2023-39130.patch +++ b/gdb-Fix-CVE-2023-39130.patch @@ -1,8 +1,20 @@ +From 13b30fe2baaa49c80764e39dc108ffb32589632d Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Wed, 1 Nov 2023 07:23:32 +0000 +Subject: [PATCH] gdb Fix CVE-2023-39130 + +--- + gdb/coff-pe-read.c | 114 +++++++++++++++++++++++++++++---------------- + gdb/coffread.c | 25 ++-------- + gdb/dbxread.c | 7 +-- + gdb/xcoffread.c | 5 +- + 4 files changed, 84 insertions(+), 67 deletions(-) + diff --git a/gdb/coff-pe-read.c b/gdb/coff-pe-read.c -index c2dc3cd..18c3c0a 100644 +index 2b89e8a..e87f9b3 100644 --- a/gdb/coff-pe-read.c +++ b/gdb/coff-pe-read.c -@@ -291,23 +291,31 @@ read_pe_truncate_name (char *dll_name) +@@ -257,23 +257,31 @@ read_pe_truncate_name (char *dll_name) /* Low-level support functions, direct from the ld module pe-dll.c. */ static unsigned int @@ -41,7 +53,7 @@ index c2dc3cd..18c3c0a 100644 } static unsigned int -@@ -323,7 +331,7 @@ pe_as32 (void *ptr) +@@ -289,7 +297,7 @@ pe_as32 (void *ptr) { unsigned char *b = (unsigned char *) ptr; @@ -50,7 +62,7 @@ index c2dc3cd..18c3c0a 100644 } /* Read the (non-debug) export symbol table from a portable -@@ -376,37 +384,49 @@ read_pe_exported_syms (minimal_symbol_reader &reader, +@@ -338,37 +346,49 @@ read_pe_exported_syms (minimal_symbol_reader &reader, || strcmp (target, "pei-i386") == 0 || strcmp (target, "pe-arm-wince-little") == 0 || strcmp (target, "pei-arm-wince-little") == 0); @@ -58,7 +70,7 @@ index c2dc3cd..18c3c0a 100644 + /* Possibly print a debug message about DLL not having a valid format. */ + auto maybe_print_debug_msg = [&] () -> void { + if (debug_coff_pe_read) -+ fprintf_unfiltered (gdb_stdlog, _("%s doesn't appear to be a DLL\n"), ++ gdb_printf (gdb_stdlog, _("%s doesn't appear to be a DLL\n"), + bfd_get_filename (dll)); + }; + @@ -115,7 +127,7 @@ index c2dc3cd..18c3c0a 100644 expptr = 0; export_size = 0; -@@ -415,12 +435,14 @@ read_pe_exported_syms (minimal_symbol_reader &reader, +@@ -377,12 +397,14 @@ read_pe_exported_syms (minimal_symbol_reader &reader, { char sname[8]; unsigned long secptr1 = secptr + 40 * i; @@ -135,7 +147,7 @@ index c2dc3cd..18c3c0a 100644 if ((strcmp (sname, ".edata") == 0) || (vaddr <= export_opthdrrva && export_opthdrrva < vaddr + vsize)) -@@ -461,16 +483,18 @@ read_pe_exported_syms (minimal_symbol_reader &reader, +@@ -423,16 +445,18 @@ read_pe_exported_syms (minimal_symbol_reader &reader, for (i = 0; i < nsections; i++) { unsigned long secptr1 = secptr + 40 * i; @@ -159,7 +171,7 @@ index c2dc3cd..18c3c0a 100644 sec_name[SCNNMLEN] = '\0'; sectix = read_pe_section_index (sec_name); -@@ -509,8 +533,9 @@ read_pe_exported_syms (minimal_symbol_reader &reader, +@@ -471,8 +495,9 @@ read_pe_exported_syms (minimal_symbol_reader &reader, gdb::def_vector expdata_storage (export_size); expdata = expdata_storage.data (); @@ -171,7 +183,7 @@ index c2dc3cd..18c3c0a 100644 erva = expdata - export_rva; nexp = pe_as32 (expdata + 24); -@@ -658,20 +683,27 @@ pe_text_section_offset (struct bfd *abfd) +@@ -629,20 +654,27 @@ pe_text_section_offset (struct bfd *abfd) } /* Get pe_header, optional header and numbers of sections. */ @@ -205,52 +217,11 @@ index c2dc3cd..18c3c0a 100644 sname[SCNNMLEN] = '\0'; if (strcmp (sname, ".text") == 0) return vaddr; -diff --git a/gdb/dbxread.c b/gdb/dbxread.c -index 165040d..b07e296 100644 ---- a/gdb/dbxread.c -+++ b/gdb/dbxread.c -@@ -808,7 +808,8 @@ stabs_seek (int sym_offset) - symbuf_left -= sym_offset; - } - else -- bfd_seek (symfile_bfd, sym_offset, SEEK_CUR); -+ if (bfd_seek (symfile_bfd, sym_offset, SEEK_CUR) != 0) -+ perror_with_name (bfd_get_filename (symfile_bfd)); - } - - #define INTERNALIZE_SYMBOL(intern, extern, abfd) \ -@@ -2120,8 +2121,8 @@ dbx_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile) - symbol_size = SYMBOL_SIZE (pst); - - /* Read in this file's symbols. */ -- bfd_seek (objfile->obfd, SYMBOL_OFFSET (pst), SEEK_SET); -- read_ofile_symtab (objfile, pst); -+ if (bfd_seek (objfile->obfd, SYMBOL_OFFSET (pst), SEEK_SET) == 0) -+ read_ofile_symtab (objfile, pst); - } - - pst->readin = true; -diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c -index f6db7f9..8085a07 100644 ---- a/gdb/xcoffread.c -+++ b/gdb/xcoffread.c -@@ -865,8 +865,9 @@ enter_line_range (struct subfile *subfile, unsigned beginoffset, - - while (curoffset <= limit_offset) - { -- bfd_seek (abfd, curoffset, SEEK_SET); -- bfd_bread (ext_lnno, linesz, abfd); -+ if (bfd_seek (abfd, curoffset, SEEK_SET) != 0 -+ || bfd_bread (ext_lnno, linesz, abfd) != linesz) -+ return; - bfd_coff_swap_lineno_in (abfd, ext_lnno, &int_lnno); - - /* Find the address this line represents. */ diff --git a/gdb/coffread.c b/gdb/coffread.c -index fc74610..c69c66a 100644 +index db42717..fb078f0 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c -@@ -691,8 +691,6 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -717,8 +717,6 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) /* FIXME: dubious. Why can't we use something normal like bfd_get_section_contents? */ @@ -259,7 +230,7 @@ index fc74610..c69c66a 100644 stabstrsize = bfd_section_size (info->stabstrsect); coffstab_build_psymtabs (objfile, -@@ -782,22 +780,6 @@ coff_symtab_read (minimal_symbol_reader &reader, +@@ -806,22 +804,6 @@ coff_symtab_read (minimal_symbol_reader &reader, scoped_free_pendings free_pending; @@ -277,19 +248,17 @@ index fc74610..c69c66a 100644 - FIXME: Find out if this has been reported to Sun, whether it has - been fixed in a later release, etc. */ - -- bfd_seek (objfile->obfd, 0, 0); +- bfd_seek (objfile->obfd.get (), 0, 0); - /* Position to read the symbol table. */ - val = bfd_seek (objfile->obfd, symtab_offset, 0); + val = bfd_seek (objfile->obfd.get (), symtab_offset, 0); if (val < 0) -@@ -1287,13 +1269,14 @@ init_stringtab (bfd *abfd, file_ptr offset, gdb::unique_xmalloc_ptr *stora - if (bfd_seek (abfd, offset, 0) < 0) +@@ -1305,12 +1287,13 @@ init_stringtab (bfd *abfd, file_ptr offset, gdb::unique_xmalloc_ptr *stora return -1; -- val = bfd_bread ((char *) lengthbuf, sizeof lengthbuf, abfd); + val = bfd_bread ((char *) lengthbuf, sizeof lengthbuf, abfd); - length = bfd_h_get_32 (symfile_bfd, lengthbuf); - -+ val = bfd_bread ((char *) lengthbuf, sizeof lengthbuf, abfd); /* If no string table is needed, then the file may end immediately after the symbols. Just return with `stringtab' set to null. */ - if (val != sizeof lengthbuf || length < sizeof lengthbuf) @@ -301,3 +270,47 @@ index fc74610..c69c66a 100644 storage->reset ((char *) xmalloc (length)); stringtab = storage->get (); +diff --git a/gdb/dbxread.c b/gdb/dbxread.c +index ab0734f..903159f 100644 +--- a/gdb/dbxread.c ++++ b/gdb/dbxread.c +@@ -809,7 +809,8 @@ stabs_seek (int sym_offset) + symbuf_left -= sym_offset; + } + else +- bfd_seek (symfile_bfd, sym_offset, SEEK_CUR); ++ if (bfd_seek (symfile_bfd, sym_offset, SEEK_CUR) != 0) ++ perror_with_name (bfd_get_filename (symfile_bfd)); + } + + #define INTERNALIZE_SYMBOL(intern, extern, abfd) \ +@@ -2133,8 +2134,8 @@ dbx_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile) + symbol_size = SYMBOL_SIZE (pst); + + /* Read in this file's symbols. */ +- bfd_seek (objfile->obfd.get (), SYMBOL_OFFSET (pst), SEEK_SET); +- read_ofile_symtab (objfile, pst); ++ if (bfd_seek (objfile->obfd.get (), SYMBOL_OFFSET (pst), SEEK_SET) == 0) ++ read_ofile_symtab (objfile, pst); + } + + pst->readin = true; +diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c +index 52ae3ae..480b0e8 100644 +--- a/gdb/xcoffread.c ++++ b/gdb/xcoffread.c +@@ -780,8 +780,9 @@ enter_line_range (struct subfile *subfile, unsigned beginoffset, + + while (curoffset <= limit_offset) + { +- bfd_seek (abfd, curoffset, SEEK_SET); +- bfd_bread (ext_lnno, linesz, abfd); ++ if (bfd_seek (abfd, curoffset, SEEK_SET) != 0 ++ || bfd_bread (ext_lnno, linesz, abfd) != linesz) ++ return; + bfd_coff_swap_lineno_in (abfd, ext_lnno, &int_lnno); + + /* Find the address this line represents. */ +-- +2.40.1 + diff --git a/gdb-add-index.patch b/gdb-add-index.patch new file mode 100644 index 0000000000000000000000000000000000000000..50391721beacd16ac73c1b8af6a23c96a2393598 --- /dev/null +++ b/gdb-add-index.patch @@ -0,0 +1,77 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-add-index.patch + +;; Update gdb-add-index.sh such that, when the GDB environment +;; variable is not set, the script is smarter than just looking for +;; 'gdb' in the $PATH. +;; +;; The actual search order is now: /usr/bin/gdb.minimal, gdb (in the +;; $PATH), then /usr/libexec/gdb. +;; +;; For the rationale of looking for gdb.minimal see: +;; +;; https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot +;; +;;=fedora + +diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh +--- a/gdb/contrib/gdb-add-index.sh ++++ b/gdb/contrib/gdb-add-index.sh +@@ -16,14 +16,52 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + +-# This program assumes gdb and objcopy are in $PATH. +-# If not, or you want others, pass the following in the environment +-GDB=${GDB:=gdb} ++# This program assumes objcopy and readelf are in $PATH. If not, or ++# you want others, pass the following in the environment + OBJCOPY=${OBJCOPY:=objcopy} + READELF=${READELF:=readelf} + + myname="${0##*/}" + ++# For GDB itself we need to be a little smarter. If GDB is set in the ++# environment then we will use that. But if GDB is not set in the ++# environment then we have a couple of options that we need to check ++# through. ++# ++# Our default choice is for /usr/bin/gdb.minimal. For an explanation ++# of why this is chosen, check out: ++# https://bugzilla.redhat.com/show_bug.cgi?id=1695015 ++# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot ++# ++# If gdb.minimal is not found then we look for a 'gdb' executable on ++# the path. ++# ++# And finally, we check for /usr/libexec/gdb. ++# ++# If none of those result in a useable GDB then we give an error and ++# exit. ++if test -z "$GDB"; then ++ for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb; do ++ if ! which "$possible_gdb" >/dev/null 2>&1; then ++ continue ++ fi ++ ++ possible_gdb=$(which "$possible_gdb") ++ ++ if ! test -x "$possible_gdb"; then ++ continue ++ fi ++ ++ GDB="$possible_gdb" ++ break ++ done ++ ++ if test -z "$GDB"; then ++ echo "$myname: Failed to find a useable GDB binary" 1>&2 ++ exit 1 ++ fi ++fi ++ + dwarf5="" + if [ "$1" = "-dwarf-5" ]; then + dwarf5="$1" diff --git a/0041-gdb-archer-next-over-throw-cxx-exec.patch b/gdb-archer-next-over-throw-cxx-exec.patch similarity index 100% rename from 0041-gdb-archer-next-over-throw-cxx-exec.patch rename to gdb-archer-next-over-throw-cxx-exec.patch diff --git a/gdb-binutils29988-read_indexed_address.patch b/gdb-binutils29988-read_indexed_address.patch new file mode 100644 index 0000000000000000000000000000000000000000..af44d1298ae1a9c93809988340536b143163b5c7 --- /dev/null +++ b/gdb-binutils29988-read_indexed_address.patch @@ -0,0 +1,24 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Wed, 11 Jan 2023 12:13:46 +0000 +Subject: gdb-binutils29988-read_indexed_address.patch + +;; Backport "Fix a potential illegal memory access in the BFD library..." +;; (Nick Clifton, binutils/29988) + + PR 29988 + * dwarf2.c (read_indexed_address): Fix check for an out of range + offset. + +diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c +--- a/bfd/dwarf2.c ++++ b/bfd/dwarf2.c +@@ -1412,7 +1412,7 @@ read_indexed_address (uint64_t idx, struct comp_unit *unit) + offset += unit->dwarf_addr_offset; + if (offset < unit->dwarf_addr_offset + || offset > file->dwarf_addr_size +- || file->dwarf_addr_size - offset < unit->offset_size) ++ || file->dwarf_addr_size - offset < unit->addr_size) + return 0; + + info_ptr = file->dwarf_addr_buffer + offset; diff --git a/gdb-bz2196395-debuginfod-legacy-openssl-crash.patch b/gdb-bz2196395-debuginfod-legacy-openssl-crash.patch new file mode 100644 index 0000000000000000000000000000000000000000..452fe580cf934961cdd258b2d41f22102b99b2da --- /dev/null +++ b/gdb-bz2196395-debuginfod-legacy-openssl-crash.patch @@ -0,0 +1,188 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Tue, 20 Jun 2023 09:46:35 +0100 +Subject: gdb-bz2196395-debuginfod-legacy-openssl-crash.patch + +;; Backport upstream commit f3eee5861743d635 to fix a crash triggered +;; when debuginfod makes use of particular openssl settings. + +gdb/debuginfod: cleanup debuginfod earlier + +A GDB crash was discovered on Fedora GDB that was tracked back to an +issue with the way that debuginfod is cleaned up. + +The bug was reported on Fedora 37, 38, and 39. Here are the steps to +reproduce: + +1. The file /etc/ssl/openssl.cnf contains the following lines: + + [provider_sect] + default = default_sect + ##legacy = legacy_sect + ## + [default_sect] + activate = 1 + + ##[legacy_sect] + ##activate = 1 + + The bug will occur when the '##' characters are removed so that the + lines in question look like this: + + [provider_sect] + default = default_sect + legacy = legacy_sect + + [default_sect] + activate = 1 + + [legacy_sect] + activate = 1 + +2. Clean up any existing debuginfod cache data: + + > rm -rf $HOME/.cache/debuginfod_client + +3. Run GDB: + + > gdb -nx -q -iex 'set trace-commands on' \ + -iex 'set debuginfod enabled on' \ + -iex 'set confirm off' \ + -ex 'start' -ex 'quit' /bin/ls + +set debuginfod enabled on + +set confirm off + Reading symbols from /bin/ls... + Downloading separate debug info for /usr/bin/ls + ... snip ... + Temporary breakpoint 1, main (argc=1, argv=0x7fffffffde38) at ../src/ls.c:1646 + 1646 { + +quit + + Fatal signal: Segmentation fault + ----- Backtrace ----- + ... snip ... + +So GDB ends up crashing during exit. + +What's happening is that when debuginfod is initialised +debuginfod_begin is called (this is in the debuginfod library), this +in turn sets up libcurl, which makes use of openssl. Somewhere during +this setup process an at_exit function is registered to cleanup some +state. + +Back in GDB the debuginfod_client object is managed using this code: + + /* Deleter for a debuginfod_client. */ + + struct debuginfod_client_deleter + { + void operator() (debuginfod_client *c) + { + debuginfod_end (c); + } + }; + + using debuginfod_client_up + = std::unique_ptr; + +And then a global debuginfod_client_up is created to hold a pointer to +the debuginfod_client object. As a global this will be cleaned up +using the standard C++ global object destructor mechanism, which is +run after the at_exit handlers. + +However, it is expected that when debuginfod_end is called the +debuginfod_client object will still be in a usable state, that is, we +don't expect the at_exit handlers to have run and started cleaning up +the library state. + +To fix this issue we need to ensure that debuginfod_end is called +before the at_exit handlers have a chance to run. + +This commit removes the debuginfod_client_up type, and instead has GDB +hold a raw pointer to the debuginfod_client object. We then make use +of GDB's make_final_cleanup to register a function that will call +debuginfod_end. + +As GDB's final cleanups are called before exit is called, this means +that debuginfod_end will be called before the at_exit handlers are +called, and the crash identified above is resolved. + +It's not obvious how this issue can easily be tested for. The bug does +not appear to manifest when using a local debuginfod server, so we'd +need to setup something more involved. For now I'm proposing this +patch without any associated tests. + +diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c +--- a/gdb/debuginfod-support.c ++++ b/gdb/debuginfod-support.c +@@ -96,20 +96,6 @@ struct user_data + ui_out::progress_update progress; + }; + +-/* Deleter for a debuginfod_client. */ +- +-struct debuginfod_client_deleter +-{ +- void operator() (debuginfod_client *c) +- { +- debuginfod_end (c); +- } +-}; +- +-using debuginfod_client_up +- = std::unique_ptr; +- +- + /* Convert SIZE into a unit suitable for use with progress updates. + SIZE should in given in bytes and will be converted into KB, MB, GB + or remain unchanged. UNIT will be set to "B", "KB", "MB" or "GB" +@@ -180,20 +166,45 @@ progressfn (debuginfod_client *c, long cur, long total) + return 0; + } + ++/* Cleanup ARG, which is a debuginfod_client pointer. */ ++ ++static void ++cleanup_debuginfod_client (void *arg) ++{ ++ debuginfod_client *client = static_cast (arg); ++ debuginfod_end (client); ++} ++ ++/* Return a pointer to the single global debuginfod_client, initialising it ++ first if needed. */ ++ + static debuginfod_client * + get_debuginfod_client () + { +- static debuginfod_client_up global_client; ++ static debuginfod_client *global_client = nullptr; + + if (global_client == nullptr) + { +- global_client.reset (debuginfod_begin ()); ++ global_client = debuginfod_begin (); + + if (global_client != nullptr) +- debuginfod_set_progressfn (global_client.get (), progressfn); ++ { ++ /* It is important that we cleanup the debuginfod_client object ++ before calling exit. Some of the libraries used by debuginfod ++ make use of at_exit handlers to perform cleanup. ++ ++ If we wrapped the debuginfod_client in a unique_ptr and relied ++ on its destructor to cleanup then this would be run as part of ++ the global C++ object destructors, which is after the at_exit ++ handlers, which is too late. ++ ++ So instead, we make use of GDB's final cleanup mechanism. */ ++ make_final_cleanup (cleanup_debuginfod_client, global_client); ++ debuginfod_set_progressfn (global_client, progressfn); ++ } + } + +- return global_client.get (); ++ return global_client; + } + + /* Check if debuginfod is enabled. If configured to do so, ask the user diff --git a/gdb-bz2237392-dwarf-obstack-allocation.patch b/gdb-bz2237392-dwarf-obstack-allocation.patch new file mode 100644 index 0000000000000000000000000000000000000000..424cad3eda77888d4ba3527eb13a4fbab1c34e5a --- /dev/null +++ b/gdb-bz2237392-dwarf-obstack-allocation.patch @@ -0,0 +1,68 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Thu, 14 Sep 2023 13:06:26 +0100 +Subject: gdb-bz2237392-dwarf-obstack-allocation.patch + +;; Backport upstream commit 54392c4df604f20 to fix an incorrect +;; obstack allocation that wold lead to memory corruption. + +gdb: fix buffer overflow in DWARF reader + +In this commit: + + commit 48ac197b0c209ccf1f2de9704eb6cdf7c5c73a8e + Date: Fri Nov 19 10:12:44 2021 -0700 + + Handle multiple addresses in call_site_target + +a buffer overflow bug was introduced when the following code was +added: + + CORE_ADDR *saved = XOBNEWVAR (&objfile->objfile_obstack, CORE_ADDR, + addresses.size ()); + std::copy (addresses.begin (), addresses.end (), saved); + +The definition of XOBNEWVAR is (from libiberty.h): + + #define XOBNEWVAR(O, T, S) ((T *) obstack_alloc ((O), (S))) + +So 'saved' is going to point to addresses.size () bytes of memory, +however, the std::copy will write addresses.size () number of +CORE_ADDR sized entries to the address pointed to by 'saved', this is +going to result in memory corruption. + +The mistake is that we should have used XOBNEWVEC, which allocates a +vector of entries, the definition of XOBNEWVEC is: + + #define XOBNEWVEC(O, T, N) \ + ((T *) obstack_alloc ((O), sizeof (T) * (N))) + +Which means we will have set aside enough space to create a copy of +the contents of the addresses vector. + +I'm not sure how to create a test for this problem, this issue cropped +up when debugging a particular i686 built binary, which just happened +to trigger a glibc assertion (likely due to random memory corruption), +debugging the same binary built for x86-64 appeared to work just fine. + +Using valgrind on the failing GDB binary pointed straight to the cause +of the problem, and with this patch in place there are no longer +valgrind errors in this area. + +If anyone has ideas for a test I'm happy to work on something. + +Co-Authored-By: Keith Seitz +Approved-By: Tom Tromey + +diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c +--- a/gdb/dwarf2/read.c ++++ b/gdb/dwarf2/read.c +@@ -12506,7 +12506,7 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu) + std::vector addresses; + dwarf2_ranges_read_low_addrs (ranges_offset, target_cu, + target_die->tag, addresses); +- CORE_ADDR *saved = XOBNEWVAR (&objfile->objfile_obstack, CORE_ADDR, ++ CORE_ADDR *saved = XOBNEWVEC (&objfile->objfile_obstack, CORE_ADDR, + addresses.size ()); + std::copy (addresses.begin (), addresses.end (), saved); + call_site->target.set_loc_array (addresses.size (), saved); diff --git a/gdb-bz2237515-debuginfod-double-free.patch b/gdb-bz2237515-debuginfod-double-free.patch new file mode 100644 index 0000000000000000000000000000000000000000..9d7263955e277cf7b5bb342be5ff3733f2fc4e70 --- /dev/null +++ b/gdb-bz2237515-debuginfod-double-free.patch @@ -0,0 +1,102 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Tom Tromey +Date: Tue, 6 Dec 2022 12:07:12 -0700 +Subject: gdb-bz2237515-debuginfod-double-free.patch + +;; Backport upstream commit f96328accde1e63 to fix a potential double +;; free issue in the debuginfod code. + +Avoid double-free with debuginfod + +PR gdb/29257 points out a possible double free when debuginfod is in +use. Aside from some ugly warts in the symbol code (an ongoing +issue), the underlying issue in this particular case is that elfread.c +seems to assume that symfile_bfd_open will return NULL on error, +whereas in reality it throws an exception. As this code isn't +prepared for an exception, bad things result. + +This patch fixes the problem by introducing a non-throwing variant of +symfile_bfd_open and using it in the affected places. + +Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29257 + +diff --git a/gdb/elfread.c b/gdb/elfread.c +--- a/gdb/elfread.c ++++ b/gdb/elfread.c +@@ -1222,10 +1222,12 @@ elf_symfile_read_dwarf2 (struct objfile *objfile, + + if (!debugfile.empty ()) + { +- gdb_bfd_ref_ptr debug_bfd (symfile_bfd_open (debugfile.c_str ())); ++ gdb_bfd_ref_ptr debug_bfd ++ (symfile_bfd_open_no_error (debugfile.c_str ())); + +- symbol_file_add_separate (debug_bfd, debugfile.c_str (), +- symfile_flags, objfile); ++ if (debug_bfd != nullptr) ++ symbol_file_add_separate (debug_bfd, debugfile.c_str (), ++ symfile_flags, objfile); + } + else + { +@@ -1245,13 +1247,12 @@ elf_symfile_read_dwarf2 (struct objfile *objfile, + if (fd.get () >= 0) + { + /* File successfully retrieved from server. */ +- gdb_bfd_ref_ptr debug_bfd (symfile_bfd_open (symfile_path.get ())); ++ gdb_bfd_ref_ptr debug_bfd ++ (symfile_bfd_open_no_error (symfile_path.get ())); + +- if (debug_bfd == nullptr) +- warning (_("File \"%s\" from debuginfod cannot be opened as bfd"), +- filename); +- else if (build_id_verify (debug_bfd.get (), build_id->size, +- build_id->data)) ++ if (debug_bfd != nullptr ++ && build_id_verify (debug_bfd.get (), build_id->size, ++ build_id->data)) + { + symbol_file_add_separate (debug_bfd, symfile_path.get (), + symfile_flags, objfile); +diff --git a/gdb/symfile.c b/gdb/symfile.c +--- a/gdb/symfile.c ++++ b/gdb/symfile.c +@@ -1744,6 +1744,23 @@ symfile_bfd_open (const char *name) + return sym_bfd; + } + ++/* See symfile.h. */ ++ ++gdb_bfd_ref_ptr ++symfile_bfd_open_no_error (const char *name) noexcept ++{ ++ try ++ { ++ return symfile_bfd_open (name); ++ } ++ catch (const gdb_exception_error &err) ++ { ++ warning ("%s", err.what ()); ++ } ++ ++ return nullptr; ++} ++ + /* Return the section index for SECTION_NAME on OBJFILE. Return -1 if + the section was not found. */ + +diff --git a/gdb/symfile.h b/gdb/symfile.h +--- a/gdb/symfile.h ++++ b/gdb/symfile.h +@@ -269,6 +269,11 @@ extern void set_initial_language (void); + + extern gdb_bfd_ref_ptr symfile_bfd_open (const char *); + ++/* Like symfile_bfd_open, but will not throw an exception on error. ++ Instead, it issues a warning and returns nullptr. */ ++ ++extern gdb_bfd_ref_ptr symfile_bfd_open_no_error (const char *) noexcept; ++ + extern int get_section_index (struct objfile *, const char *); + + extern int print_symbol_loading_p (int from_tty, int mainline, int full); diff --git a/0045-gdb-bz634108-solib_address.patch b/gdb-bz634108-solib_address.patch similarity index 100% rename from 0045-gdb-bz634108-solib_address.patch rename to gdb-bz634108-solib_address.patch diff --git a/0069-gdb-container-rh-pkg.patch b/gdb-container-rh-pkg.patch similarity index 94% rename from 0069-gdb-container-rh-pkg.patch rename to gdb-container-rh-pkg.patch index 929ff7da36145e60a0f66f941fa86af04b00f693..aac8ac8329b67c9cc3a1895f4de5890401317bba 100644 --- a/0069-gdb-container-rh-pkg.patch +++ b/gdb-container-rh-pkg.patch @@ -9,7 +9,7 @@ Subject: gdb-container-rh-pkg.patch diff --git a/gdb/remote.c b/gdb/remote.c --- a/gdb/remote.c +++ b/gdb/remote.c -@@ -14291,7 +14291,17 @@ remote_target::pid_to_exec_file (int pid) +@@ -14301,7 +14301,17 @@ remote_target::pid_to_exec_file (int pid) char *annex = NULL; if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) diff --git a/0037-gdb-core-open-vdso-warning.patch b/gdb-core-open-vdso-warning.patch similarity index 91% rename from 0037-gdb-core-open-vdso-warning.patch rename to gdb-core-open-vdso-warning.patch index f58d8be89125870d015e15ecc9d0ee715d93b4af..c64b4bc86a80b7d80846fd04c24cfb91dc8ce411 100644 --- a/0037-gdb-core-open-vdso-warning.patch +++ b/gdb-core-open-vdso-warning.patch @@ -25,9 +25,9 @@ diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/so set bin_flags [list debug shlib=${binfile_lib}] +set executable ${testfile} - if [get_compiler_info] { - return -1 -@@ -71,8 +72,26 @@ gdb_test "br foo2" \ + if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != "" + || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } { +@@ -66,8 +67,26 @@ gdb_test "br foo2" \ "Breakpoint.*: foo2. .2 locations..*" \ "foo2 in mdlib" diff --git a/0065-gdb-fedora-libncursesw.patch b/gdb-fedora-libncursesw.patch similarity index 89% rename from 0065-gdb-fedora-libncursesw.patch rename to gdb-fedora-libncursesw.patch index df220455a227c0a94d75d3d7f7abd94e9103bd00..350138c9a4a47a3178c93755b925c54d13767a7e 100644 --- a/0065-gdb-fedora-libncursesw.patch +++ b/gdb-fedora-libncursesw.patch @@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1270534 diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -9552,6 +9552,7 @@ if test x"$prefer_curses" = xyes; then +@@ -20916,6 +20916,7 @@ if test x"$prefer_curses" = xyes; then # search /usr/local/include, if ncurses is installed in /usr/local. A # default installation of ncurses on alpha*-dec-osf* will lead to such # a situation. @@ -20,7 +20,7 @@ diff --git a/gdb/configure b/gdb/configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 $as_echo_n "checking for library containing waddstr... " >&6; } if ${ac_cv_search_waddstr+:} false; then : -@@ -9576,7 +9577,7 @@ return waddstr (); +@@ -20940,7 +20941,7 @@ return waddstr (); return 0; } _ACEOF @@ -29,7 +29,7 @@ diff --git a/gdb/configure b/gdb/configure if test -z "$ac_lib"; then ac_res="none required" else -@@ -9650,6 +9651,7 @@ case $host_os in +@@ -21014,6 +21015,7 @@ case $host_os in esac # These are the libraries checked by Readline. @@ -37,7 +37,7 @@ diff --git a/gdb/configure b/gdb/configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 $as_echo_n "checking for library containing tgetent... " >&6; } if ${ac_cv_search_tgetent+:} false; then : -@@ -9674,7 +9676,7 @@ return tgetent (); +@@ -21038,7 +21040,7 @@ return tgetent (); return 0; } _ACEOF @@ -49,7 +49,7 @@ diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure.ac b/gdb/configure.ac --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -736,7 +736,8 @@ if test x"$prefer_curses" = xyes; then +@@ -705,7 +705,8 @@ if test x"$prefer_curses" = xyes; then # search /usr/local/include, if ncurses is installed in /usr/local. A # default installation of ncurses on alpha*-dec-osf* will lead to such # a situation. @@ -59,7 +59,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac if test "$ac_cv_search_waddstr" != no; then curses_found=yes -@@ -778,7 +779,8 @@ case $host_os in +@@ -747,7 +748,8 @@ case $host_os in esac # These are the libraries checked by Readline. diff --git a/0053-gdb-glibc-strstr-workaround.patch b/gdb-glibc-strstr-workaround.patch similarity index 100% rename from 0053-gdb-glibc-strstr-workaround.patch rename to gdb-glibc-strstr-workaround.patch diff --git a/0071-gdb-linux_perf-bundle.patch b/gdb-linux_perf-bundle.patch similarity index 99% rename from 0071-gdb-linux_perf-bundle.patch rename to gdb-linux_perf-bundle.patch index 6e27500ec0df64b4a6012ef9ebc2ce8d5122bb9f..4c7e58fdcb1145c2e3d840d23e6ad089a2ed7191 100644 --- a/0071-gdb-linux_perf-bundle.patch +++ b/gdb-linux_perf-bundle.patch @@ -213,7 +213,7 @@ diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4 --- a/gdbsupport/common.m4 +++ b/gdbsupport/common.m4 -@@ -140,7 +140,7 @@ AC_DEFUN([GDB_AC_COMMON], [ +@@ -166,7 +166,7 @@ AC_DEFUN([GDB_AC_COMMON], [ AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #include #ifndef PERF_ATTR_SIZE_VER5 diff --git a/0055-gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch b/gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch similarity index 100% rename from 0055-gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch rename to gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch diff --git a/0057-gdb-rhbz1007614-memleak-infpy_read_memory-test.patch b/gdb-rhbz1007614-memleak-infpy_read_memory-test.patch similarity index 100% rename from 0057-gdb-rhbz1007614-memleak-infpy_read_memory-test.patch rename to gdb-rhbz1007614-memleak-infpy_read_memory-test.patch diff --git a/0064-gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch b/gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch similarity index 100% rename from 0064-gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch rename to gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch diff --git a/0061-gdb-rhbz1149205-catch-syscall-after-fork-test.patch b/gdb-rhbz1149205-catch-syscall-after-fork-test.patch similarity index 100% rename from 0061-gdb-rhbz1149205-catch-syscall-after-fork-test.patch rename to gdb-rhbz1149205-catch-syscall-after-fork-test.patch diff --git a/0060-gdb-rhbz1156192-recursive-dlopen-test.patch b/gdb-rhbz1156192-recursive-dlopen-test.patch similarity index 100% rename from 0060-gdb-rhbz1156192-recursive-dlopen-test.patch rename to gdb-rhbz1156192-recursive-dlopen-test.patch diff --git a/0062-gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch b/gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch similarity index 100% rename from 0062-gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch rename to gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch diff --git a/0068-gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch b/gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch similarity index 100% rename from 0068-gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch rename to gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch diff --git a/gdb-rhbz1773651-gdb-index-internal-error.patch b/gdb-rhbz1773651-gdb-index-internal-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..04cfe6d615beb351af6ede8859364a0ac5566722 --- /dev/null +++ b/gdb-rhbz1773651-gdb-index-internal-error.patch @@ -0,0 +1,105 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Kevin Buettner +Date: Mon, 2 Oct 2023 15:05:23 -0700 +Subject: gdb-rhbz1773651-gdb-index-internal-error.patch + +;; Backport upstream patch which prevents internal error when +;; generating a gdb-index file (RH BZ 1773651). + +Throw error when creating an overly large gdb-index file + +The header in a .gdb_index section uses 32-bit unsigned offsets to +refer to other areas of the section. Thus, there is a size limit of +2^32-1 which is currently unaccounted for by GDB's code for outputting +these sections. + +At the moment, when GDB creates an overly large section, it will exit +abnormally due to an internal error, which is caused by a failed +assert in assert_file_size, which in turn is called from +write_gdbindex_1, both of which are in gdb/dwarf2/index-write.c. + +This is what happens when that assert fails: + +$ gdb -q -nx -iex 'set auto-load no' -iex 'set debuginfod enabled off' -ex file ./libgraph_tool_inference.so -ex "save gdb-index `pwd`/" +Reading symbols from ./libgraph_tool_inference.so... +No executable file now. +Discard symbol table from `libgraph_tool_inference.so'? (y or n) n +Not confirmed. +../../gdb/dwarf2/index-write.c:1069: internal-error: assert_file_size: Assertion `file_size == expected_size' failed. +A problem internal to GDB has been detected, +further debugging may prove unreliable. +----- Backtrace ----- +0x55fddb4d78b0 gdb_internal_backtrace_1 + ../../gdb/bt-utils.c:122 +0x55fddb4d78b0 _Z22gdb_internal_backtracev + ../../gdb/bt-utils.c:168 +0x55fddb98b5d4 internal_vproblem + ../../gdb/utils.c:396 +0x55fddb98b8de _Z15internal_verrorPKciS0_P13__va_list_tag + ../../gdb/utils.c:476 +0x55fddbb71654 _Z18internal_error_locPKciS0_z + ../../gdbsupport/errors.cc:58 +0x55fddb5a0f23 assert_file_size + ../../gdb/dwarf2/index-write.c:1069 +0x55fddb5a1ee0 assert_file_size + /usr/include/c++/13/bits/stl_iterator.h:1158 +0x55fddb5a1ee0 write_gdbindex_1 + ../../gdb/dwarf2/index-write.c:1119 +0x55fddb5a51be write_gdbindex + ../../gdb/dwarf2/index-write.c:1273 +[...] +--------------------- +../../gdb/dwarf2/index-write.c:1069: internal-error: assert_file_size: Assertion `file_size == expected_size' failed. + +This problem was encountered while building the python-graph-tool +package on Fedora. The Fedora bugzilla bug can be found here: + +https://bugzilla.redhat.com/show_bug.cgi?id=1773651 + +This commit prevents the internal error from occurring by calling error() +when the file size exceeds 2^32-1. + +Using a gdb built with this commit, I now see this behavior instead: + +$ gdb -q -nx -iex 'set auto-load no' -iex 'set debuginfod enabled off' -ex file ./libgraph_tool_inference.so -ex "save gdb-index `pwd`/" +Reading symbols from ./libgraph_tool_inference.so... +No executable file now. +Discard symbol table from `/mesquite2/fedora-bugs/1773651/libgraph_tool_inference.so'? (y or n) n +Not confirmed. +Error while writing index for `/mesquite2/fedora-bugs/1773651/libgraph_tool_inference.so': gdb-index maximum file size of 4294967295 exceeded +(gdb) + +I wish I could provide a test case, but due to the sizes of both the +input and output files, I think that testing resources would be +strained or exceeded in many environments. + +My testing on Fedora 38 shows no regressions. + +Approved-by: Tom Tromey + +diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c +--- a/gdb/dwarf2/index-write.c ++++ b/gdb/dwarf2/index-write.c +@@ -1082,7 +1082,7 @@ write_gdbindex_1 (FILE *out_file, + { + data_buf contents; + const offset_type size_of_header = 6 * sizeof (offset_type); +- offset_type total_len = size_of_header; ++ size_t total_len = size_of_header; + + /* The version number. */ + contents.append_offset (8); +@@ -1109,6 +1109,13 @@ write_gdbindex_1 (FILE *out_file, + + gdb_assert (contents.size () == size_of_header); + ++ /* The maximum size of an index file is limited by the maximum value ++ capable of being represented by 'offset_type'. Throw an error if ++ that length has been exceeded. */ ++ size_t max_size = ~(offset_type) 0; ++ if (total_len > max_size) ++ error (_("gdb-index maximum file size of %zu exceeded"), max_size); ++ + contents.file_write (out_file); + cu_list.file_write (out_file); + types_cu_list.file_write (out_file); diff --git a/gdb-rhbz2160211-excessive-core-file-warnings.patch b/gdb-rhbz2160211-excessive-core-file-warnings.patch new file mode 100644 index 0000000000000000000000000000000000000000..a79005477252111261043d149d62bb0fab01f893 --- /dev/null +++ b/gdb-rhbz2160211-excessive-core-file-warnings.patch @@ -0,0 +1,108 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Kevin Buettner +Date: Thu, 29 Jun 2023 18:20:30 -0700 +Subject: gdb-rhbz2160211-excessive-core-file-warnings.patch + +;; Backport two commits, 0ad504dd464 and ea70f941f9b, from Lancelot SIX +;; which prevent repeated warnings from being printed while loading a +;; core file. (RH BZ 2160211) + +gdb/corelow.c: avoid repeated warnings in build_file_mappings + +When GDB opens a coredump it tries to locate and then open all files +which were mapped in the process. + +If a file is found but cannot be opened with BFD (bfd_open / +bfd_check_format fails), then a warning is printed to the user. If the +same file was mapped multiple times in the process's address space, the +warning is printed once for each time the file was mapped. I find this +un-necessarily noisy. + +This patch makes it so the warning message is printed only once per +file. + +There was a comment in the code assuming that if the file was found on +the system, opening it (bfd_open + bfd_check_format) should always +succeed. A recent change in BFD (014a602b86f "Don't optimise bfd_seek +to same position") showed that this assumption is not valid. For +example, it is possible to have a core dump of a process which had +mmaped an IO page from a DRI render node (/dev/dri/runderD$NUM). In +such case the core dump does contain the information that portions of +this special file were mapped in the host process, but trying to seek to +position 0 will fail, making bfd_check_format fail. This patch removes +this comment. + +Reviewed-By: John Baldwin +Approved-By: Andrew Burgess + +gdb/corelow.c: do not try to reopen a file if open failed once + +In the current implementation, core_target::build_file_mappings will try +to locate and open files which were mapped in the process for which the +core dump was produced. If the file cannot be found or cannot be +opened, GDB will re-try to open it once for each time it was mapped in +the process's address space. + +This patch makes it so GDB recognizes that it has already failed to open +a given file once and does not re-try the process for each mapping. + +Reviewed-By: John Baldwin +Approved-By: Andrew Burgess + +diff --git a/gdb/corelow.c b/gdb/corelow.c +--- a/gdb/corelow.c ++++ b/gdb/corelow.c +@@ -237,6 +237,16 @@ core_target::build_file_mappings () + weed out non-file-backed mappings. */ + gdb_assert (filename != nullptr); + ++ if (unavailable_paths.find (filename) != unavailable_paths.end ()) ++ { ++ /* We have already seen some mapping for FILENAME but failed to ++ find/open the file. There is no point in trying the same ++ thing again so just record that the range [start, end) is ++ unavailable. */ ++ m_core_unavailable_mappings.emplace_back (start, end - start); ++ return; ++ } ++ + struct bfd *bfd = bfd_map[filename]; + if (bfd == nullptr) + { +@@ -254,11 +264,10 @@ core_target::build_file_mappings () + if (expanded_fname == nullptr) + { + m_core_unavailable_mappings.emplace_back (start, end - start); +- /* Print just one warning per path. */ +- if (unavailable_paths.insert (filename).second) +- warning (_("Can't open file %s during file-backed mapping " +- "note processing"), +- filename); ++ unavailable_paths.insert (filename); ++ warning (_("Can't open file %s during file-backed mapping " ++ "note processing"), ++ filename); + return; + } + +@@ -268,18 +277,11 @@ core_target::build_file_mappings () + if (bfd == nullptr || !bfd_check_format (bfd, bfd_object)) + { + m_core_unavailable_mappings.emplace_back (start, end - start); +- /* If we get here, there's a good chance that it's due to +- an internal error. We issue a warning instead of an +- internal error because of the possibility that the +- file was removed in between checking for its +- existence during the expansion in exec_file_find() +- and the calls to bfd_openr() / bfd_check_format(). +- Output both the path from the core file note along +- with its expansion to make debugging this problem +- easier. */ ++ unavailable_paths.insert (filename); + warning (_("Can't open file %s which was expanded to %s " + "during file-backed mapping note processing"), + filename, expanded_fname.get ()); ++ + if (bfd != nullptr) + bfd_close (bfd); + return; diff --git a/gdb-rhbz2192105-ftbs-dangling-pointer b/gdb-rhbz2192105-ftbs-dangling-pointer new file mode 100644 index 0000000000000000000000000000000000000000..26ced862b0dd9222f85ffc1022576c838f597323 --- /dev/null +++ b/gdb-rhbz2192105-ftbs-dangling-pointer @@ -0,0 +1,107 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Kevin Buettner +Date: Wed, 3 May 2023 11:28:24 -0700 +Subject: gdb-rhbz2192105-ftbs-dangling-pointer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +;; Backport upstream patch fixing a "dangling pointer" build problem +;; first seen when building with GCC 13.1.1 20230426 (Red Hat ;; 13.1.1-1). + +Pass const frame_info_ptr reference for skip_[language_]trampoline + +g++ 13.1.1 produces a -Werror=dangling-pointer= + +In file included from ../../binutils-gdb/gdb/frame.h:75, + from ../../binutils-gdb/gdb/symtab.h:40, + from ../../binutils-gdb/gdb/language.c:33: +In member function ‘void intrusive_list::push_empty(T&) [with T = frame_info_ptr; AsNode = intrusive_base_node]’, + inlined from ‘void intrusive_list::push_back(reference) [with T = frame_info_ptr; AsNode = intrusive_base_node]’ at gdbsupport/intrusive_list.h:332:24, + inlined from ‘frame_info_ptr::frame_info_ptr(const frame_info_ptr&)’ at gdb/frame.h:241:26, + inlined from ‘CORE_ADDR skip_language_trampoline(frame_info_ptr, CORE_ADDR)’ at gdb/language.c:530:49: +gdbsupport/intrusive_list.h:415:12: error: storing the address of local variable ‘’ in ‘frame_info_ptr::frame_list.intrusive_list::m_back’ [-Werror=dangling-pointer=] + 415 | m_back = &elem; + | ~~~~~~~^~~~~~~ +gdb/language.c: In function ‘CORE_ADDR skip_language_trampoline(frame_info_ptr, CORE_ADDR)’: +gdb/language.c:530:49: note: ‘’ declared here + 530 | CORE_ADDR real_pc = lang->skip_trampoline (frame, pc); + | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ +gdb/frame.h:359:41: note: ‘frame_info_ptr::frame_list’ declared here + 359 | static intrusive_list frame_list; + | ^~~~~~~~~~ + +Each new frame_info_ptr is being pushed on a static frame list and g++ +cannot see why that is safe in case the frame_info_ptr is created and +destroyed immediately when passed as value. + +It isn't clear why only in this one place g++ sees the issue (probably +because it can inline enough code in this specific case). + +Since passing the frame_info_ptr as const reference is cheaper, use +that as workaround for this warning. + +PR build/30413 +Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30413 + +Tested-by: Kevin Buettner +Reviewed-by: Kevin Buettner +Reviewed-by: Tom Tromey + +diff --git a/gdb/c-lang.c b/gdb/c-lang.c +--- a/gdb/c-lang.c ++++ b/gdb/c-lang.c +@@ -1003,7 +1003,7 @@ class cplus_language : public language_defn + + /* See language.h. */ + +- CORE_ADDR skip_trampoline (frame_info_ptr fi, ++ CORE_ADDR skip_trampoline (const frame_info_ptr &fi, + CORE_ADDR pc) const override + { + return cplus_skip_trampoline (fi, pc); +diff --git a/gdb/language.c b/gdb/language.c +--- a/gdb/language.c ++++ b/gdb/language.c +@@ -528,7 +528,7 @@ add_set_language_command () + Return the result from the first that returns non-zero, or 0 if all + `fail'. */ + CORE_ADDR +-skip_language_trampoline (frame_info_ptr frame, CORE_ADDR pc) ++skip_language_trampoline (const frame_info_ptr &frame, CORE_ADDR pc) + { + for (const auto &lang : language_defn::languages) + { +diff --git a/gdb/language.h b/gdb/language.h +--- a/gdb/language.h ++++ b/gdb/language.h +@@ -471,7 +471,7 @@ struct language_defn + If that PC falls in a trampoline belonging to this language, return + the address of the first pc in the real function, or 0 if it isn't a + language tramp for this language. */ +- virtual CORE_ADDR skip_trampoline (frame_info_ptr fi, CORE_ADDR pc) const ++ virtual CORE_ADDR skip_trampoline (const frame_info_ptr &fi, CORE_ADDR pc) const + { + return (CORE_ADDR) 0; + } +@@ -789,7 +789,7 @@ extern const char *language_str (enum language); + + /* Check for a language-specific trampoline. */ + +-extern CORE_ADDR skip_language_trampoline (frame_info_ptr, CORE_ADDR pc); ++extern CORE_ADDR skip_language_trampoline (const frame_info_ptr &, CORE_ADDR pc); + + /* Return demangled language symbol, or NULL. */ + extern gdb::unique_xmalloc_ptr language_demangle +diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c +--- a/gdb/objc-lang.c ++++ b/gdb/objc-lang.c +@@ -282,7 +282,7 @@ class objc_language : public language_defn + + /* See language.h. */ + +- CORE_ADDR skip_trampoline (frame_info_ptr frame, ++ CORE_ADDR skip_trampoline (const frame_info_ptr &frame, + CORE_ADDR stop_pc) const override + { + struct gdbarch *gdbarch = get_frame_arch (frame); diff --git a/gdb-rhbz2233961-CVE-2022-4806.patch b/gdb-rhbz2233961-CVE-2022-4806.patch new file mode 100644 index 0000000000000000000000000000000000000000..633bd32777678e6377dd5ad68df94de7b63d3a42 --- /dev/null +++ b/gdb-rhbz2233961-CVE-2022-4806.patch @@ -0,0 +1,50 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= +Date: Sun, 17 Sep 2023 13:36:13 +0200 +Subject: gdb-rhbz2233961-CVE-2022-4806.patch + +;; Backport PR29922, SHT_NOBITS section +;; avoids section size sanity check. + +PR29922, SHT_NOBITS section avoids section size sanity check + + PR 29922 + * dwarf2.c (find_debug_info): Ignore sections without + SEC_HAS_CONTENTS. + +diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c +--- a/bfd/dwarf2.c ++++ b/bfd/dwarf2.c +@@ -4831,16 +4831,19 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections, + { + look = debug_sections[debug_info].uncompressed_name; + msec = bfd_get_section_by_name (abfd, look); +- if (msec != NULL) ++ /* Testing SEC_HAS_CONTENTS is an anti-fuzzer measure. Of ++ course debug sections always have contents. */ ++ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0) + return msec; + + look = debug_sections[debug_info].compressed_name; + msec = bfd_get_section_by_name (abfd, look); +- if (msec != NULL) ++ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0) + return msec; + + for (msec = abfd->sections; msec != NULL; msec = msec->next) +- if (startswith (msec->name, GNU_LINKONCE_INFO)) ++ if ((msec->flags & SEC_HAS_CONTENTS) != 0 ++ && startswith (msec->name, GNU_LINKONCE_INFO)) + return msec; + + return NULL; +@@ -4848,6 +4851,9 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections, + + for (msec = after_sec->next; msec != NULL; msec = msec->next) + { ++ if ((msec->flags & SEC_HAS_CONTENTS) == 0) ++ continue; ++ + look = debug_sections[debug_info].uncompressed_name; + if (strcmp (msec->name, look) == 0) + return msec; diff --git a/gdb-rhbz2233965-memory-leak.patch b/gdb-rhbz2233965-memory-leak.patch new file mode 100644 index 0000000000000000000000000000000000000000..004ba3badb59c728c52a999c307df3ed830589e8 --- /dev/null +++ b/gdb-rhbz2233965-memory-leak.patch @@ -0,0 +1,115 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= +Date: Sun, 1 Oct 2023 10:36:06 +0200 +Subject: gdb-rhbz2233965-memory-leak.patch + +;; Backport PR29925, Memory leak in find_abstract_instance + +PR29925, Memory leak in find_abstract_instance + +The testcase in the PR had a variable with both DW_AT_decl_file and +DW_AT_specification, where the DW_AT_specification also specified +DW_AT_decl_file. This leads to a memory leak as the file name is +malloced and duplicates are not expected. + +I've also changed find_abstract_instance to not use a temp for "name", +because that can result in a change in behaviour from the usual last +of duplicate attributes wins. + + PR 29925 + * dwarf2.c (find_abstract_instance): Delete "name" variable. + Free *filename_ptr before assigning new file name. + (scan_unit_for_symbols): Similarly free func->file and + var->file before assigning. + +diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c +--- a/bfd/dwarf2.c ++++ b/bfd/dwarf2.c +@@ -3441,7 +3441,6 @@ find_abstract_instance (struct comp_unit *unit, + struct abbrev_info *abbrev; + uint64_t die_ref = attr_ptr->u.val; + struct attribute attr; +- const char *name = NULL; + + if (recur_count == 100) + { +@@ -3602,9 +3601,9 @@ find_abstract_instance (struct comp_unit *unit, + case DW_AT_name: + /* Prefer DW_AT_MIPS_linkage_name or DW_AT_linkage_name + over DW_AT_name. */ +- if (name == NULL && is_str_form (&attr)) ++ if (*pname == NULL && is_str_form (&attr)) + { +- name = attr.u.str; ++ *pname = attr.u.str; + if (mangle_style (unit->lang) == 0) + *is_linkage = true; + } +@@ -3612,7 +3611,7 @@ find_abstract_instance (struct comp_unit *unit, + case DW_AT_specification: + if (is_int_form (&attr) + && !find_abstract_instance (unit, &attr, recur_count + 1, +- &name, is_linkage, ++ pname, is_linkage, + filename_ptr, linenumber_ptr)) + return false; + break; +@@ -3622,7 +3621,7 @@ find_abstract_instance (struct comp_unit *unit, + non-string forms into these attributes. */ + if (is_str_form (&attr)) + { +- name = attr.u.str; ++ *pname = attr.u.str; + *is_linkage = true; + } + break; +@@ -3630,8 +3629,11 @@ find_abstract_instance (struct comp_unit *unit, + if (!comp_unit_maybe_decode_line_info (unit)) + return false; + if (is_int_form (&attr)) +- *filename_ptr = concat_filename (unit->line_table, +- attr.u.val); ++ { ++ free (*filename_ptr); ++ *filename_ptr = concat_filename (unit->line_table, ++ attr.u.val); ++ } + break; + case DW_AT_decl_line: + if (is_int_form (&attr)) +@@ -3643,7 +3645,6 @@ find_abstract_instance (struct comp_unit *unit, + } + } + } +- *pname = name; + return true; + } + +@@ -4139,8 +4140,11 @@ scan_unit_for_symbols (struct comp_unit *unit) + + case DW_AT_decl_file: + if (is_int_form (&attr)) +- func->file = concat_filename (unit->line_table, +- attr.u.val); ++ { ++ free (func->file); ++ func->file = concat_filename (unit->line_table, ++ attr.u.val); ++ } + break; + + case DW_AT_decl_line: +@@ -4182,8 +4186,11 @@ scan_unit_for_symbols (struct comp_unit *unit) + + case DW_AT_decl_file: + if (is_int_form (&attr)) +- var->file = concat_filename (unit->line_table, +- attr.u.val); ++ { ++ free (var->file); ++ var->file = concat_filename (unit->line_table, ++ attr.u.val); ++ } + break; + + case DW_AT_decl_line: diff --git a/0056-gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch b/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch similarity index 100% rename from 0056-gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch rename to gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch diff --git a/0036-gdb-simultaneous-step-resume-breakpoint-test.patch b/gdb-simultaneous-step-resume-breakpoint-test.patch similarity index 100% rename from 0036-gdb-simultaneous-step-resume-breakpoint-test.patch rename to gdb-simultaneous-step-resume-breakpoint-test.patch diff --git a/0044-gdb-test-bt-cfi-without-die.patch b/gdb-test-bt-cfi-without-die.patch similarity index 100% rename from 0044-gdb-test-bt-cfi-without-die.patch rename to gdb-test-bt-cfi-without-die.patch diff --git a/0047-gdb-test-dw2-aranges.patch b/gdb-test-dw2-aranges.patch similarity index 100% rename from 0047-gdb-test-dw2-aranges.patch rename to gdb-test-dw2-aranges.patch diff --git a/gdb.spec b/gdb.spec index 46d0becf6019b60c44605d85887923c31a9956d4..6c112e13f497d82e15c0577727d87dc71c7e884e 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1,9 +1,9 @@ -%define anolis_release 3 +%define anolis_release 1 %global _python_bytecompile_extra 0 %global librpmso librpm.so.9 Name: gdb -Version: 12.1 +Version: 13.2 Release: %{anolis_release}%{?dist} Summary: GNU Project debugger @@ -13,84 +13,60 @@ Source0: https://ftp.gnu.org/gnu/gdb/gdb-%{version}.tar.xz Source1: gdb-gstack.man Source2: gdbinit -Patch001: 0001-gdb-6.3-rh-testversion-20041202.patch -Patch002: 0002-gdb-6.3-gstack-20050411.patch -Patch004: 0004-gdb-6.3-test-movedir-20050125.patch -Patch005: 0005-gdb-6.3-threaded-watchpoints2-20050225.patch -Patch006: 0006-gdb-6.3-inheritancetest-20050726.patch -Patch007: 0007-gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch -Patch008: 0008-gdb-6.5-sharedlibrary-path.patch -Patch009: 0009-gdb-6.5-BEA-testsuite.patch -Patch010: 0010-gdb-6.5-last-address-space-byte-test.patch -Patch011: 0011-gdb-6.5-readline-long-line-crash-test.patch -Patch012: 0012-gdb-6.5-bz218379-ppc-solib-trampoline-test.patch -Patch013: 0013-gdb-6.5-bz109921-DW_AT_decl_file-test.patch -Patch014: 0014-gdb-6.3-bz140532-ppc-unwinding-test.patch -Patch015: 0015-gdb-6.3-bz202689-exec-from-pthread-test.patch -Patch016: 0016-gdb-6.6-bz230000-power6-disassembly-test.patch -Patch017: 0017-gdb-6.6-bz229517-gcore-without-terminal.patch -Patch018: 0018-gdb-6.6-testsuite-timeouts.patch -Patch019: 0019-gdb-6.6-bz237572-ppc-atomic-sequence-test.patch -Patch020: 0020-gdb-6.3-attach-see-vdso-test.patch -Patch021: 0021-gdb-6.5-bz243845-stale-testing-zombie-test.patch -Patch022: 0022-gdb-6.6-buildid-locate.patch -Patch023: 0023-gdb-6.6-buildid-locate-solib-missing-ids.patch -Patch024: 0024-gdb-6.6-buildid-locate-rpm.patch -Patch025: 0025-gdb-6.7-charsign-test.patch -Patch026: 0026-gdb-6.7-ppc-clobbered-registers-O2-test.patch -Patch027: 0027-gdb-6.7-testsuite-stable-results.patch -Patch028: 0028-gdb-6.5-ia64-libunwind-leak-test.patch -Patch029: 0029-gdb-6.5-missed-trap-on-step-test.patch -Patch030: 0030-gdb-6.5-gcore-buffer-limit-test.patch -Patch031: 0031-gdb-6.3-mapping-zero-inode-test.patch -Patch032: 0032-gdb-6.3-focus-cmd-prev-test.patch -Patch033: 0033-gdb-6.8-bz442765-threaded-exec-test.patch -Patch034: 0034-gdb-6.5-section-num-fixup-test.patch -Patch035: 0035-gdb-6.8-bz466901-backtrace-full-prelinked.patch -Patch036: 0036-gdb-simultaneous-step-resume-breakpoint-test.patch -Patch037: 0037-gdb-core-open-vdso-warning.patch -Patch038: 0038-gdb-ccache-workaround.patch -Patch039: 0039-gdb-lineno-makeup-test.patch -Patch040: 0040-gdb-ppc-power7-test.patch -Patch041: 0041-gdb-archer-next-over-throw-cxx-exec.patch -Patch042: 0042-gdb-bz601887-dwarf4-rh-test.patch -Patch043: 0043-gdb-6.6-buildid-locate-rpm-librpm-workaround.patch -Patch044: 0044-gdb-test-bt-cfi-without-die.patch -Patch045: 0045-gdb-bz634108-solib_address.patch -Patch046: 0046-gdb-test-pid0-core.patch -Patch047: 0047-gdb-test-dw2-aranges.patch -Patch048: 0048-gdb-test-expr-cumulative-archer.patch -Patch049: 0049-gdb-physname-pr11734-test.patch -Patch050: 0050-gdb-physname-pr12273-test.patch -Patch051: 0051-gdb-test-ivy-bridge.patch -Patch052: 0052-gdb-runtest-pie-override.patch -Patch053: 0053-gdb-glibc-strstr-workaround.patch -Patch054: 0054-gdb-rhel5.9-testcase-xlf-var-inside-mod.patch -Patch055: 0055-gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch -Patch056: 0056-gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch -Patch057: 0057-gdb-rhbz1007614-memleak-infpy_read_memory-test.patch -Patch058: 0058-gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch -Patch059: 0059-gdb-fortran-frame-string.patch -Patch060: 0060-gdb-rhbz1156192-recursive-dlopen-test.patch -Patch061: 0061-gdb-rhbz1149205-catch-syscall-after-fork-test.patch -Patch062: 0062-gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch -Patch063: 0063-gdb-rhbz1350436-type-printers-error.patch -Patch064: 0064-gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch -Patch065: 0065-gdb-fedora-libncursesw.patch -Patch066: 0066-gdb-opcodes-clflushopt-test.patch -Patch067: 0067-gdb-6.6-buildid-locate-rpm-scl.patch -Patch068: 0068-gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch -Patch069: 0069-gdb-container-rh-pkg.patch -Patch070: 0070-gdb-rhbz1325795-framefilters-test.patch -Patch071: 0071-gdb-linux_perf-bundle.patch -Patch072: 0072-gdb-libexec-add-index.patch -Patch073: 0073-gdb-rhbz1398387-tab-crash-test.patch -Patch074: 0074-gdb-rhbz1553104-s390x-arch12-test.patch -Patch075: 0075-gdb-backport-fix-break-main-file-remove-fail.patch -Patch076: 0076-gdb-backport-readline_support.patch -Patch077: 0077-gdb-Fix-CVE-2023-39128.patch -Patch078: 0078-gdb-Fix-CVE-2023-39129.patch -Patch079: 0079-gdb-Fix-CVE-2023-39130.patch +Patch001: gdb-6.3-rh-testversion-20041202.patch +Patch002: gdb-6.3-gstack-20050411.patch +Patch003: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +Patch004: gdb-6.5-BEA-testsuite.patch +Patch005: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch +Patch006: gdb-6.6-bz229517-gcore-without-terminal.patch +Patch007: gdb-6.6-testsuite-timeouts.patch +Patch008: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch +Patch009: gdb-6.3-attach-see-vdso-test.patch +Patch010: gdb-6.5-bz243845-stale-testing-zombie-test.patch +Patch011: gdb-6.6-buildid-locate.patch +Patch012: gdb-6.6-buildid-locate-solib-missing-ids.patch +Patch013: gdb-6.6-buildid-locate-rpm.patch +Patch014: gdb-6.7-ppc-clobbered-registers-O2-test.patch +Patch015: gdb-6.5-ia64-libunwind-leak-test.patch +Patch016: gdb-6.5-missed-trap-on-step-test.patch +Patch017: gdb-6.5-gcore-buffer-limit-test.patch +Patch018: gdb-6.3-mapping-zero-inode-test.patch +Patch019: gdb-6.5-section-num-fixup-test.patch +Patch020: gdb-6.8-bz466901-backtrace-full-prelinked.patch +Patch021: gdb-simultaneous-step-resume-breakpoint-test.patch +Patch022: gdb-core-open-vdso-warning.patch +Patch023: gdb-archer-next-over-throw-cxx-exec.patch +Patch024: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +Patch025: gdb-test-bt-cfi-without-die.patch +Patch026: gdb-bz634108-solib_address.patch +Patch027: gdb-test-dw2-aranges.patch +Patch028: gdb-glibc-strstr-workaround.patch +Patch029: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch +Patch030: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch +Patch031: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch +Patch032: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +Patch033: gdb-rhbz1156192-recursive-dlopen-test.patch +Patch034: gdb-rhbz1149205-catch-syscall-after-fork-test.patch +Patch035: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch +Patch036: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch +Patch037: gdb-fedora-libncursesw.patch +Patch038: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch +Patch039: gdb-container-rh-pkg.patch +Patch040: gdb-linux_perf-bundle.patch +Patch041: gdb-add-index.patch +Patch042: gdb-binutils29988-read_indexed_address.patch +Patch043: gdb-rhbz2192105-ftbs-dangling-pointer +Patch044: gdb-rhbz2160211-excessive-core-file-warnings.patch +Patch045: gdb-bz2196395-debuginfod-legacy-openssl-crash.patch +Patch046: gdb-bz2237515-debuginfod-double-free.patch +Patch047: gdb-bz2237392-dwarf-obstack-allocation.patch +Patch048: gdb-rhbz2233961-CVE-2022-4806.patch +Patch049: gdb-rhbz2233965-memory-leak.patch +Patch050: gdb-rhbz1773651-gdb-index-internal-error.patch + +patch051: gdb-Fix-CVE-2023-39128.patch +patch052: gdb-Fix-CVE-2023-39129.patch +patch053: gdb-Fix-CVE-2023-39130.patch BuildRequires: rpm-libs autoconf BuildRequires: readline-devel >= 6.2-4 @@ -202,7 +178,9 @@ export CXXFLAGS="$CFLAGS" --with-lzma \ --without-libunwind \ --enable-64-bit-bfd \ +%ifnarch loongarch64 --enable-inprocess-agent \ +%endif --with-system-zlib \ %ifarch x86_64 --with-intel-pt \ @@ -258,6 +236,7 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/lib{bfd*,opcodes*,iberty*,ctf*} rm -f $RPM_BUILD_ROOT%{_infodir}/gdbint* rm -f $RPM_BUILD_ROOT%{_infodir}/stabs* rm -f $RPM_BUILD_ROOT%{_infodir}/ctf-spec* +rm -f $RPM_BUILD_ROOT%{_infodir}/sframe-spec* find $RPM_BUILD_ROOT/ -name "*.a" -print -delete @@ -296,14 +275,19 @@ cd %{gdb_build} %{_bindir}/gdbserver %{abidir}/gdbserver-option.list %{_mandir}/*/gdbserver.1* +%ifnarch loongarch64 %{_libdir}/libinproctrace.so %{abidir}/libinproctrace.dump +%endif %files headless %{_libexecdir}/gdb %changelog +* Tue Oct 31 2023 Wenlong Zhang - 13.2-1 +- update to 13.2 + * Wed Oct 11 2023 Xiaoping Liu - 12.1-3 - Fix CVE-2023-39128 CVE-2023-39129 CVE-2023-39130