rpms/gdb/F-12 gdb-archer-pie-addons-keep-disabled.patch, NONE, 1.1 gdb-rhel5-fortran44.patch, NONE, 1.1 gdb-6.3-ia64-sigtramp-frame-20050708.patch, 1.4, 1.5 gdb-6.7-testsuite-stable-results.patch, 1.8, 1.9 gdb-7.0-upstream.patch, 1.2, 1.3 gdb-archer-pie-addons.patch, 1.1, 1.2 gdb-orphanripper.c, 1.3, 1.4 gdb.spec, 1.401, 1.402 gdb-6.3-bz182116-exec-from-pthread.patch, 1.2, NONE gdb-6.3-ia64-corefile-fix-20050127.patch, 1.2, NONE gdb-6.3-sepcrc-20050402.patch, 1.4, NONE gdb-6.3-test-sepcrc-20050402.patch, 1.3, NONE

Jan Kratochvil jkratoch at fedoraproject.org
Fri Dec 18 09:48:51 UTC 2009


Author: jkratoch

Update of /cvs/pkgs/rpms/gdb/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16506

Modified Files:
	gdb-6.3-ia64-sigtramp-frame-20050708.patch 
	gdb-6.7-testsuite-stable-results.patch gdb-7.0-upstream.patch 
	gdb-archer-pie-addons.patch gdb-orphanripper.c gdb.spec 
Added Files:
	gdb-archer-pie-addons-keep-disabled.patch 
	gdb-rhel5-fortran44.patch 
Removed Files:
	gdb-6.3-bz182116-exec-from-pthread.patch 
	gdb-6.3-ia64-corefile-fix-20050127.patch 
	gdb-6.3-sepcrc-20050402.patch 
	gdb-6.3-test-sepcrc-20050402.patch 
Log Message:
* Fri Dec 18 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.0-11.fc12
- [pie] Fix general ppc64 regression due to a function descriptors bug.
- [pie] Fix also keeping breakpoints disabled in PIE mode.
- Import upstream <tab>-completion crash fix.
- Drop some unused patches from the repository.
- More RHEL-5 build compatibility updates.
  - Use gfortran44 when running the testsuite on RHEL-5.
  - Disable python there due to insufficient ppc multilib.
- Fix orphanripper hangs and thus enable it again.


gdb-archer-pie-addons-keep-disabled.patch:
 breakpoint.c |   43 +++++++++++++++++++++++++++++++++++++++++++
 breakpoint.h |    3 +++
 objfiles.c   |   20 +++++++++++++++-----
 3 files changed, 61 insertions(+), 5 deletions(-)

--- NEW FILE gdb-archer-pie-addons-keep-disabled.patch ---
--- ./gdb/breakpoint.c	2009-12-18 00:13:49.000000000 +0100
+++ ./gdb/breakpoint.c	2009-12-18 00:13:16.000000000 +0100
@@ -8563,6 +8563,49 @@ update_breakpoint_locations (struct brea
   update_global_location_list (1);
 }
 
+void
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
+{
+  struct bp_location *bl, **blp_tmp;
+  int changed = 0;
+
+  gdb_assert (objfile->separate_debug_objfile_backlink == NULL);
+
+  ALL_BP_LOCATIONS (bl, blp_tmp)
+    {
+      struct obj_section *osect;
+
+      /* BL->SECTION can be correctly NULL for breakpoints with multiple
+         locations expanded through symtab.  */
+
+      ALL_OBJFILE_OSECTIONS (objfile, osect)
+	{
+	  CORE_ADDR relocated_address;
+	  CORE_ADDR delta_offset;
+
+	  delta_offset = ANOFFSET (delta, osect->the_bfd_section->index);
+	  if (delta_offset == 0)
+	    continue;
+	  relocated_address = bl->address + delta_offset;
+
+	  if (obj_section_addr (osect) <= relocated_address
+	      && relocated_address < obj_section_endaddr (osect))
+	    {
+	      if (bl->inserted)
+		remove_breakpoint (bl, mark_uninserted);
+
+	      bl->address += delta_offset;
+	      bl->requested_address += delta_offset;
+
+	      changed = 1;
+	    }
+	}
+    }
+
+  if (changed)
+    qsort (bp_location, bp_location_count, sizeof (*bp_location),
+	   bp_location_compare_for_qsort);
+}
 
 /* Reset a breakpoint given it's struct breakpoint * BINT.
    The value we return ends up being the return value from catch_errors.
--- ./gdb/breakpoint.h	2009-12-18 00:13:48.000000000 +0100
+++ ./gdb/breakpoint.h	2009-12-17 22:11:10.000000000 +0100
@@ -970,4 +970,7 @@ extern struct breakpoint *get_tracepoint
    is newly allocated; the caller should free when done with it.  */
 extern VEC(breakpoint_p) *all_tracepoints (void);
 
+extern void breakpoints_relocate (struct objfile *objfile,
+				  struct section_offsets *delta);
+
 #endif /* !defined (BREAKPOINT_H) */
--- ./gdb/objfiles.c	2009-12-18 00:13:48.000000000 +0100
+++ ./gdb/objfiles.c	2009-12-17 23:19:22.000000000 +0100
@@ -546,7 +546,7 @@ free_all_objfiles (void)
 /* Relocate OBJFILE to NEW_OFFSETS.  There should be OBJFILE->NUM_SECTIONS
    entries in new_offsets.  SEPARATE_DEBUG_OBJFILE is not touched here.  */
 
-static void
+static int
 objfile_relocate1 (struct objfile *objfile, struct section_offsets *new_offsets)
 {
   struct obj_section *s;
@@ -565,7 +565,7 @@ objfile_relocate1 (struct objfile *objfi
 	  something_changed = 1;
       }
     if (!something_changed)
-      return;
+      return 0;
   }
 
   /* OK, get all the symtabs.  */
@@ -706,6 +706,13 @@ objfile_relocate1 (struct objfile *objfi
       exec_set_section_address (bfd_get_filename (objfile->obfd), idx,
 				obj_section_addr (s));
     }
+
+  /* Final call of breakpoint_re_set can keep breakpoint locations disabled if
+     their addresses match.  */
+  if (objfile->separate_debug_objfile_backlink == NULL)
+    breakpoints_relocate (objfile, delta);
+
+  return 1;
 }
 
 /* Relocate OBJFILE to NEW_OFFSETS.  There should be OBJFILE->NUM_SECTIONS
@@ -720,7 +727,9 @@ objfile_relocate1 (struct objfile *objfi
 void
 objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
 {
-  objfile_relocate1 (objfile, new_offsets);
+  int changed = 0;
+
+  changed |= objfile_relocate1 (objfile, new_offsets);
 
   if (objfile->separate_debug_objfile != NULL)
     {
@@ -747,11 +756,12 @@ objfile_relocate (struct objfile *objfil
 					     objfile_addrs);
       do_cleanups (my_cleanups);
 
-      objfile_relocate1 (debug_objfile, new_debug_offsets);
+      changed |= objfile_relocate1 (debug_objfile, new_debug_offsets);
     }
 
   /* Relocate breakpoints as necessary, after things are relocated. */
-  breakpoint_re_set ();
+  if (changed)
+    breakpoint_re_set ();
 }
 
 /* Return non-zero if OBJFILE has partial symbols.  */

gdb-rhel5-fortran44.patch:
 common-block.exp   |   20 +++++++++++++++++++-
 dwarf-stride.exp   |   20 +++++++++++++++++++-
 dynamic.exp        |   20 +++++++++++++++++++-
 library-module.exp |   26 ++++++++++++++++++++++----
 module.exp         |   20 +++++++++++++++++++-
 string.exp         |   20 +++++++++++++++++++-
 6 files changed, 117 insertions(+), 9 deletions(-)

--- NEW FILE gdb-rhel5-fortran44.patch ---
Some functionality is available on RHEL-5.4+ only with gfortran44 as the
default gfortran binary is from gcc-4.1.

--- ./gdb/testsuite/gdb.fortran/common-block.exp	2009-12-15 05:13:56.000000000 +0100
+++ ./gdb/testsuite/gdb.fortran/common-block.exp	2009-12-15 05:21:00.000000000 +0100
@@ -20,7 +20,25 @@ set testfile "common-block"
 set srcfile ${testfile}.f90
 set binfile ${objdir}/${subdir}/${testfile}
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f77compiler] {
+    set old_f77compiler [board_info $board f77compiler]
+    unset_board_info f77compiler
+} elseif [info exists old_f77compiler] {
+    unset old_f77compiler
+}
+set_board_info f77compiler gfortran44
+
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}]
+
+unset_board_info f77compiler
+if [info exists old_f77compiler] {
+    set_board_info f77compiler $old_f77compiler
+}
+
+if  { $err != "" } {
     untested "Couldn't compile ${srcfile}"
     return -1
 }
--- ./gdb/testsuite/gdb.fortran/dwarf-stride.exp	2009-12-15 05:13:56.000000000 +0100
+++ ./gdb/testsuite/gdb.fortran/dwarf-stride.exp	2009-12-15 05:20:07.000000000 +0100
@@ -27,7 +27,25 @@
 set testfile dwarf-stride
 set srcfile ${testfile}.f90
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}] } {
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f77compiler] {
+    set old_f77compiler [board_info $board f77compiler]
+    unset_board_info f77compiler 
+} elseif [info exists old_f77compiler] {
+    unset old_f77compiler
+} 
+set_board_info f77compiler gfortran44
+
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}]
+
+unset_board_info f77compiler
+if [info exists old_f77compiler] {
+    set_board_info f77compiler $old_f77compiler
+}
+
+if $err {
     return -1
 }
 
--- ./gdb/testsuite/gdb.fortran/dynamic.exp	2009-12-15 05:13:56.000000000 +0100
+++ ./gdb/testsuite/gdb.fortran/dynamic.exp	2009-12-15 05:17:21.000000000 +0100
@@ -25,7 +25,25 @@ set testfile "dynamic"
 set srcfile ${testfile}.f90
 set binfile ${objdir}/${subdir}/${testfile}
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f77compiler] {
+    set old_f77compiler [board_info $board f77compiler]
+    unset_board_info f77compiler
+} elseif [info exists old_f77compiler] {
+    unset old_f77compiler
+}
+set_board_info f77compiler gfortran44
+
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}]
+
+unset_board_info f77compiler
+if [info exists old_f77compiler] {
+    set_board_info f77compiler $old_f77compiler
+}
+
+if  { $err != "" } {
     untested "Couldn't compile ${srcfile}"
     return -1
 }
--- ./gdb/testsuite/gdb.fortran/library-module.exp	2009-12-15 05:13:56.000000000 +0100
+++ ./gdb/testsuite/gdb.fortran/library-module.exp	2009-12-15 05:22:37.000000000 +0100
@@ -25,16 +25,34 @@ if [get_compiler_info not-used] {
    return -1
 }
 
-if  { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f77}] != "" } {
-    untested "Couldn't compile ${srclibfile}"
-    return -1
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f77compiler] {
+    set old_f77compiler [board_info $board f77compiler]
+    unset_board_info f77compiler
+} elseif [info exists old_f77compiler] {
+    unset old_f77compiler
 }
+set_board_info f77compiler gfortran44
 
 # prepare_for_testing cannot be used as linking with $libfile cannot be passed
 # just for the linking phase (and not the source compilation phase).  And any
 # warnings on ignored $libfile abort the process.
 
-if  { [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f77}] != "" } {
+set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f77}]
+set err2 [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f77}]
+
+unset_board_info f77compiler
+if [info exists old_f77compiler] {
+    set_board_info f77compiler $old_f77compiler
+}
+
+if  { $err1 != "" } {
+    untested "Couldn't compile ${srclibfile}"
+    return -1
+}
+if  { $err2 != "" } {
     untested "Couldn't compile ${srcfile}"
     return -1
 }
--- ./gdb/testsuite/gdb.fortran/module.exp	2009-12-15 05:13:56.000000000 +0100
+++ ./gdb/testsuite/gdb.fortran/module.exp	2009-12-15 05:28:49.000000000 +0100
@@ -16,7 +16,25 @@
 set testfile "module"
 set srcfile ${testfile}.f90
 
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}] } {
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f77compiler] {
+    set old_f77compiler [board_info $board f77compiler]
+    unset_board_info f77compiler
+} elseif [info exists old_f77compiler] {
+    unset old_f77compiler
+}
+set_board_info f77compiler gfortran44
+
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}]
+
+unset_board_info f77compiler
+if [info exists old_f77compiler] {
+    set_board_info f77compiler $old_f77compiler
+}
+
+if $err {
     return -1
 }
 
--- ./gdb/testsuite/gdb.fortran/string.exp	2009-12-15 05:13:56.000000000 +0100
+++ ./gdb/testsuite/gdb.fortran/string.exp	2009-12-15 05:18:13.000000000 +0100
@@ -23,7 +23,25 @@ set testfile "string"
 set srcfile ${testfile}.f90
 set binfile ${objdir}/${subdir}/${testfile}
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
+# Temporarily provide f77compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f77compiler] {
+    set old_f77compiler [board_info $board f77compiler]
+    unset_board_info f77compiler
+} elseif [info exists old_f77compiler] {
+    unset old_f77compiler
+}
+set_board_info f77compiler gfortran44
+
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}]
+
+unset_board_info f77compiler
+if [info exists old_f77compiler] {
+    set_board_info f77compiler $old_f77compiler
+}
+
+if { $err != "" } {
     untested "Couldn't compile ${srcfile}"
     return -1
 }

gdb-6.3-ia64-sigtramp-frame-20050708.patch:
 ia64-tdep.c |  125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 124 insertions(+), 1 deletion(-)

Index: gdb-6.3-ia64-sigtramp-frame-20050708.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb-6.3-ia64-sigtramp-frame-20050708.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- gdb-6.3-ia64-sigtramp-frame-20050708.patch	14 Dec 2008 14:05:14 -0000	1.4
+++ gdb-6.3-ia64-sigtramp-frame-20050708.patch	18 Dec 2009 09:48:50 -0000	1.5
@@ -29,7 +29,7 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep
 +      ULONGEST unatN_val;
 +      ULONGEST unat;
 +      read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat,
-+		   register_size (current_gdbarch, IA64_UNAT_REGNUM));
++		   register_size (target_gdbarch, IA64_UNAT_REGNUM));
 +      unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
 +      return frame_unwind_got_constant (this_frame, regnum, unatN_val);
 +    }
@@ -45,9 +45,9 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep
 +      CORE_ADDR gr_addr = 0, nat_addr = 0;
 +
 +      read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
-+		   register_size (current_gdbarch, IA64_BSP_REGNUM));
++		   register_size (target_gdbarch, IA64_BSP_REGNUM));
 +      read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
-+		   register_size (current_gdbarch, IA64_CFM_REGNUM));
++		   register_size (target_gdbarch, IA64_CFM_REGNUM));
 +
 +      /* The bsp points at the end of the register frame so we
 +	 subtract the size of frame from it to get start of register frame.  */
@@ -71,10 +71,10 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep
 +	      nat_addr = cache->saved_regs[IA64_RNAT_REGNUM];
 +	      if (nat_addr != 0)
 +		read_memory (nat_addr, (char *) &nat_collection,
-+			     register_size (current_gdbarch, IA64_RNAT_REGNUM));
++			     register_size (target_gdbarch, IA64_RNAT_REGNUM));
 +	    }
 +	  else
-+	    nat_collection = read_memory_integer (nat_addr, 8);
++	    nat_collection = read_memory_integer (nat_addr, 8, BFD_ENDIAN_LITTLE);
 +	  if (nat_addr != 0)
 +	    {
 +	      nat_bit = (gr_addr >> 3) & 0x3f;
@@ -97,9 +97,9 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep
 +      ULONGEST bof;
 +
 +      read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
-+		   register_size (current_gdbarch, IA64_BSP_REGNUM));
++		   register_size (target_gdbarch, IA64_BSP_REGNUM));
 +      read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
-+		   register_size (current_gdbarch, IA64_CFM_REGNUM));
++		   register_size (target_gdbarch, IA64_CFM_REGNUM));
 +
 +      /* The bsp points at the end of the register frame so we
 +	 subtract the size of frame from it to get beginning of frame.  */
@@ -133,9 +133,9 @@ Index: gdb-6.8.50.20081128/gdb/ia64-tdep
 +	  ULONGEST cfm;
 +	  ULONGEST prN_val;
 +	  read_memory (pr_addr, (char *) &pr,
-+		       register_size (current_gdbarch, IA64_PR_REGNUM));
++		       register_size (target_gdbarch, IA64_PR_REGNUM));
 +	  read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
-+		       register_size (current_gdbarch, IA64_CFM_REGNUM));
++		       register_size (target_gdbarch, IA64_CFM_REGNUM));
 +
 +	  /* Get the register rename base for this frame and adjust the
 +	   * register name to take rotation into account. */

gdb-6.7-testsuite-stable-results.patch:
 ./gdb/testsuite/gdb.base/fileio.c                |   33 ++++++++++++++++
 ./gdb/testsuite/gdb.base/fileio.exp              |   10 ++---
 gdb/testsuite/gdb.threads/watchthreads-reorder.c |   46 ++++++++---------------
 3 files changed, 55 insertions(+), 34 deletions(-)

Index: gdb-6.7-testsuite-stable-results.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb-6.7-testsuite-stable-results.patch,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- gdb-6.7-testsuite-stable-results.patch	30 Sep 2009 21:02:25 -0000	1.8
+++ gdb-6.7-testsuite-stable-results.patch	18 Dec 2009 09:48:50 -0000	1.9
@@ -102,3 +102,154 @@ frames-invalid can happen asynchronously
  
  set timeout $oldtimeout
  return 0
+
+
+
+http://sourceware.org/ml/gdb-patches/2009-12/msg00234.html
+Subject: [patch] testsuite: Fix a race by me - watchthreads-reorder.exp
+
+Hi,
+
+there is a bug explainable by man pthread_cond_signal:
+	The [...] pthread_cond_signal() functions shall have no effect if
+	there are no threads currently blocked on cond.
+
+meaning a race for the testcase.
+	+FAIL: gdb.threads/watchthreads-reorder.exp: reorder1: continue a (timeout)
+
+One can reproduce the race on CVS HEAD by:
+#	--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.c
+#	+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.c
+#	@@ -89,6 +89,7 @@ thread1_func (void *unused)
+#	   int i;
+#	   volatile int rwatch_store;
+#	 
+#	+sleep(1);
+#	   thread1_tid = gettid ();
+#	   i = pthread_cond_signal (&thread1_tid_cond);
+#	   assert (i == 0);
+#	@@ -317,6 +318,7 @@ main (int argc, char **argv)
+#	 
+#	   if (thread1_tid == 0)
+#	     {
+#	+sleep(2);
+#	       i = pthread_cond_wait (&thread1_tid_cond, &thread1_tid_mutex);
+#	       assert (i == 0);
+#	 
+
+Fixed; gdbstop_mutex got removed as it became redundant there.
+
+Going to check it in as obvious in several days (code is by me + it is just
+a testcase).
+
+
+Sorry,
+Jan
+
+
+gdb/testsuite/
+2009-12-17  Jan Kratochvil  <jan.kratochvil at redhat.com>
+
+	* gdb.threads/watchthreads-reorder.c (gdbstop_mutex): Remove.
+	(thread1_func): Protect thread1_tid_cond by thread1_tid_mutex.  Remove
+	gdbstop_mutex handling.
+	(thread2_func): Protect thread2_tid_cond by thread2_tid_mutex.  Remove
+	gdbstop_mutex handling.
+	(main): Move thread1_tid_mutex and thread2_tid_mutex locks before
+	pthread_create.  Remove gdbstop_mutex handling.  New comment.  Remove
+	pthread_cond_wait conditionalizations.
+
+--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.c
++++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.c
+@@ -34,8 +34,6 @@
+    otherwise.  */
+ #define TIMEOUT (gettid () == getpid() ? 10 : 15)
+ 
+-static pthread_mutex_t gdbstop_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
+-
+ static pid_t thread1_tid;
+ static pthread_cond_t thread1_tid_cond = PTHREAD_COND_INITIALIZER;
+ static pthread_mutex_t thread1_tid_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
+@@ -90,12 +88,11 @@ thread1_func (void *unused)
+   volatile int rwatch_store;
+ 
+   thread1_tid = gettid ();
++
++  timed_mutex_lock (&thread1_tid_mutex);
+   i = pthread_cond_signal (&thread1_tid_cond);
+   assert (i == 0);
+-
+-  /* Be sure GDB is already stopped before continuing.  */
+-  timed_mutex_lock (&gdbstop_mutex);
+-  i = pthread_mutex_unlock (&gdbstop_mutex);
++  i = pthread_mutex_unlock (&thread1_tid_mutex);
+   assert (i == 0);
+ 
+   rwatch_store = thread1_rwatch;
+@@ -115,12 +112,11 @@ thread2_func (void *unused)
+   volatile int rwatch_store;
+ 
+   thread2_tid = gettid ();
++
++  timed_mutex_lock (&thread2_tid_mutex);
+   i = pthread_cond_signal (&thread2_tid_cond);
+   assert (i == 0);
+-
+-  /* Be sure GDB is already stopped before continuing.  */
+-  timed_mutex_lock (&gdbstop_mutex);
+-  i = pthread_mutex_unlock (&gdbstop_mutex);
++  i = pthread_mutex_unlock (&thread2_tid_mutex);
+   assert (i == 0);
+ 
+   rwatch_store = thread2_rwatch;
+@@ -267,7 +263,8 @@ main (int argc, char **argv)
+ 
+   setbuf (stdout, NULL);
+ 
+-  timed_mutex_lock (&gdbstop_mutex);
++  timed_mutex_lock (&thread1_tid_mutex);
++  timed_mutex_lock (&thread2_tid_mutex);
+ 
+   timed_mutex_lock (&terminate_mutex);
+ 
+@@ -306,30 +303,21 @@ main (int argc, char **argv)
+       state_wait (tracer, "T (stopped)");
+     }
+ 
+-  timed_mutex_lock (&thread1_tid_mutex);
+-  timed_mutex_lock (&thread2_tid_mutex);
+-
+-  /* Let the threads start.  */
+-  i = pthread_mutex_unlock (&gdbstop_mutex);
+-  assert (i == 0);
++  /* Threads are now waiting at timed_mutex_lock (thread1_tid_mutex) and so
++     they could not trigger the watchpoints before GDB gets unstopped later.
++     Threads get resumed at pthread_cond_wait below.  */
+ 
+   printf ("Waiting till the threads initialize their TIDs.\n");
+ 
+-  if (thread1_tid == 0)
+-    {
+-      i = pthread_cond_wait (&thread1_tid_cond, &thread1_tid_mutex);
+-      assert (i == 0);
++  i = pthread_cond_wait (&thread1_tid_cond, &thread1_tid_mutex);
++  assert (i == 0);
+ 
+-      assert (thread1_tid > 0);
+-    }
++  assert (thread1_tid > 0);
+ 
+-  if (thread2_tid == 0)
+-    {
+-      i = pthread_cond_wait (&thread2_tid_cond, &thread2_tid_mutex);
+-      assert (i == 0);
++  i = pthread_cond_wait (&thread2_tid_cond, &thread2_tid_mutex);
++  assert (i == 0);
+ 
+-      assert (thread2_tid > 0);
+-    }
++  assert (thread2_tid > 0);
+ 
+   printf ("Thread 1 TID = %lu, thread 2 TID = %lu, PID = %lu.\n",
+ 	  (unsigned long) thread1_tid, (unsigned long) thread2_tid,
+

gdb-7.0-upstream.patch:
 ./gdb/amd64fbsd-nat.c                |    3 +
 ./gdb/dwarf2-frame.c                 |    8 ++++
 ./gdb/elfread.c                      |    3 +
 ./gdb/objfiles.c                     |   16 ++++++++
 ./gdb/score-tdep.c                   |   52 ---------------------------
 ./gdb/score-tdep.h                   |   66 -----------------------------------
 gdb/dbxread.c                        |   10 ++++-
 gdb/testsuite/gdb.base/bigcore.exp   |    6 +--
 gdb/testsuite/gdb.base/foll-fork.c   |    3 +
 gdb/testsuite/gdb.base/foll-fork.exp |    3 +
 gdb/testsuite/gdb.base/structs.c     |    6 +++
 gdb/testsuite/gdb.base/structs.exp   |   65 ++++++++++++++++++++++------------
 src/gdb/completer.c                  |    4 +-
 13 files changed, 96 insertions(+), 149 deletions(-)

Index: gdb-7.0-upstream.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb-7.0-upstream.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- gdb-7.0-upstream.patch	7 Dec 2009 18:39:26 -0000	1.2
+++ gdb-7.0-upstream.patch	18 Dec 2009 09:48:50 -0000	1.3
@@ -625,3 +625,39 @@ gdb/
        complaint (&symfile_complaints, _("bad string table offset in symbol %d"),
  		 symnum);
 
+
+
+http://sourceware.org/ml/gdb-patches/2009-11/msg00422.html
+http://sourceware.org/ml/gdb-cvs/2009-11/msg00169.html
+
+### src/gdb/ChangeLog	2009/11/19 22:42:48	1.11094
+### src/gdb/ChangeLog	2009/11/19 22:44:32	1.11095
+## -1,3 +1,8 @@
++2009-11-19  Joel Brobecker  <brobecker at adacore.com>
++
++	* completer.c (complete_line_internal): Make sure the command
++	completer is not NULL before calling it.
++
+ 2009-11-19  Jerome Guitton  <guitton at adacore.com>
+ 
+ 	* ada-lang.c (packed_array_type): Rename to...
+--- src/gdb/completer.c	2009/03/25 10:50:56	1.34
++++ src/gdb/completer.c	2009/11/19 22:44:34	1.35
+@@ -676,7 +676,7 @@
+ 			   p--)
+ 			;
+ 		    }
+-		  if (reason != handle_brkchars)
++		  if (reason != handle_brkchars && c->completer != NULL)
+ 		    list = (*c->completer) (c, p, word);
+ 		}
+ 	    }
+@@ -747,7 +747,7 @@
+ 		       p--)
+ 		    ;
+ 		}
+-	      if (reason != handle_brkchars)
++	      if (reason != handle_brkchars && c->completer != NULL)
+ 		list = (*c->completer) (c, p, word);
+ 	    }
+ 	}

gdb-archer-pie-addons.patch:
 dwarf2read.c |   17 +++++++++++++----
 exec.c       |   20 ++++++++++++++++++--
 gdbtypes.h   |    3 +++
 jv-lang.c    |    6 ++++--
 solib-svr4.c |   12 +++++++++---
 solib.c      |   13 +++++++++++++
 solib.h      |    2 ++
 solist.h     |    3 +++
 symfile.c    |   35 ++++++++++++++++++++++++++++-------
 value.c      |    6 ++++--
 10 files changed, 97 insertions(+), 20 deletions(-)

Index: gdb-archer-pie-addons.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb-archer-pie-addons.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- gdb-archer-pie-addons.patch	7 Dec 2009 18:39:26 -0000	1.1
+++ gdb-archer-pie-addons.patch	18 Dec 2009 09:48:50 -0000	1.2
@@ -146,9 +146,20 @@
        if (accflags & 0x8000)	/* FIELD_UNRESOLVED_FLAG */
 --- a/gdb/solib-svr4.c
 +++ b/gdb/solib-svr4.c
-@@ -1621,7 +1621,10 @@ svr4_exec_displacement (void)
+@@ -1672,15 +1672,20 @@ static CORE_ADDR
+ svr4_exec_displacement (void)
+ {
+   int found;
++  /* ENTRY_POINT is a possible function descriptor - before
++     a call to gdbarch_convert_from_func_ptr_addr.  */
+   CORE_ADDR entry_point;
+ 
+   if (exec_bfd == NULL)
+     return 0;
+ 
    if (target_auxv_search (&current_target, AT_ENTRY, &entry_point) == 1)
-     return entry_point - exec_entry_point (exec_bfd, &current_target);
+-    return entry_point - exec_entry_point (exec_bfd, &current_target);
++    return entry_point - bfd_get_start_address (exec_bfd);
  
 -  return svr4_static_exec_displacement ();
 +  if (!ptid_equal (inferior_ptid, null_ptid))


Index: gdb-orphanripper.c
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb-orphanripper.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- gdb-orphanripper.c	31 Jul 2009 08:36:06 -0000	1.3
+++ gdb-orphanripper.c	18 Dec 2009 09:48:50 -0000	1.4
@@ -276,12 +276,16 @@ static int spawn (char **argv, int timeo
 
   assert (signal_chld_hit != 0);
 
+  /* Do not unset O_NONBLOCK as a stale child (the whole purpose of this
+     program) having open its output pty would block us in read_out.  */
+#if 0
   i = fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */);
   if (i != 0)
     {
       perror ("fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */)");
       exit (EXIT_FAILURE);
     }
+#endif
 
   while (read_out (amaster));
 


Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb.spec,v
retrieving revision 1.401
retrieving revision 1.402
diff -u -p -r1.401 -r1.402
--- gdb.spec	14 Dec 2009 18:54:51 -0000	1.401
+++ gdb.spec	18 Dec 2009 09:48:50 -0000	1.402
@@ -8,12 +8,15 @@
 %if 0%{!?dist:1}
 %define rhel 5
 %define dist .el5
+%endif
+# RHEL-5 Brew does not set it.
+%if "%{dist}" == ".el5"
 %define el5 1
-%define gnat_version 4.1
-%define gcj_version 7rh
-%else
-%define gnat_version 4.4
-%define gcj_version 10
+%endif
+# RHEL-5 ppc* python .so files are shipped only as ppc but gdb is ppc64 there.
+# Brew builds it fine as its ppc64 buildroot has full ppc64 package set.
+%if 0%{?el5:1}
+%define _without_python 1
 %endif
 
 Summary: A GNU source-level debugger for C, C++, Java and other languages
@@ -106,6 +109,7 @@ Patch118: gdb-6.3-gstack-20050411.patch
 Patch122: gdb-6.3-test-pie-20050107.patch
 Patch124: gdb-archer-pie.patch
 Patch389: gdb-archer-pie-addons.patch
+Patch394: gdb-archer-pie-addons-keep-disabled.patch
 
 # Get selftest working with sep-debug-info
 Patch125: gdb-6.3-test-self-20050110.patch
@@ -396,6 +400,9 @@ Patch391: gdb-x86_64-i386-syscall-restar
 # Fix stepping with OMP parallel Fortran sections (BZ 533176).
 Patch392: gdb-bz533176-fortran-omp-step.patch
 
+# Use gfortran44 when running the testsuite on RHEL-5.
+Patch393: gdb-rhel5-fortran44.patch
+
 BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
 Requires: readline
 BuildRequires: readline-devel
@@ -411,14 +418,28 @@ BuildRequires: python-devel
 BuildRequires: libstdc++
 %endif	# 0%{!?_without_python:1}
 
+%if 0%{!?el5:1}
+%define gnat_version 4.4
+%define gcj_version 10
+%else
+%define gnat_version 4.1
+%define gcj_version 7rh
+%endif
+
 %if 0%{?_with_testsuite:1}
 BuildRequires: sharutils dejagnu
 # gcc-objc++ is not covered by the GDB testsuite.
-BuildRequires: gcc gcc-c++ gcc-gfortran gcc-java gcc-objc glibc-static
-# Prelink is broken on sparcv9/sparc64
+BuildRequires: gcc gcc-c++ gcc-gfortran gcc-java gcc-objc
+%if 0%{!?el5:1}
+BuildRequires: glibc-static
+%endif
+# Copied from prelink-0.4.2-3.fc13.
+%ifarch %{ix86} alpha sparc sparcv9 sparc64 s390 s390x x86_64 ppc ppc64
+# Prelink is broken on sparcv9/sparc64.
 %ifnarch sparcv9 sparc64
 BuildRequires: prelink
 %endif
+%endif
 %if 0%{!?rhel:1}
 BuildRequires: fpc
 %endif
@@ -427,7 +448,7 @@ BuildRequires: gcc44 gcc44-gfortran
 %endif
 # Ensure the devel libraries are installed for both multilib arches.
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
-# Copied from gcc-4.1.2-32
+# Copied from gcc-4.1.2-32.
 %ifarch %{ix86} x86_64 ia64 ppc alpha
 BuildRequires: gcc-gnat
 %ifarch %{multilib_64_archs} ppc
@@ -449,8 +470,13 @@ BuildRequires: %{_exec_prefix}/lib64/lib
 %endif
 
 %ifarch ia64
+%if 0%{!?el5:1}
 BuildRequires: libunwind-devel >= 0.99-0.1.frysk20070405cvs
 Requires: libunwind >= 0.99-0.1.frysk20070405cvs
+%else
+BuildRequires: libunwind >= 0.96-3
+Requires: libunwind >= 0.96-3
+%endif
 %endif
 
 Requires(post): /sbin/install-info
@@ -606,6 +632,12 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc
 %patch390 -p1
 %patch391 -p1
 %patch392 -p1
+# Always verify its applicability.
+%patch393 -p1
+%if 0%{!?el5:1}
+%patch393 -p1 -R
+%endif
+%patch394 -p1
 
 find -name "*.orig" | xargs rm -f
 ! find -name "*.rej"	# Should not happen.
@@ -719,7 +751,7 @@ echo ====================TESTSUITE DISAB
 %else
 echo ====================TESTING=========================
 cd gdb
-gcc -o ./orphanripper %{SOURCE2} -Wall -lutil
+gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2
 # Need to use a single --ignore option, second use overrides first.
 # No `%{?_smp_mflags}' here as it may race.
 # WARNING: can't generate a core file - core tests suppressed - check ulimit
@@ -776,8 +808,7 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -
   CHECK="$(echo $CHECK|sed 's#check//unix/[^ ]*#& &/-fPIE/-pie#g')"
 %endif	# 0%{!?_with_upstream:1}
 
-  # FIXME: Temporary F12 disable: ./orphanripper
-  make %{?_smp_mflags} -k $CHECK || :
+  ./orphanripper make %{?_smp_mflags} -k $CHECK || :
 )
 for t in sum log
 do
@@ -911,6 +942,16 @@ fi
 %endif
 
 %changelog
+* Fri Dec 18 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.0-11.fc12
+- [pie] Fix general ppc64 regression due to a function descriptors bug.
+- [pie] Fix also keeping breakpoints disabled in PIE mode.
+- Import upstream <tab>-completion crash fix.
+- Drop some unused patches from the repository.
+- More RHEL-5 build compatibility updates.
+  - Use gfortran44 when running the testsuite on RHEL-5.
+  - Disable python there due to insufficient ppc multilib.
+- Fix orphanripper hangs and thus enable it again.
+
 * Mon Dec 14 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.0-10.fc12
 - Make gdb-6.3-rh-testversion-20041202.patch to accept both RHEL and Fedora GDB.
 - Adjust BuildRequires for Fedora-12, RHEL-6 and RHEL-5 builds.


--- gdb-6.3-bz182116-exec-from-pthread.patch DELETED ---


--- gdb-6.3-ia64-corefile-fix-20050127.patch DELETED ---


--- gdb-6.3-sepcrc-20050402.patch DELETED ---


--- gdb-6.3-test-sepcrc-20050402.patch DELETED ---




More information about the scm-commits mailing list