rpms/gdb/devel gdb-6.8-inlining-addon.patch, NONE, 1.1 gdb-fortran-testsuite-gfortran.patch, NONE, 1.1 gdb-watchpoint-hw-without-inferior.patch, NONE, 1.1 .cvsignore, 1.26, 1.27 gdb-6.3-framepczero-20040927.patch, 1.1, 1.2 gdb-6.3-gcore-thread-20050204.patch, 1.4, 1.5 gdb-6.3-gstack-20050411.patch, 1.2, 1.3 gdb-6.3-ia64-gcore-page0-20050421.patch, 1.4, 1.5 gdb-6.3-ia64-gcore-speedup-20050714.patch, 1.2, 1.3 gdb-6.3-ia64-sigill-20051115.patch, 1.3, 1.4 gdb-6.3-ia64-sigtramp-fp-20050926.patch, 1.5, 1.6 gdb-6.3-ia64-sigtramp-frame-20050708.patch, 1.3, 1.4 gdb-6.3-inferior-notification-20050721.patch, 1.3, 1.4 gdb-6.3-inheritance-20050324.patch, 1.2, 1.3 gdb-6.3-large-core-20051206.patch, 1.5, 1.6 gdb-6.3-linespec-20041213.patch, 1.7, 1.8 gdb-6.3-pie-20050110.patch, 1.10, 1.11 gdb-6.3-ppc64displaysymbol-20041124.patch, 1.1, 1.2 gdb-6.3-readnever-20050907.patch, 1.2, 1.3 gdb-6.3-security-errata-20050610.patch, 1.4, 1.5 gdb-6.3-sepcrc-20050402.patch, 1.3, 1.4 gdb-6.3-step-thread-exit-20050211-test.patch, 1.2, 1.3 gdb-6.3-test-movedir-20050125.patch, 1.1, 1.2 gdb-6.3-test-pie-20050107.patch, 1.7, 1.8 gdb-6.3-warnings-20050317.patch, 1.7, 1.8 gdb-6.5-bz181390-memory-address-width.patch, 1.3, 1.4 gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch, 1.6, 1.7 gdb-6.5-bz190810-gdbserver-arch-advice.patch, 1.3, 1.4 gdb-6.5-bz216711-clone-is-outermost.patch, 1.2, 1.3 gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch, 1.2, 1.3 gdb-6.5-gcore-i386-on-amd64.patch, 1.4, 1.5 gdb-6.5-sharedlibrary-path.patch, 1.3, 1.4 gdb-6.6-buildid-locate.patch, 1.15, 1.16 gdb-6.6-buildid-readnever-silent.patch, 1.1, 1.2 gdb-6.6-bz225783-gdb-debuginfo-paths.patch, 1.1, 1.2 gdb-6.6-bz237572-ppc-atomic-sequence-test.patch, 1.2, 1.3 gdb-6.6-bz247354-leader-exit-fix.patch, 1.2, 1.3 gdb-6.6-multifork-debugreg.patch, 1.7, 1.8 gdb-6.6-scheduler_locking-step-is-default.patch, 1.1, 1.2 gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch, 1.4, 1.5 gdb-6.6-step-thread-exit.patch, 1.2, 1.3 gdb-6.7-testsuite-stable-results.patch, 1.4, 1.5 gdb-6.8-attach-signalled-detach-stopped.patch, 1.1, 1.2 gdb-6.8-bz254229-gcore-prpsinfo.patch, 1.1, 1.2 gdb-6.8-bz377541-vla.patch, 1.3, 1.4 gdb-6.8-bz466901-backtrace-full-prelinked.patch, 1.2, 1.3 gdb-6.8-constant-watchpoints.patch, 1.3, 1.4 gdb-6.8-fortran-tag-constant.patch, 1.1, 1.2 gdb-6.8-inlining-by-name.patch, 1.1, 1.2 gdb-6.8-inlining.patch, 1.4, 1.5 gdb-6.8-quit-never-aborts.patch, 1.1, 1.2 gdb.spec, 1.316, 1.317 sources, 1.25, 1.26 gdb-6.3-catch-debug-registers-error-20060527.patch, 1.3, NONE gdb-6.3-dwattype0-20050201.patch, 1.3, NONE gdb-6.3-ia32el-fix-waitpid-20060615.patch, 1.1, NONE gdb-6.3-sigx86-20040621.patch, 1.2, NONE gdb-6.3-type-fix-20041213.patch, 1.2, NONE gdb-6.6-vdso-i386-on-amd64-warning.patch, 1.4, NONE gdb-6.7-reread-exec_bfd.patch, 1.2, NONE gdb-6.8-attach-signalled-upstream.patch, 1.1, NONE gdb-6.8-auto-dependencies.patch, 1.1, NONE gdb-6.8-breakpoint-gone.patch, 1.1, NONE gdb-6.8-bz377541-vla-bound-undefined.patch, 1.1, NONE gdb-6.8-bz377541-vla-loc-kind.patch, 1.1, NONE gdb-6.8-disable-randomization.patch, 1.2, NONE gdb-6.8-forced-enable-tui.patch, 1.1, NONE gdb-6.8-fortran-module-ignore.patch, 1.1, NONE gdb-6.8-ia64-breakpoint-restoration.patch, 1.1, NONE gdb-6.8-ia64-exec-hw-watchpoint.patch, 1.1, NONE gdb-6.8-sparc-fix.patch, 1.1, NONE gdb-6.8-upstream.patch, 1.9, NONE gdb-6.8-watchpoint-inaccessible-memory.patch, 1.3, NONE

Jan Kratochvil jkratoch at fedoraproject.org
Sun Dec 14 14:05:54 UTC 2008


Author: jkratoch

Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28807

Modified Files:
	.cvsignore gdb-6.3-framepczero-20040927.patch 
	gdb-6.3-gcore-thread-20050204.patch 
	gdb-6.3-gstack-20050411.patch 
	gdb-6.3-ia64-gcore-page0-20050421.patch 
	gdb-6.3-ia64-gcore-speedup-20050714.patch 
	gdb-6.3-ia64-sigill-20051115.patch 
	gdb-6.3-ia64-sigtramp-fp-20050926.patch 
	gdb-6.3-ia64-sigtramp-frame-20050708.patch 
	gdb-6.3-inferior-notification-20050721.patch 
	gdb-6.3-inheritance-20050324.patch 
	gdb-6.3-large-core-20051206.patch 
	gdb-6.3-linespec-20041213.patch gdb-6.3-pie-20050110.patch 
	gdb-6.3-ppc64displaysymbol-20041124.patch 
	gdb-6.3-readnever-20050907.patch 
	gdb-6.3-security-errata-20050610.patch 
	gdb-6.3-sepcrc-20050402.patch 
	gdb-6.3-step-thread-exit-20050211-test.patch 
	gdb-6.3-test-movedir-20050125.patch 
	gdb-6.3-test-pie-20050107.patch 
	gdb-6.3-warnings-20050317.patch 
	gdb-6.5-bz181390-memory-address-width.patch 
	gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch 
	gdb-6.5-bz190810-gdbserver-arch-advice.patch 
	gdb-6.5-bz216711-clone-is-outermost.patch 
	gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch 
	gdb-6.5-gcore-i386-on-amd64.patch 
	gdb-6.5-sharedlibrary-path.patch gdb-6.6-buildid-locate.patch 
	gdb-6.6-buildid-readnever-silent.patch 
	gdb-6.6-bz225783-gdb-debuginfo-paths.patch 
	gdb-6.6-bz237572-ppc-atomic-sequence-test.patch 
	gdb-6.6-bz247354-leader-exit-fix.patch 
	gdb-6.6-multifork-debugreg.patch 
	gdb-6.6-scheduler_locking-step-is-default.patch 
	gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch 
	gdb-6.6-step-thread-exit.patch 
	gdb-6.7-testsuite-stable-results.patch 
	gdb-6.8-attach-signalled-detach-stopped.patch 
	gdb-6.8-bz254229-gcore-prpsinfo.patch 
	gdb-6.8-bz377541-vla.patch 
	gdb-6.8-bz466901-backtrace-full-prelinked.patch 
	gdb-6.8-constant-watchpoints.patch 
	gdb-6.8-fortran-tag-constant.patch 
	gdb-6.8-inlining-by-name.patch gdb-6.8-inlining.patch 
	gdb-6.8-quit-never-aborts.patch gdb.spec sources 
Added Files:
	gdb-6.8-inlining-addon.patch 
	gdb-fortran-testsuite-gfortran.patch 
	gdb-watchpoint-hw-without-inferior.patch 
Removed Files:
	gdb-6.3-catch-debug-registers-error-20060527.patch 
	gdb-6.3-dwattype0-20050201.patch 
	gdb-6.3-ia32el-fix-waitpid-20060615.patch 
	gdb-6.3-sigx86-20040621.patch gdb-6.3-type-fix-20041213.patch 
	gdb-6.6-vdso-i386-on-amd64-warning.patch 
	gdb-6.7-reread-exec_bfd.patch 
	gdb-6.8-attach-signalled-upstream.patch 
	gdb-6.8-auto-dependencies.patch gdb-6.8-breakpoint-gone.patch 
	gdb-6.8-bz377541-vla-bound-undefined.patch 
	gdb-6.8-bz377541-vla-loc-kind.patch 
	gdb-6.8-disable-randomization.patch 
	gdb-6.8-forced-enable-tui.patch 
	gdb-6.8-fortran-module-ignore.patch 
	gdb-6.8-ia64-breakpoint-restoration.patch 
	gdb-6.8-ia64-exec-hw-watchpoint.patch gdb-6.8-sparc-fix.patch 
	gdb-6.8-upstream.patch 
	gdb-6.8-watchpoint-inaccessible-memory.patch 
Log Message:
* Sun Dec 14 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20081209-1
- Upgrade to the upstream gdb-6.8.50 snapshot.


gdb-6.8-inlining-addon.patch:

--- NEW FILE gdb-6.8-inlining-addon.patch ---
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-bt.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-bt.c	2008-12-10 00:25:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-bt.c	2008-12-10 00:37:26.000000000 +0100
@@ -13,10 +13,16 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-int x, y;
+/* VOLATILE forces all the inlining to happen as otherwise the whole program
+   gets optimized by CSE to just simple assignments of the results.  */
+volatile int x, y;
 volatile int result;
 
-void bar(void);
+inline void bar(void)
+{
+  x += y; /* set breakpoint 1 here */
+}
+
 
 inline int func1(void)
 {
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-bt.exp
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-bt.exp	2008-12-10 00:25:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-bt.exp	2008-12-10 00:37:26.000000000 +0100
@@ -41,18 +41,19 @@ if { [skip_inline_frame_tests] } {
     return
 }
 
-set line1 [gdb_get_line_number "set breakpoint 1 here" ${fullsrcfile2}]
-gdb_breakpoint $srcfile2:$line1
+set line1 [gdb_get_line_number "set breakpoint 1 here" ${srcfile}]
+gdb_breakpoint $srcfile:$line1
 
 gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (1)"
 gdb_test "backtrace" "#0  bar.*#1  .*main.*" "backtrace from bar (1)"
-gdb_test "info frame" ".*called by frame.*" "bar not inlined"
+gdb_test "info frame" ".*inlined into frame.*" "bar inlined"
 
-gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (2)"
-gdb_test "backtrace" "#0  bar.*#1  .*func1.*#2  .*main.*" \
-    "backtrace from bar (2)"
-gdb_test "up" "#1  .*func1.*" "up from bar (2)"
-gdb_test "info frame" ".*inlined into frame.*" "func1 inlined (2)"
+# gcc-4.3.1 omits the line number information for (2).
+#gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (2)"
+#gdb_test "backtrace" "#0  bar.*#1  .*func1.*#2  .*main.*" \
+#    "backtrace from bar (2)"
+#gdb_test "up" "#1  .*func1.*" "up from bar (2)"
+#gdb_test "info frame" ".*inlined into frame.*" "func1 inlined (2)"
 
 gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (3)"
 gdb_test "backtrace" "#0  bar.*#1  .*func1.*#2  .*func2.*#3  .*main.*" \
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-cmds.c	2008-12-10 00:25:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.c	2008-12-10 00:37:26.000000000 +0100
@@ -13,13 +13,19 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-int x, y;
+/* VOLATILE forces all the inlining to happen as otherwise the whole program
+   gets optimized by CSE to just simple assignments of the results.  */
+volatile int x, y;
 volatile int result;
 
-void bar(void);
 void marker(void);
 void noinline(void);
 
+inline void bar(void)
+{
+  x += y; /* set breakpoint 1 here */
+}
+
 inline int func1(void)
 {
   bar ();
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.exp
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-cmds.exp	2008-12-10 00:25:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.exp	2008-12-10 00:36:27.000000000 +0100
@@ -45,9 +45,9 @@ if { [skip_inline_frame_tests] } {
 
 # First, check that the things we expected to be inlined really were,
 # and those that shouldn't be weren't.
-set line1 [gdb_get_line_number "set breakpoint 1 here" ${fullsrcfile2}]
+set line1 [gdb_get_line_number "set breakpoint 1 here" ${srcfile2}]
 gdb_breakpoint $srcfile2:$line1
-set line2 [gdb_get_line_number "set breakpoint 2 here" ${fullsrcfile2}]
+set line2 [gdb_get_line_number "set breakpoint 2 here" ${srcfile2}]
 gdb_breakpoint $srcfile2:$line2
 
 gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (1)"
@@ -66,7 +66,7 @@ gdb_test "info frame" ".*inlined into fr
 
 gdb_test "continue" ".*set breakpoint 2 here.*" "continue to marker"
 gdb_test "backtrace" "#0  marker.*#1  .*main.*" "backtrace from marker"
-gdb_test "info frame" ".*called by frame.*" "marker not inlined"
+gdb_test "info frame" ".*\n called by frame.*" "marker not inlined"
 
 # Next, check that we can next over inlined functions.  We should not end up
 # inside any of them.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-locals.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-locals.c	2008-12-10 00:25:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-locals.c	2008-12-10 00:37:26.000000000 +0100
@@ -13,11 +13,16 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-int x, y;
+/* VOLATILE forces all the inlining to happen as otherwise the whole program
+   gets optimized by CSE to just simple assignments of the results.  */
+volatile int x, y;
 volatile int result;
 volatile int *array_p;
 
-void bar(void);
+inline void bar(void)
+{
+  x += y; /* set breakpoint 1 here */
+}
 
 inline int func1(int arg1)
 {
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-locals.exp
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-locals.exp	2008-12-10 00:25:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-locals.exp	2008-12-10 00:37:26.000000000 +0100
@@ -43,8 +43,8 @@ if { [skip_inline_var_tests] } {
 
 set no_frames [skip_inline_frame_tests]
 
-set line1 [gdb_get_line_number "set breakpoint 1 here" ${fullsrcfile2}]
-gdb_breakpoint $srcfile2:$line1
+set line1 [gdb_get_line_number "set breakpoint 1 here" ${srcfile}]
+gdb_breakpoint $srcfile:$line1
 
 gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (1)"
 
@@ -77,6 +77,9 @@ if { ! $no_frames } {
 
 # Make sure that locals on the stack are found.  This is an array to
 # prevent it from living in a register.
+if [test_compiler_info "gcc-4-3-*"] {
+    setup_kfail *-*-* "gcc/debug.optimization"
+}
 gdb_test "print array\[0\]" "\\\$$decimal = 0" "print local (2)"
 
 if { ! $no_frames } {
@@ -115,4 +118,7 @@ if { ! $no_frames } {
     gdb_test "info locals" ".*arg2 = 184.*" "info locals above bar (3b)"
 }
 
+if [test_compiler_info "gcc-4-3-*"] {
+    setup_kfail *-*-* "gcc/debug.optimization"
+}
 gdb_test "print array\[0\]" "\\\$$decimal = 184" "print local (3)"
Index: gdb-6.8.50.20081128/gdb/frame.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/frame.c	2008-12-10 00:25:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/frame.c	2008-12-10 00:25:31.000000000 +0100
@@ -269,7 +269,7 @@ fprint_frame (struct ui_file *file, stru
 static struct frame_info *
 skip_inlined_frames (struct frame_info *frame)
 {
-  while (get_frame_type (frame) == INLINE_FRAME)
+  while (frame && get_frame_type (frame) == INLINE_FRAME)
     frame = get_prev_frame (frame);
 
   return frame;
Index: gdb-6.8.50.20081128/gdb/breakpoint.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/breakpoint.c	2008-12-10 00:25:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/breakpoint.c	2008-12-10 00:36:27.000000000 +0100
@@ -57,6 +57,7 @@
 #include "top.h"
 #include "wrapper.h"
 #include "valprint.h"
+#include "inline-frame.h"
 
 #include "mi/mi-common.h"
 
@@ -2976,6 +2977,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
 	    bs->print = 0;
 	  }
 	bs->commands = copy_command_lines (bs->commands);
+
+	/* Display the innermost inlined frame at a breakpont as it gives to
+	   most of the available information.  */
+	if (b->type != bp_until && b->type != bp_finish)
+	  while (inline_skipped_frames (ptid))
+	    step_into_inline_frame (ptid);
       }
 
     /* Print nothing for this entry if we dont stop or if we dont print.  */
Index: gdb-6.8.50.20081128/gdb/inline-frame.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/inline-frame.c	2008-12-10 00:25:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/inline-frame.c	2008-12-10 00:40:49.000000000 +0100
@@ -183,6 +183,12 @@ inline_frame_sniffer (const struct frame
   if (frame_block == NULL)
     return 0;
 
+  /* For >=2 inlined functions SKIPPED_SYMBOL needs to be different after each
+     step_into_inline_frame call.  But skip_inline_frames is called only once
+     and thus SKIPPED_SYMBOL needs to be calculated by INLINE_FRAME_SNIFFER.  */
+  if (state)
+    state->skipped_symbol = NULL;
+
   /* Calculate DEPTH, the number of inlined functions at this
      location.  */
   depth = 0;
@@ -192,6 +198,10 @@ inline_frame_sniffer (const struct frame
       if (block_inlined_p (cur_block))
 	depth++;
 
+      if (state && depth == state->skipped_frames
+	  && state->skipped_symbol == NULL)
+	state->skipped_symbol = BLOCK_FUNCTION (cur_block);
+
       cur_block = BLOCK_SUPERBLOCK (cur_block);
     }
 
@@ -275,7 +285,6 @@ skip_inline_frames (ptid_t ptid)
 {
   CORE_ADDR this_pc;
   struct block *frame_block, *cur_block;
-  struct symbol *last_sym = NULL;
   int skip_count = 0;
   struct inline_state *state;
 
@@ -296,10 +305,7 @@ skip_inline_frames (ptid_t ptid)
 		 of BLOCK_START.  */
 	      if (BLOCK_START (cur_block) == this_pc
 		  || block_starting_point_at (this_pc, cur_block))
-		{
-		  skip_count++;
-		  last_sym = BLOCK_FUNCTION (cur_block);
-		}
+		skip_count++;
 	      else
 		break;
 	    }
@@ -311,7 +317,6 @@ skip_inline_frames (ptid_t ptid)
   state = allocate_inline_frame_state (ptid);
   state->skipped_frames = skip_count;
   state->saved_pc = this_pc;
-  state->skipped_symbol = last_sym;
 
   if (skip_count != 0)
     reinit_frame_cache ();
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-markers.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-markers.c	2008-12-10 00:25:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-markers.c	2008-12-10 00:37:26.000000000 +0100
@@ -15,11 +15,6 @@
 
 extern int x, y;
 
-void bar(void)
-{
-  x += y; /* set breakpoint 1 here */
-}
-
 void marker(void)
 {
   x += y; /* set breakpoint 2 here */

gdb-fortran-testsuite-gfortran.patch:

--- NEW FILE gdb-fortran-testsuite-gfortran.patch ---
http://sourceware.org/ml/gdb-patches/2008-12/msg00155.html

2008-12-08  Jan Kratochvil  <jan.kratochvil at redhat.com>

	* gdb.fortran/subarray.exp: Expect also the strings type output.
	* gdb.fortran/derived-type.exp: Likewise.  Expect also the kind=X types.
	Update for the f-valprint.c modification from 2008-04-22.

--- ./gdb/testsuite/gdb.fortran/derived-type.exp	1 Jan 2008 22:53:19 -0000	1.6
+++ ./gdb/testsuite/gdb.fortran/derived-type.exp	8 Dec 2008 18:04:34 -0000
@@ -42,23 +42,22 @@ if ![runto MAIN__] then {
 }
 
 gdb_test "ptype p" \
-    "type = Type bar.*int4.*\:\: c.*real.*\:\: d.*End Type bar" \
+    "type = Type bar.*int.*\:\: c.*real.*\:\: d.*End Type bar" \
     "ptype p"
 gdb_test "ptype q" \
-    "type = Type foo.*real.*\:\: a.*Type bar.*int4.*\:\: c.*real.*\:\: d.*End Type bar \:\: x.*character.*\\(7\\) \:\: b.*End Type foo" \
+    "type = Type foo.*real.*\:\: *a.*Type bar.*int.*\:\: *c.*real.*\:\: *d.*End Type bar \:\: *x.*character.*7.* \:\: *b.*End Type foo" \
     "type-printing for derived type"
 
 gdb_breakpoint [gdb_get_line_number "print"]
 gdb_continue_to_breakpoint "print"
 
-gdb_test "print p" "\\$\[0-9\]+ = \\{ 1, 2.375\\}"
+gdb_test "print p" "\\$\[0-9\]+ = \\( 1, 2.375 \\)"
 gdb_test "print p%c" "\\$\[0-9\]+ = 1"
 gdb_test "print p%d" "\\$\[0-9\]+ = 2.375"
 gdb_test "print q%a" "\\$\[0-9\]+ = 3.125"
-gdb_test "print q%b" "\\$\[0-9\]+ = \\(.*a.*b.*c.*d.*e.*f.*g.*\\)"
+gdb_test "print q%b" "\\$\[0-9\]+ = (\\(.*a.*b.*c.*d.*e.*f.*g.*\\)|'abcdefg')"
 gdb_test "print q%x%c" "\\$\[0-9\]+ = 1"
 gdb_test "print q%x%d" "\\$\[0-9\]+ = 2.375"
 gdb_test "print q" \
-    "\\$\[0-9\]+ = \\{ 3.125, \\{ 1, 2.375\\}, \\(.*a.*b.*c.*d.*e.*f.*g.*\\)\\}" \
+    "\\$\[0-9\]+ = \\( 3.125, \\( 1, 2.375 \\), (\\(.*a.*b.*c.*d.*e.*f.*g.*\\)|'abcdefg') \\)" \
     "print q"
-
--- ./gdb/testsuite/gdb.fortran/subarray.exp	1 Jan 2008 22:53:19 -0000	1.6
+++ ./gdb/testsuite/gdb.fortran/subarray.exp	8 Dec 2008 18:04:34 -0000
@@ -53,10 +53,10 @@ gdb_test "continue" \
 
 # Test four different kinds of subarray expression evaluation.
 
-gdb_test "print str(2:4)" ".*1 = \\(98 'b', 99 'c', 100 'd'\\).*" "print str(2:4)"
-gdb_test "print str(:3)" ".*2 = \\(97 'a', 98 'b', 99 'c'\\).*" "print str(:3)"
-gdb_test "print str(5:)" ".*3 = \\(101 'e', 102 'f', 103 'g'\\).*" "print str(5:)"
-gdb_test "print str(:)" ".*4 = \\(97 'a', 98 'b', 99 'c', 100 'd', 101 'e', 102 'f', 103 'g'\\).*" "print str(:)"
+gdb_test "print str(2:4)" ".*1 = (\\(98 'b', 99 'c', 100 'd'\\)|'bcd').*" "print str(2:4)"
+gdb_test "print str(:3)" ".*2 = (\\(97 'a', 98 'b', 99 'c'\\)|'abc').*" "print str(:3)"
+gdb_test "print str(5:)" ".*3 = (\\(101 'e', 102 'f', 103 'g'\\)|'efg').*" "print str(5:)"
+gdb_test "print str(:)" ".*4 = (\\(97 'a', 98 'b', 99 'c', 100 'd', 101 'e', 102 'f', 103 'g'\\)|'abcdefg').*" "print str(:)"
 
 gdb_test "print array(2:4)" ".*5 = \\(2, 3, 4\\).*" "print array(2:4)"
 gdb_test "print array(:3)" ".*6 = \\(1, 2, 3\\).*" "print array(:3)"

gdb-watchpoint-hw-without-inferior.patch:

--- NEW FILE gdb-watchpoint-hw-without-inferior.patch ---
2008-12-07  Jan Kratochvil  <jan.kratochvil at redhat.com>

	Fix hw watchpoints created before the inferior was started.
	* breakpoint.c (update_watchpoint): Convert the bp_watchpoint and
	bp_hardware_watchpoint types according to the current runtime state.
	(insert_breakpoints): Call update_watchpoint even for `bp_watchpoint's.

2008-12-07  Jan Kratochvil  <jan.kratochvil at redhat.com>

	* gdb.base/watchpoint-hw.exp, gdb.base/watchpoint-hw.c: New.

--- ./gdb/breakpoint.c	7 Dec 2008 15:59:51 -0000	1.364
+++ ./gdb/breakpoint.c	7 Dec 2008 21:20:54 -0000
@@ -892,6 +892,28 @@ update_watchpoint (struct breakpoint *b,
 	  b->val_valid = 1;
 	}
 
+	/* Change the type of breakpoint between hardware assisted or an
+	   ordinary watchpoint depending on the hardware support and free
+	   hardware slots.  */
+	if (b->type == bp_watchpoint || b->type == bp_hardware_watchpoint)
+	  {
+	    int i, mem_cnt, target_resources_ok, other_type_used;
+
+	    i = hw_watchpoint_used_count (bp_hardware_watchpoint,
+					  &other_type_used);
+	    mem_cnt = can_use_hardware_watchpoint (val_chain);
+
+	    /* Hack around 'unused var' error for some targets here.  */
+	    (void) i;
+	    if (mem_cnt)
+	      target_resources_ok = TARGET_CAN_USE_HARDWARE_WATCHPOINT
+			 (bp_hardware_watchpoint, i + mem_cnt, other_type_used);
+	    if (!mem_cnt || target_resources_ok <= 0)
+	      b->type = bp_watchpoint;
+	    else
+	      b->type = bp_hardware_watchpoint;
+	  }
+
       /* Look at each value on the value chain.  */
       for (v = val_chain; v; v = next)
 	{
@@ -1204,8 +1226,9 @@ insert_breakpoints (void)
 {
   struct breakpoint *bpt;
 
+  /* Software watchpoint may get converted to hardware ones.  */
   ALL_BREAKPOINTS (bpt)
-    if (is_hardware_watchpoint (bpt))
+    if (is_hardware_watchpoint (bpt) || bpt->type == bp_watchpoint)
       update_watchpoint (bpt, 0 /* don't reparse. */);
 
   update_global_location_list (1);
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/watchpoint-hw.c	7 Dec 2008 21:20:56 -0000
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   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 <http://www.gnu.org/licenses/>.
+
+   Please email any bugs, comments, and/or additions to this file to:
+   bug-gdb at prep.ai.mit.edu  */
+
+int watchee;
+
+int
+main (void)
+{
+  return 0;
+}
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/watchpoint-hw.exp	7 Dec 2008 21:20:56 -0000
@@ -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 <http://www.gnu.org/licenses/>.
+
+if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] && ![istarget "ia64-*-*"]
+    && ![istarget "s390*-*-*"]} then {
+    verbose "Skipping watchpoint-hw test."
+    return
+}
+
+set testfile watchpoint-hw
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+    untested "Couldn't compile test program"
+    return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Create the watchpoint before the inferior gets started.  Now the native CPU
+# target is still not active and its `to_can_use_hw_breakpoint' is not
+# installed, therefore only a software watchpoint gets created.
+
+gdb_test "watch watchee" "atchpoint 1: watchee"
+
+# `runto_main' or `runto main' would delete the watchpoint created above.
+
+if { [gdb_start_cmd] < 0 } {
+    untested start
+    return -1
+}
+gdb_test "" "main .* at .*" "start"
+
+# Check it is really a `hw'-watchpoint.
+gdb_test "info watchpoints" "1 *hw watchpoint .* watchee"


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/.cvsignore,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- .cvsignore	28 Mar 2008 09:32:36 -0000	1.26
+++ .cvsignore	14 Dec 2008 14:05:13 -0000	1.27
@@ -1 +1 @@
-gdb-6.8.tar.bz2
+gdb-6.8.50.20081209.tar.bz2

gdb-6.3-framepczero-20040927.patch:

Index: gdb-6.3-framepczero-20040927.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-framepczero-20040927.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.3-framepczero-20040927.patch	2 Dec 2004 18:30:25 -0000	1.1
+++ gdb-6.3-framepczero-20040927.patch	14 Dec 2008 14:05:14 -0000	1.2
@@ -3,14 +3,11 @@
 	* frame.c (get_prev_frame): Stop backtrace when a zero PC and
 	successive normal frames.
 
-Index: ./gdb/frame.c
+Index: gdb-6.8.50.20081128/gdb/frame.c
 ===================================================================
-RCS file: /cvs/src/src/gdb/frame.c,v
-retrieving revision 1.191
-diff -p -u -r1.191 frame.c
---- ./gdb/frame.c	1 Sep 2004 14:13:33 -0000	1.191
-+++ ./gdb/frame.c	28 Sep 2004 02:45:58 -0000
-@@ -1235,6 +1235,18 @@ get_prev_frame (struct frame_info *this_
+--- gdb-6.8.50.20081128.orig/gdb/frame.c	2008-12-04 01:34:37.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/frame.c	2008-12-04 01:35:47.000000000 +0100
+@@ -1566,6 +1566,18 @@ get_prev_frame (struct frame_info *this_
        return NULL;
      }
  
@@ -22,7 +19,7 @@
 +      && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
 +      && get_frame_pc (this_frame) == 0)
 +    {
-+      frame_debug_got_null_frame (gdb_stdlog, this_frame, "zero PC");
++      frame_debug_got_null_frame (this_frame, "zero PC");
 +      return NULL;
 +    }
 +

gdb-6.3-gcore-thread-20050204.patch:

Index: gdb-6.3-gcore-thread-20050204.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-gcore-thread-20050204.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- gdb-6.3-gcore-thread-20050204.patch	11 Jul 2006 06:33:02 -0000	1.4
+++ gdb-6.3-gcore-thread-20050204.patch	14 Dec 2008 14:05:14 -0000	1.5
@@ -3,17 +3,17 @@
         * linux-nat.c (linux_nat_xfer_memory): Don't use
         linux_proc_xfer_memory for ia64.
 
-Index: gdb-6.5/gdb/linux-nat.c
+Index: gdb-6.8.50.20081209/gdb/linux-nat.c
 ===================================================================
---- gdb-6.5.orig/gdb/linux-nat.c	2006-07-07 00:57:56.000000000 -0300
-+++ gdb-6.5/gdb/linux-nat.c	2006-07-07 02:24:51.000000000 -0300
-@@ -3152,10 +3152,15 @@ linux_xfer_partial (struct target_ops *o
-     return procfs_xfer_auxv (ops, object, annex, readbuf, writebuf,
- 			     offset, len);
+--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c	2008-12-10 01:22:23.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/linux-nat.c	2008-12-10 01:25:26.000000000 +0100
+@@ -4123,10 +4123,15 @@ linux_xfer_partial (struct target_ops *o
+     return linux_nat_xfer_osdata (ops, object, annex, readbuf, writebuf,
+                                offset, len);
  
 +#ifndef NATIVE_XFER_UNWIND_TABLE
 +  /* FIXME: For ia64, we cannot currently use linux_proc_xfer_memory
-+            for accessing thread storage.  Revert when Bugzilla 147436
++	    for accessing thread storage.  Revert when Bugzilla 147436
 +	    is fixed.  */
    xfer = linux_proc_xfer_partial (ops, object, annex, readbuf, writebuf,
  				  offset, len);

gdb-6.3-gstack-20050411.patch:

Index: gdb-6.3-gstack-20050411.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-gstack-20050411.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.3-gstack-20050411.patch	14 Jul 2008 09:09:04 -0000	1.2
+++ gdb-6.3-gstack-20050411.patch	14 Dec 2008 14:05:14 -0000	1.3
@@ -4,11 +4,11 @@
 	to install and uninstall.
 	* gstack.sh, gstack.1: New files.
 
-Index: gdb-6.8/gdb/Makefile.in
+Index: gdb-6.8.50.20081128/gdb/Makefile.in
 ===================================================================
---- gdb-6.8.orig/gdb/Makefile.in	2008-03-17 13:15:08.000000000 +0100
-+++ gdb-6.8/gdb/Makefile.in	2008-07-14 10:25:47.000000000 +0200
-@@ -1161,7 +1161,7 @@ gdb.z:gdb.1
+--- gdb-6.8.50.20081128.orig/gdb/Makefile.in	2008-12-01 16:11:48.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/Makefile.in	2008-12-01 16:14:11.000000000 +0100
+@@ -902,7 +902,7 @@ gdb.z:gdb.1
  # time it takes for make to check that all is up to date.
  # install-only is intended to address that need.
  install: all install-only
@@ -17,7 +17,7 @@
  	transformed_name=`t='$(program_transform_name)'; \
  			  echo gdb | sed -e "$$t"` ; \
  		if test "x$$transformed_name" = x; then \
-@@ -1193,9 +1193,26 @@ install-tui:
+@@ -934,9 +934,26 @@ install-tui:
  			$(DESTDIR)$(man1dir) ; \
  		$(INSTALL_DATA) $(srcdir)/gdb.1 \
  			$(DESTDIR)$(man1dir)/$$transformed_name.1
@@ -45,7 +45,7 @@
  	transformed_name=`t='$(program_transform_name)'; \
  			  echo gdb | sed -e $$t` ; \
  		if test "x$$transformed_name" = x; then \
-@@ -1217,6 +1234,17 @@ uninstall-tui:
+@@ -958,6 +975,17 @@ uninstall-tui:
  		fi ; \
  		rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
  		      $(DESTDIR)$(man1dir)/$$transformed_name.1
@@ -62,11 +62,11 @@
 +		      $(DESTDIR)$(man1dir)/$$transformed_name.1
  
  # The C++ name parser can be built standalone for testing.
- test-cp-name-parser.o: cp-name-parser.c $(safe_ctype_h) $(libiberty_h) \
-Index: gdb-6.8/gdb/gstack.sh
+ test-cp-name-parser.o: cp-name-parser.c
+Index: gdb-6.8.50.20081128/gdb/gstack.sh
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.8/gdb/gstack.sh	2008-07-14 10:25:47.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/gstack.sh	2008-12-01 16:13:16.000000000 +0100
 @@ -0,0 +1,45 @@
 +#!/bin/sh
 +

gdb-6.3-ia64-gcore-page0-20050421.patch:

Index: gdb-6.3-ia64-gcore-page0-20050421.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-ia64-gcore-page0-20050421.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- gdb-6.3-ia64-gcore-page0-20050421.patch	1 Nov 2007 20:24:20 -0000	1.4
+++ gdb-6.3-ia64-gcore-page0-20050421.patch	14 Dec 2008 14:05:14 -0000	1.5
@@ -1,7 +1,7 @@
-Index: gdb-6.6/gdb/gcore.c
+Index: gdb-6.8.50.20081128/gdb/gcore.c
 ===================================================================
---- gdb-6.6.orig/gdb/gcore.c
-+++ gdb-6.6/gdb/gcore.c
+--- gdb-6.8.50.20081128.orig/gdb/gcore.c	2008-09-11 16:27:34.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/gcore.c	2008-12-01 16:39:04.000000000 +0100
 @@ -475,8 +475,14 @@ gcore_copy_callback (bfd *obfd, asection
        if (size > total_size)
  	size = total_size;
@@ -17,4 +17,4 @@
 +	      || bfd_section_vma (obfd, osec) != 0))
  	{
  	  warning (_("Memory read failed for corefile section, %s bytes at 0x%s."),
- 		   paddr_d (size), paddr (bfd_section_vma (obfd, osec)));
+ 		   plongest (size), paddr (bfd_section_vma (obfd, osec)));

gdb-6.3-ia64-gcore-speedup-20050714.patch:

Index: gdb-6.3-ia64-gcore-speedup-20050714.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-ia64-gcore-speedup-20050714.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.3-ia64-gcore-speedup-20050714.patch	11 Jul 2006 06:33:02 -0000	1.2
+++ gdb-6.3-ia64-gcore-speedup-20050714.patch	14 Dec 2008 14:05:14 -0000	1.3
@@ -7,11 +7,11 @@
 	(ia64_rse_skip_regs): Ditto.
 	(ia64_linux_check_stack_region): New function.
 	
-Index: gdb-6.5/gdb/linux-nat.c
+Index: gdb-6.8.50.20081209/gdb/linux-nat.c
 ===================================================================
---- gdb-6.5.orig/gdb/linux-nat.c	2006-07-07 02:29:12.000000000 -0300
-+++ gdb-6.5/gdb/linux-nat.c	2006-07-07 03:03:55.000000000 -0300
-@@ -2473,7 +2473,9 @@ linux_nat_xfer_partial (struct target_op
+--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c	2008-12-10 01:25:43.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/linux-nat.c	2008-12-10 01:27:09.000000000 +0100
+@@ -3246,7 +3246,9 @@ linux_nat_xfer_partial (struct target_op
    do_cleanups (old_chain);
    return xfer;
  }
@@ -22,13 +22,13 @@
  static int
  linux_nat_thread_alive (ptid_t ptid)
  {
-@@ -3214,15 +3216,34 @@ linux_xfer_partial (struct target_ops *o
-     return procfs_xfer_auxv (ops, object, annex, readbuf, writebuf,
- 			     offset, len);
+@@ -4148,15 +4150,34 @@ linux_xfer_partial (struct target_ops *o
+     return linux_nat_xfer_osdata (ops, object, annex, readbuf, writebuf,
+                                offset, len);
  
 -#ifndef NATIVE_XFER_UNWIND_TABLE
 -  /* FIXME: For ia64, we cannot currently use linux_proc_xfer_memory
--            for accessing thread storage.  Revert when Bugzilla 147436
+-	    for accessing thread storage.  Revert when Bugzilla 147436
 -	    is fixed.  */
    xfer = linux_proc_xfer_partial (ops, object, annex, readbuf, writebuf,
  				  offset, len);
@@ -62,11 +62,11 @@
  
    return super_xfer_partial (ops, object, annex, readbuf, writebuf,
  			     offset, len);
-Index: gdb-6.5/gdb/ia64-linux-nat.c
+Index: gdb-6.8.50.20081209/gdb/ia64-linux-nat.c
 ===================================================================
---- gdb-6.5.orig/gdb/ia64-linux-nat.c	2006-03-24 20:08:16.000000000 -0300
-+++ gdb-6.5/gdb/ia64-linux-nat.c	2006-07-07 02:52:25.000000000 -0300
-@@ -687,6 +687,64 @@ ia64_linux_xfer_partial (struct target_o
+--- gdb-6.8.50.20081209.orig/gdb/ia64-linux-nat.c	2008-08-15 10:08:27.000000000 +0200
++++ gdb-6.8.50.20081209/gdb/ia64-linux-nat.c	2008-12-10 01:25:53.000000000 +0100
+@@ -807,6 +807,64 @@ ia64_linux_xfer_partial (struct target_o
  
  void _initialize_ia64_linux_nat (void);
  

gdb-6.3-ia64-sigill-20051115.patch:

Index: gdb-6.3-ia64-sigill-20051115.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-ia64-sigill-20051115.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.3-ia64-sigill-20051115.patch	21 Jan 2007 01:53:01 -0000	1.3
+++ gdb-6.3-ia64-sigill-20051115.patch	14 Dec 2008 14:05:14 -0000	1.4
@@ -12,10 +12,10 @@
 	* gdb.arch/ia64-sigill.c: New test.
 	* gdb.arch/ia64-sigill.exp: Ditto.
 
-Index: gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.exp
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.exp
 ===================================================================
---- /dev/null
-+++ gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.exp
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.exp	2008-12-02 21:10:57.000000000 +0100
 @@ -0,0 +1,59 @@
 +#   Copyright 2005 Free Software Foundation, Inc.
 +
@@ -76,10 +76,10 @@
 +gdb_test "handle SIGILL nostop noprint" "SIGILL.*No.*No.*Yes.*" "handle sigill"
 +gdb_test "run" "Starting program.*ia64-sigill.*\[New thread.*\].*hello world.*Program exited normally." "run to exit"
 + 
-Index: gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.c
 ===================================================================
---- /dev/null
-+++ gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.c
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.c	2008-12-02 21:10:57.000000000 +0100
 @@ -0,0 +1,8 @@
 +#include <stdio.h>
 +
@@ -89,11 +89,11 @@
 +  return 0;
 +}
 +
-Index: gdb-6.6/gdb/linux-nat.c
+Index: gdb-6.8.50.20081128/gdb/linux-nat.c
 ===================================================================
---- gdb-6.6.orig/gdb/linux-nat.c
-+++ gdb-6.6/gdb/linux-nat.c
-@@ -2241,7 +2241,8 @@ retry:
+--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c	2008-12-02 19:04:38.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/linux-nat.c	2008-12-02 21:11:11.000000000 +0100
+@@ -2974,7 +2974,8 @@ retry:
       threads can be a bit time-consuming so if we want decent
       performance with heavily multi-threaded programs, especially when
       they're using a high frequency timer, we'd better avoid it if we
@@ -103,8 +103,8 @@
  
    if (WIFSTOPPED (status))
      {
-@@ -2252,7 +2253,9 @@ retry:
-       if (!lp->step
+@@ -2992,7 +2993,9 @@ retry:
+ 	  && inf->stop_soon == NO_STOP_QUIETLY
  	  && signal_stop_state (signo) == 0
  	  && signal_print_state (signo) == 0
 -	  && signal_pass_state (signo) == 1)

gdb-6.3-ia64-sigtramp-fp-20050926.patch:

Index: gdb-6.3-ia64-sigtramp-fp-20050926.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-ia64-sigtramp-fp-20050926.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- gdb-6.3-ia64-sigtramp-fp-20050926.patch	16 Apr 2008 15:00:25 -0000	1.5
+++ gdb-6.3-ia64-sigtramp-fp-20050926.patch	14 Dec 2008 14:05:14 -0000	1.6
@@ -24,10 +24,10 @@
 
 	Fix a compilation error on a typo.
 
-Index: gdb-6.8cvs20080219/gdb/libunwind-frame.c
+Index: gdb-6.8.50.20081128/gdb/libunwind-frame.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/libunwind-frame.c	2008-01-02 00:04:03.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/libunwind-frame.c	2008-02-24 20:25:56.000000000 +0100
+--- gdb-6.8.50.20081128.orig/gdb/libunwind-frame.c	2008-05-06 20:37:46.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/libunwind-frame.c	2008-12-02 19:46:26.000000000 +0100
 @@ -61,6 +61,7 @@ static unw_word_t (*unw_find_dyn_list_p)
  struct libunwind_frame_cache
  {
@@ -44,10 +44,10 @@
    unw_regnum_t uw_sp_regnum;
    struct libunwind_frame_cache *cache;
    struct libunwind_descr *descr;
-@@ -171,14 +173,30 @@ libunwind_frame_cache (struct frame_info
+@@ -174,14 +176,30 @@ libunwind_frame_cache (struct frame_info
  				 : __LITTLE_ENDIAN);
  
-   unw_init_remote_p (&cache->cursor, as, next_frame);
+   unw_init_remote_p (&cache->cursor, as, this_frame);
 +
 +  /* For the base address, we have a small problem.  The majority
 +     of the time, we can get the stack pointer of the previous
@@ -77,7 +77,7 @@
    ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &fp);
    if (ret < 0)
      {
-@@ -186,6 +204,7 @@ libunwind_frame_cache (struct frame_info
+@@ -189,6 +207,7 @@ libunwind_frame_cache (struct frame_info
        error (_("Can't get libunwind sp register."));
      }
  
@@ -85,17 +85,17 @@
    cache->base = (CORE_ADDR)fp;
    cache->as = as;
  
-@@ -381,6 +400,31 @@ libunwind_search_unwind_table (void *as,
+@@ -376,6 +395,31 @@ libunwind_search_unwind_table (void *as,
  				    di, pi, need_unwind_info, args);
  }
  
 +void
-+libunwind_sigtramp_frame_this_id (struct frame_info *next_frame, 
++libunwind_sigtramp_frame_this_id (struct frame_info *this_frame, 
 +				  void **this_cache,
 +		      		  struct frame_id *this_id)
 +{
 +  struct libunwind_frame_cache *cache =
-+    libunwind_frame_cache (next_frame, this_cache);
++    libunwind_frame_cache (this_frame, this_cache);
 +
 +  /* Unlike a regular frame, we can't use the normal frame pointer
 +     mechanism because a sigaltstack may have been used.  Instead,
@@ -115,46 +115,37 @@
 +};
 +
  /* Verify if we are in a sigtramp frame and we can use libunwind to unwind.  */
- const struct frame_unwind *
- libunwind_sigtramp_frame_sniffer (struct frame_info *next_frame)
-@@ -419,7 +463,7 @@ libunwind_sigtramp_frame_sniffer (struct
-   ret = unw_is_signal_frame_p (&cursor);
-   unw_destroy_addr_space_p (as);
-   if (ret > 0)
--    return &libunwind_frame_unwind;
-+    return &libunwind_sigtramp_frame_unwind;
- 
-   return NULL;
- }
-Index: gdb-6.8cvs20080219/gdb/libunwind-frame.h
+ int
+ libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self,
+Index: gdb-6.8.50.20081128/gdb/libunwind-frame.h
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/libunwind-frame.h	2008-01-02 00:04:03.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/libunwind-frame.h	2008-02-24 20:23:47.000000000 +0100
-@@ -47,6 +47,9 @@ void libunwind_frame_set_descr (struct g
+--- gdb-6.8.50.20081128.orig/gdb/libunwind-frame.h	2008-05-06 20:37:46.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/libunwind-frame.h	2008-12-02 19:38:55.000000000 +0100
+@@ -52,6 +52,9 @@ void libunwind_frame_set_descr (struct g
  
- void libunwind_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ void libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache,
  			      struct frame_id *this_id);
-+void libunwind_sigtramp_frame_this_id (struct frame_info *next_frame, 
++void libunwind_sigtramp_frame_this_id (struct frame_info *this_frame, 
 +				       void **this_cache,
 +			      	       struct frame_id *this_id);
- void libunwind_frame_prev_register (struct frame_info *next_frame, void **this_cache,
- 				    int regnum, int *optimizedp,
- 				    enum lval_type *lvalp, CORE_ADDR *addrp,
-Index: gdb-6.8cvs20080219/gdb/ia64-tdep.c
+ struct value *libunwind_frame_prev_register (struct frame_info *this_frame,
+                                              void **this_cache, int regnum);
+ void libunwind_frame_dealloc_cache (struct frame_info *self, void *cache);
+Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/ia64-tdep.c	2008-02-24 20:23:40.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/ia64-tdep.c	2008-02-24 20:23:47.000000000 +0100
-@@ -2942,7 +2942,7 @@ ia64_libunwind_sigtramp_frame_this_id (s
+--- gdb-6.8.50.20081128.orig/gdb/ia64-tdep.c	2008-12-02 19:04:32.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/ia64-tdep.c	2008-12-02 21:09:46.000000000 +0100
+@@ -2964,7 +2964,7 @@ ia64_libunwind_sigtramp_frame_this_id (s
    struct frame_id id;
    CORE_ADDR prev_ip;
  
--  libunwind_frame_this_id (next_frame, this_cache, &id);
-+  libunwind_sigtramp_frame_this_id (next_frame, this_cache, &id);
+-  libunwind_frame_this_id (this_frame, this_cache, &id);
++  libunwind_sigtramp_frame_this_id (this_frame, this_cache, &id);
    if (frame_id_eq (id, null_frame_id))
      {
        (*this_id) = null_frame_id;
-@@ -2954,8 +2954,14 @@ ia64_libunwind_sigtramp_frame_this_id (s
-   frame_unwind_register (next_frame, IA64_BSP_REGNUM, buf);
+@@ -2976,8 +2976,14 @@ ia64_libunwind_sigtramp_frame_this_id (s
+   get_frame_register (this_frame, IA64_BSP_REGNUM, buf);
    bsp = extract_unsigned_integer (buf, 8);
  
 -  /* For a sigtramp frame, we don't make the check for previous ip being 0.  */

gdb-6.3-ia64-sigtramp-frame-20050708.patch:

Index: gdb-6.3-ia64-sigtramp-frame-20050708.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-ia64-sigtramp-frame-20050708.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.3-ia64-sigtramp-frame-20050708.patch	14 Jul 2008 09:09:04 -0000	1.3
+++ gdb-6.3-ia64-sigtramp-frame-20050708.patch	14 Dec 2008 14:05:14 -0000	1.4
@@ -8,33 +8,34 @@
 	* ia64-tdep.c (ia64_sigtramp_frame_prev_register): Fix an
 	ISO C compliance compilation error.
 
-Index: gdb-6.8/gdb/ia64-tdep.c
+2008-02-12  Jan Kratochvil  <jan.kratochvil at redhat.com>
+
+	Port to gdb-6.8.50.20081128, follow the upstream change:
+	http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ia64-tdep.c.diff?cvsroot=src&r1=1.176&r2=1.177
+
+Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
 ===================================================================
---- gdb-6.8.orig/gdb/ia64-tdep.c	2008-07-14 10:24:32.000000000 +0200
-+++ gdb-6.8/gdb/ia64-tdep.c	2008-07-14 10:26:46.000000000 +0200
-@@ -2043,7 +2043,100 @@ ia64_sigtramp_frame_prev_register (struc
-       pc &= ~0xf;
-       store_unsigned_integer (valuep, 8, pc);
+--- gdb-6.8.50.20081128.orig/gdb/ia64-tdep.c	2008-11-26 06:27:48.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/ia64-tdep.c	2008-12-02 19:04:32.000000000 +0100
+@@ -2107,6 +2107,94 @@ ia64_sigtramp_frame_prev_register (struc
+       return frame_unwind_got_constant (this_frame, regnum, pc);
      }
-- else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM) ||
+ 
++  /* Red Hat patch begin.  */
 +  else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
 +    {
-+      /* NAT pseudo registers 0-31: get them from UNAT. 
++      /* NAT pseudo registers 0-31: get them from UNAT.
 +       * "copied" from ia64_pseudo_register_read() */
-+      CORE_ADDR addr = 0;
 +      ULONGEST unatN_val;
 +      ULONGEST unat;
-+      read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat, 
++      read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat,
 +		   register_size (current_gdbarch, IA64_UNAT_REGNUM));
 +      unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
-+      store_unsigned_integer (valuep, register_size (current_gdbarch, regnum), 
-+			      unatN_val);
-+      *lvalp = lval_memory;
-+      *addrp = cache->saved_regs[IA64_UNAT_REGNUM];
++      return frame_unwind_got_constant (this_frame, regnum, unatN_val);
 +    }
 +  else if (IA64_NAT32_REGNUM <= regnum && regnum <= IA64_NAT127_REGNUM)
 +    {
-+      /* NAT pseudo registers 32-127. 
++      /* NAT pseudo registers 32-127.
 +       * "copied" from ia64_pseudo_register_read()
 +       * FIXME: Not currently tested -- cannot get the frame to include
 +       *        NAT32-NAT127.  */
@@ -43,18 +44,18 @@
 +      ULONGEST natN_val = 0;
 +      CORE_ADDR gr_addr = 0, nat_addr = 0;
 +
-+      read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp, 
++      read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
 +		   register_size (current_gdbarch, IA64_BSP_REGNUM));
-+      read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm, 
++      read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
 +		   register_size (current_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.  */
 +      bsp = rse_address_add (bsp, -(cfm & 0x7f));
-+ 
-+      if ((cfm & 0x7f) > regnum - V32_REGNUM) 
++
++      if ((cfm & 0x7f) > regnum - V32_REGNUM)
 +	gr_addr = rse_address_add (bsp, (regnum - V32_REGNUM));
-+      
++
 +      if (gr_addr != 0)
 +	{
 +	  /* Compute address of nat collection bits */
@@ -65,30 +66,28 @@
 +	     the nat collection from rnat.  Otherwise, we fetch the nat
 +	     collection from the computed address. FIXME: Do not know if
 +	     RNAT can be not stored in the frame--being extra cautious. */
-+	  if (nat_addr >= bsp) 
++	  if (nat_addr >= bsp)
 +	    {
 +	      nat_addr = cache->saved_regs[IA64_RNAT_REGNUM];
 +	      if (nat_addr != 0)
-+		read_memory (nat_addr, (char *) &nat_collection, 
++		read_memory (nat_addr, (char *) &nat_collection,
 +			     register_size (current_gdbarch, IA64_RNAT_REGNUM));
 +	    }
 +	  else
 +	    nat_collection = read_memory_integer (nat_addr, 8);
-+	  if (nat_addr != 0) 
++	  if (nat_addr != 0)
 +	    {
 +	      nat_bit = (gr_addr >> 3) & 0x3f;
 +	      natN_val = (nat_collection >> nat_bit) & 1;
-+	      *lvalp = lval_memory;
-+	      *addrp = nat_addr;
-+	      store_unsigned_integer (valuep, 
-+				      register_size (current_gdbarch, regnum), 
-+				      natN_val);
++	      return frame_unwind_got_constant (this_frame, regnum, natN_val);
 +	    }
-+	}      
++	}
++      warning (_("ia64_sigtramp_frame_prev_register: unhandled register %d"),
++	       regnum);
 +    }
 +  else if (regnum == VBOF_REGNUM)
 +    {
-+      /* BOF pseudo register. 
++      /* BOF pseudo register.
 +       * "copied" from ia64_pseudo_register_read()
 +       *
 +       * A virtual register frame start is provided for user convenience.
@@ -97,44 +96,45 @@
 +      ULONGEST cfm;
 +      ULONGEST bof;
 +
-+      read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp, 
++      read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
 +		   register_size (current_gdbarch, IA64_BSP_REGNUM));
-+      read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm, 
++      read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
 +		   register_size (current_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.  */
 +      bof = rse_address_add (bsp, -(cfm & 0x7f));
 +
-+      store_unsigned_integer (valuep, register_size (current_gdbarch, regnum), bof);
-+      *lvalp = lval_memory;
-+      *addrp = 0;		// NOTE: pseudo reg not a anywhere really...
++      return frame_unwind_got_constant (this_frame, regnum, bof);
 +    }
-+  else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM) ||
- 	   (regnum >= V32_REGNUM && regnum <= V127_REGNUM))
++  /* Red Hat patch end.  */
++
+   else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM)
+            || (regnum >= V32_REGNUM && regnum <= V127_REGNUM))
      {
-       CORE_ADDR addr = 0;
-@@ -2057,6 +2150,39 @@ ia64_sigtramp_frame_prev_register (struc
- 	  read_memory (addr, valuep, register_size (gdbarch, regnum));
- 	}
+@@ -2121,7 +2209,42 @@ ia64_sigtramp_frame_prev_register (struc
+       return frame_unwind_got_constant (this_frame, regnum, 0);
      }
+ 
+-  else  /* All other registers not listed above.  */
++  /* Red Hat patch begin.  */
 +  else if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM)
 +    {
-+      /* VP 0-63. 
++      /* VP 0-63.
 +       * "copied" from ia64_pseudo_register_read()
 +       *
 +       * FIXME: Not currently tested--cannot get the frame to include PR. */
 +      CORE_ADDR pr_addr = 0;
 +
 +      pr_addr = cache->saved_regs[IA64_PR_REGNUM];
-+      if (pr_addr != 0) 
++      if (pr_addr != 0)
 +	{
 +	  ULONGEST pr;
 +	  ULONGEST cfm;
 +	  ULONGEST prN_val;
-+	  read_memory (pr_addr, (char *) &pr, 
++	  read_memory (pr_addr, (char *) &pr,
 +		       register_size (current_gdbarch, IA64_PR_REGNUM));
-+	  read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm, 
++	  read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
 +		       register_size (current_gdbarch, IA64_CFM_REGNUM));
 +
 +	  /* Get the register rename base for this frame and adjust the
@@ -145,12 +145,14 @@
 +	      regnum = VP16_REGNUM + ((regnum - VP16_REGNUM) + rrb_pr) % 48;
 +	    }
 +	  prN_val = (pr & (1LL << (regnum - VP0_REGNUM))) != 0;
-+	  store_unsigned_integer (valuep, register_size (current_gdbarch, regnum), 
-+				  prN_val);
-+	  *lvalp = lval_memory;
-+	  *addrp = pr_addr;
++	  return frame_unwind_got_constant (this_frame, regnum, prN_val);
 +	}
++      warning (_("ia64_sigtramp_frame_prev_register: unhandled register %d"),
++	       regnum);
 +    }
-   else
++  /* Red Hat patch end.  */
++
++  /* All other registers not listed above.  */
      {
-       /* All other registers not listed above.  */
+       CORE_ADDR addr = cache->saved_regs[regnum];
+ 

gdb-6.3-inferior-notification-20050721.patch:

Index: gdb-6.3-inferior-notification-20050721.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-inferior-notification-20050721.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.3-inferior-notification-20050721.patch	7 Jan 2008 15:10:23 -0000	1.3
+++ gdb-6.3-inferior-notification-20050721.patch	14 Dec 2008 14:05:14 -0000	1.4
@@ -9,8 +9,10 @@
 
 	* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
 
---- gdb-6.3/gdb/testsuite/gdb.base/attach-32.c.fix3	2005-07-21 14:23:50.000000000 -0400
-+++ gdb-6.3/gdb/testsuite/gdb.base/attach-32.c	2005-07-21 14:05:56.000000000 -0400
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c	2008-12-07 10:06:03.000000000 +0100
 @@ -0,0 +1,20 @@
 +/* This program is intended to be started outside of gdb, and then
 +   attached to by gdb.  Thus, it simply spins in a loop.  The loop
@@ -32,8 +34,10 @@
 +    }
 +  return 0;
 +}
---- gdb-6.3/gdb/testsuite/gdb.base/attach-32.exp.fix3	2005-07-21 14:23:45.000000000 -0400
-+++ gdb-6.3/gdb/testsuite/gdb.base/attach-32.exp	2005-07-21 17:58:28.000000000 -0400
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp	2008-12-07 10:08:52.000000000 +0100
 @@ -0,0 +1,252 @@
 +# Copyright 2005 Free Software Foundation, Inc.
 +
@@ -131,7 +135,7 @@
 +
 +    send_gdb "tbreak 19\n"
 +    gdb_expect {
-+	-re "Breakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" {
++	-re "reakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" {
 +	    pass "after attach-32, set tbreak postloop"
 +	}
 +	-re "$gdb_prompt $" {
@@ -287,8 +291,10 @@
 +do_call_attach_tests
 +
 +return 0
---- gdb-6.3/gdb/testsuite/gdb.base/attach-32b.c.fix3	2005-07-21 14:23:57.000000000 -0400
-+++ gdb-6.3/gdb/testsuite/gdb.base/attach-32b.c	2005-07-21 14:06:02.000000000 -0400
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32b.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32b.c	2008-12-07 10:06:03.000000000 +0100
 @@ -0,0 +1,24 @@
 +/* This program is intended to be started outside of gdb, and then
 +   attached to by gdb.  Thus, it simply spins in a loop.  The loop

gdb-6.3-inheritance-20050324.patch:

Index: gdb-6.3-inheritance-20050324.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-inheritance-20050324.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.3-inheritance-20050324.patch	11 Jul 2006 06:33:02 -0000	1.2
+++ gdb-6.3-inheritance-20050324.patch	14 Dec 2008 14:05:14 -0000	1.3
@@ -3,22 +3,23 @@
 	* valops.c (check_field_in): Use check_typedef for base classes
 	to avoid problems with opaque type references.
 
-Index: gdb-6.5/gdb/valops.c
+Index: gdb-6.8.50.20081128/gdb/valops.c
 ===================================================================
---- gdb-6.5.orig/gdb/valops.c	2005-12-17 20:34:03.000000000 -0200
-+++ gdb-6.5/gdb/valops.c	2006-07-07 02:35:09.000000000 -0300
-@@ -2257,8 +2257,13 @@ check_field_in (struct type *type, const
+--- gdb-6.8.50.20081128.orig/gdb/valops.c	2008-12-08 10:56:11.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/valops.c	2008-12-08 10:59:14.000000000 +0100
+@@ -2484,8 +2484,14 @@ check_field (struct type *type, const ch
      }
  
    for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
--    if (check_field_in (TYPE_BASECLASS (type, i), name))
+-    if (check_field (TYPE_BASECLASS (type, i), name))
 -      return 1;
 +    {
 +      /* Check the base classes.  Make sure we have the real type for
 +         each base class as opposed to an opaque declaration.  */
 +      struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
-+      if (check_field_in (baseclass, name))
-+        return 1;
++
++      if (check_field (baseclass, name))
++	return 1;
 +    }
  
    return 0;

gdb-6.3-large-core-20051206.patch:

Index: gdb-6.3-large-core-20051206.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-large-core-20051206.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- gdb-6.3-large-core-20051206.patch	27 Aug 2008 11:07:47 -0000	1.5
+++ gdb-6.3-large-core-20051206.patch	14 Dec 2008 14:05:14 -0000	1.6
@@ -25,10 +25,10 @@
 
 	Port to GDB-6.7.
 
-Index: gdb-6.7/gdb/symfile-mem.c
+Index: gdb-6.8.50.20081128/gdb/symfile-mem.c
 ===================================================================
---- gdb-6.7.orig/gdb/symfile-mem.c	2007-10-13 05:29:58.000000000 +0200
-+++ gdb-6.7/gdb/symfile-mem.c	2007-10-15 21:37:54.000000000 +0200
+--- gdb-6.8.50.20081128.orig/gdb/symfile-mem.c	2008-01-01 23:53:13.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/symfile-mem.c	2008-12-02 22:15:53.000000000 +0100
 @@ -56,6 +56,14 @@
  #include "elf/common.h"
  
@@ -53,11 +53,11 @@
    if (nbfd == NULL)
      error (_("Failed to read a valid object file image from memory."));
  
-Index: gdb-6.7/gdb/target.c
+Index: gdb-6.8.50.20081128/gdb/target.c
 ===================================================================
---- gdb-6.7.orig/gdb/target.c	2007-10-14 23:42:39.000000000 +0200
-+++ gdb-6.7/gdb/target.c	2007-10-15 21:37:54.000000000 +0200
-@@ -55,7 +55,7 @@ static int nosymbol (char *, CORE_ADDR *
+--- gdb-6.8.50.20081128.orig/gdb/target.c	2008-11-09 12:27:18.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/target.c	2008-12-02 22:17:28.000000000 +0100
+@@ -57,7 +57,7 @@ static int nosymbol (char *, CORE_ADDR *
  
  static void tcomplain (void) ATTR_NORETURN;
  
@@ -66,16 +66,16 @@
  
  static int return_zero (void);
  
-@@ -275,7 +275,7 @@ target_load (char *arg, int from_tty)
-   (*current_target.to_load) (arg, from_tty);
+@@ -299,7 +299,7 @@ void target_create_inferior (char *exec_
  }
  
+ 
 -static int
 +static LONGEST
  nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
  	  struct target_ops *t)
  {
-@@ -518,7 +518,7 @@ update_current_target (void)
+@@ -530,7 +530,7 @@ update_current_target (void)
  	    (void (*) (struct regcache *))
  	    noprocess);
    de_fault (deprecated_xfer_memory,
@@ -84,7 +84,7 @@
  	    nomemory);
    de_fault (to_files_info,
  	    (void (*) (struct target_ops *))
-@@ -1195,7 +1195,7 @@ target_xfer_partial (struct target_ops *
+@@ -1250,7 +1250,7 @@ target_xfer_partial (struct target_ops *
     it makes no progress, and then return how much was transferred). */
  
  int
@@ -93,7 +93,7 @@
  {
    if (target_read (&current_target, TARGET_OBJECT_MEMORY, NULL,
  		   myaddr, memaddr, len) == len)
-@@ -1205,7 +1205,7 @@ target_read_memory (CORE_ADDR memaddr, g
+@@ -1260,7 +1260,7 @@ target_read_memory (CORE_ADDR memaddr, g
  }
  
  int
@@ -102,7 +102,7 @@
  {
    if (target_write (&current_target, TARGET_OBJECT_MEMORY, NULL,
  		    myaddr, memaddr, len) == len)
-@@ -2228,8 +2228,8 @@ debug_to_prepare_to_store (struct regcac
+@@ -2690,8 +2690,8 @@ debug_to_prepare_to_store (struct regcac
    fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
  }
  
@@ -113,7 +113,7 @@
  			      int write, struct mem_attrib *attrib,
  			      struct target_ops *target)
  {
-@@ -2239,9 +2239,9 @@ deprecated_debug_xfer_memory (CORE_ADDR 
+@@ -2701,9 +2701,9 @@ deprecated_debug_xfer_memory (CORE_ADDR 
  						attrib, target);
  
    fprintf_unfiltered (gdb_stdlog,
@@ -125,11 +125,11 @@
  
    if (retval > 0)
      {
-Index: gdb-6.7/gdb/target.h
+Index: gdb-6.8.50.20081128/gdb/target.h
 ===================================================================
---- gdb-6.7.orig/gdb/target.h	2007-10-14 23:24:52.000000000 +0200
-+++ gdb-6.7/gdb/target.h	2007-10-15 21:39:20.000000000 +0200
-@@ -351,10 +351,10 @@ struct target_ops
+--- gdb-6.8.50.20081128.orig/gdb/target.h	2008-11-09 12:27:18.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/target.h	2008-12-02 22:15:53.000000000 +0100
+@@ -358,10 +358,10 @@ struct target_ops
         NOTE: cagney/2004-10-01: This has been entirely superseeded by
         to_xfer_partial and inferior inheritance.  */
  
@@ -144,7 +144,7 @@
  
      void (*to_files_info) (struct target_ops *);
      int (*to_insert_breakpoint) (struct bp_target_info *);
-@@ -615,13 +615,14 @@ extern DCACHE *target_dcache;
+@@ -661,13 +661,14 @@ extern DCACHE *target_dcache;
  
  extern int target_read_string (CORE_ADDR, char **, int, int *);
  
@@ -163,11 +163,11 @@
  
  /* Fetches the target's memory map.  If one is found it is sorted
     and returned, after some consistency checking.  Otherwise, NULL
-Index: gdb-6.7/gdb/dcache.c
+Index: gdb-6.8.50.20081128/gdb/dcache.c
 ===================================================================
---- gdb-6.7.orig/gdb/dcache.c	2007-08-23 20:08:28.000000000 +0200
-+++ gdb-6.7/gdb/dcache.c	2007-10-15 21:37:54.000000000 +0200
-@@ -517,9 +517,9 @@ dcache_free (DCACHE *dcache)
+--- gdb-6.8.50.20081128.orig/gdb/dcache.c	2008-09-23 20:35:29.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/dcache.c	2008-12-02 22:15:53.000000000 +0100
+@@ -524,9 +524,9 @@ dcache_free (DCACHE *dcache)
  
     This routine is indended to be called by remote_xfer_ functions. */
  
@@ -179,10 +179,10 @@
  {
    int i;
    int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr);
-Index: gdb-6.7/gdb/dcache.h
+Index: gdb-6.8.50.20081128/gdb/dcache.h
 ===================================================================
---- gdb-6.7.orig/gdb/dcache.h	2007-08-23 20:08:28.000000000 +0200
-+++ gdb-6.7/gdb/dcache.h	2007-10-15 21:37:54.000000000 +0200
+--- gdb-6.8.50.20081128.orig/gdb/dcache.h	2008-01-01 23:53:09.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/dcache.h	2008-12-02 22:15:53.000000000 +0100
 @@ -35,7 +35,7 @@ void dcache_free (DCACHE *);
  
  /* Simple to call from <remote>_xfer_memory */
@@ -193,11 +193,11 @@
 +			    LONGEST len, int should_write);
  
  #endif /* DCACHE_H */
-Index: gdb-6.7/gdb/exec.c
+Index: gdb-6.8.50.20081128/gdb/exec.c
 ===================================================================
---- gdb-6.7.orig/gdb/exec.c	2007-08-23 20:08:28.000000000 +0200
-+++ gdb-6.7/gdb/exec.c	2007-10-15 21:37:54.000000000 +0200
-@@ -453,8 +453,8 @@ map_vmap (bfd *abfd, bfd *arch)
+--- gdb-6.8.50.20081128.orig/gdb/exec.c	2008-10-30 19:42:28.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/exec.c	2008-12-02 22:15:53.000000000 +0100
+@@ -459,8 +459,8 @@ map_vmap (bfd *abfd, bfd *arch)
     The same routine is used to handle both core and exec files;
     we just tail-call it with more arguments to select between them.  */
  
@@ -208,11 +208,11 @@
  	     struct mem_attrib *attrib, struct target_ops *target)
  {
    int res;
-Index: gdb-6.7/gdb/linux-nat.c
+Index: gdb-6.8.50.20081128/gdb/linux-nat.c
 ===================================================================
---- gdb-6.7.orig/gdb/linux-nat.c	2007-10-15 00:13:52.000000000 +0200
-+++ gdb-6.7/gdb/linux-nat.c	2007-10-15 21:37:54.000000000 +0200
-@@ -3248,7 +3248,7 @@ linux_xfer_partial (struct target_ops *o
+--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c	2008-12-02 21:11:11.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/linux-nat.c	2008-12-02 22:15:53.000000000 +0100
+@@ -4053,7 +4053,7 @@ linux_xfer_partial (struct target_ops *o
  	 Revert when Bugzilla 147436 is fixed.  */
        if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
  	{ /* This region contains ia64 rse registers, we have to re-read.  */
@@ -221,10 +221,10 @@
  
  	  /* Re-read register stack area.  */
  	  xxfer = super_xfer_partial (ops, object, annex,
-Index: gdb-6.7/gdb/remote.c
+Index: gdb-6.8.50.20081128/gdb/remote.c
 ===================================================================
---- gdb-6.7.orig/gdb/remote.c	2007-10-14 23:42:39.000000000 +0200
-+++ gdb-6.7/gdb/remote.c	2007-10-15 21:37:54.000000000 +0200
+--- gdb-6.8.50.20081128.orig/gdb/remote.c	2008-11-24 17:53:44.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/remote.c	2008-12-02 22:17:00.000000000 +0100
 @@ -25,6 +25,7 @@
  #include "gdb_string.h"
  #include <ctype.h>
@@ -233,7 +233,7 @@
  #include "inferior.h"
  #include "bfd.h"
  #include "symfile.h"
-@@ -4484,19 +4485,27 @@ remote_read_bytes (CORE_ADDR memaddr, gd
+@@ -5687,12 +5688,19 @@ handle_notification (char *buf, size_t l
     if SHOULD_WRITE is nonzero.  Returns length of data written or
     read; 0 for error.  TARGET is unused.  */
  
@@ -247,15 +247,15 @@
    int res;
 +  int len;
 +
-+
 +  /* This routine is not set up to handle > INT_MAX bytes.  */
 +  if (mem_len >= (LONGEST)INT_MAX)
 +    return 0;
 +
 +  len = (int)mem_len;
  
-   if (should_write)
-     res = remote_write_bytes (mem_addr, buffer, mem_len);
+   set_general_thread (inferior_ptid);
+ 
+@@ -5701,7 +5709,7 @@ remote_xfer_memory (CORE_ADDR mem_addr, 
    else
      res = remote_read_bytes (mem_addr, buffer, mem_len);
  
@@ -264,11 +264,11 @@
  }
  
  /* Sends a packet with content determined by the printf format string
-Index: gdb-6.7/gdb/remote-sim.c
+Index: gdb-6.8.50.20081128/gdb/remote-sim.c
 ===================================================================
---- gdb-6.7.orig/gdb/remote-sim.c	2007-08-23 20:08:36.000000000 +0200
-+++ gdb-6.7/gdb/remote-sim.c	2007-10-15 21:41:33.000000000 +0200
-@@ -747,11 +747,14 @@ gdbsim_prepare_to_store (struct regcache
+--- gdb-6.8.50.20081128.orig/gdb/remote-sim.c	2008-11-13 02:26:43.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/remote-sim.c	2008-12-02 22:15:53.000000000 +0100
+@@ -763,11 +763,14 @@ gdbsim_prepare_to_store (struct regcache
  
     Returns the number of bytes transferred. */
  
@@ -285,7 +285,7 @@
    /* If no program is running yet, then ignore the simulator for
       memory.  Pass the request down to the next target, hopefully
       an exec file.  */
-@@ -767,22 +770,22 @@ gdbsim_xfer_inferior_memory (CORE_ADDR m
+@@ -783,22 +786,22 @@ gdbsim_xfer_inferior_memory (CORE_ADDR m
        printf_filtered ("gdbsim_xfer_inferior_memory: myaddr 0x");
        gdb_print_host_address (myaddr, gdb_stdout);
        printf_filtered (", memaddr 0x%s, len %d, write %d\n",

gdb-6.3-linespec-20041213.patch:

Index: gdb-6.3-linespec-20041213.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-linespec-20041213.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gdb-6.3-linespec-20041213.patch	27 Aug 2008 11:07:47 -0000	1.7
+++ gdb-6.3-linespec-20041213.patch	14 Dec 2008 14:05:14 -0000	1.8
@@ -21,19 +21,19 @@
 
 [ Remove decode_variable* for GDB-6.8+ as no longer needed.  ]
 
-Index: gdb-6.7/gdb/linespec.c
+Index: gdb-6.8.50.20081128/gdb/linespec.c
 ===================================================================
---- gdb-6.7.orig/gdb/linespec.c	2007-08-23 20:08:35.000000000 +0200
-+++ gdb-6.7/gdb/linespec.c	2007-10-13 05:26:33.000000000 +0200
-@@ -36,6 +36,7 @@
- #include "linespec.h"
- #include "exceptions.h"
- #include "language.h"
+--- gdb-6.8.50.20081128.orig/gdb/linespec.c	2008-09-05 13:37:17.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/linespec.c	2008-12-04 01:43:36.000000000 +0100
+@@ -39,6 +39,7 @@
+ #include "interps.h"
+ #include "mi/mi-cmds.h"
+ #include "target.h"
 +#include "gdb_assert.h"
  
  /* We share this one with symtab.c, but it is not exported widely. */
  
-@@ -75,7 +76,8 @@ static struct symtabs_and_lines find_met
+@@ -78,7 +79,8 @@ static struct symtabs_and_lines find_met
  
  static int collect_methods (char *copy, struct type *t,
  			    struct symbol *sym_class,
@@ -43,7 +43,7 @@
  
  static NORETURN void cplusplus_error (const char *name,
  				      const char *fmt, ...)
-@@ -84,11 +86,13 @@ static NORETURN void cplusplus_error (co
+@@ -87,11 +89,13 @@ static NORETURN void cplusplus_error (co
  static int total_number_of_methods (struct type *type);
  
  static int find_methods (struct type *, char *,
@@ -59,7 +59,7 @@
  
  static int add_constructors (int method_counter, struct type *t,
  			     enum language language,
-@@ -104,6 +108,9 @@ static int is_objc_method_format (const 
+@@ -107,6 +111,9 @@ static int is_objc_method_format (const 
  static struct symtabs_and_lines decode_line_2 (struct symbol *[],
  					       int, int, char ***);
  
@@ -69,7 +69,7 @@
  static struct symtab *symtab_from_filename (char **argptr,
  					    char *p, int is_quote_enclosed,
  					    int *not_found_ptr);
-@@ -194,13 +201,18 @@ total_number_of_methods (struct type *ty
+@@ -196,13 +203,18 @@ total_number_of_methods (struct type *ty
  /* Recursive helper function for decode_line_1.
     Look for methods named NAME in type T.
     Return number of matches.
@@ -90,7 +90,7 @@
  {
    int i1 = 0;
    int ibase;
-@@ -243,7 +255,7 @@ find_methods (struct type *t, char *name
+@@ -244,7 +256,7 @@ find_methods (struct type *t, char *name
  	  if (strcmp_iw (name, method_name) == 0)
  	    /* Find all the overloaded methods with that name.  */
  	    i1 += add_matching_methods (method_counter, t, language,
@@ -99,7 +99,7 @@
  	  else if (strncmp (class_name, name, name_len) == 0
  		   && (class_name[name_len] == '\0'
  		       || class_name[name_len] == '<'))
-@@ -266,21 +278,100 @@ find_methods (struct type *t, char *name
+@@ -267,21 +279,100 @@ find_methods (struct type *t, char *name
    if (i1 == 0)
      for (ibase = 0; ibase < TYPE_N_BASECLASSES (t); ibase++)
        i1 += find_methods (TYPE_BASECLASS (t, ibase), name,
@@ -202,7 +202,7 @@
  
    for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
         field_counter >= 0;
-@@ -305,6 +396,16 @@ add_matching_methods (int method_counter
+@@ -306,6 +397,16 @@ add_matching_methods (int method_counter
        else
  	phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
  
@@ -229,7 +229,7 @@
    return i1;
  }
  
-@@ -610,6 +714,146 @@ decode_line_2 (struct symbol *sym_arr[],
+@@ -630,6 +734,146 @@ See set/show multiple-symbol."));
    discard_cleanups (old_chain);
    return return_values;
  }
@@ -329,7 +329,7 @@
 +		{
 +		  if (canonical_arr[i] == NULL)
 +		    {
-+		      symname = DEPRECATED_SYMBOL_NAME (msym_arr[i]);
++		      symname = SYMBOL_LINKAGE_NAME (msym_arr[i]);
 +		      canonical_arr[i] = savestring (symname, strlen (symname));
 +		    }
 +		}
@@ -352,7 +352,7 @@
 +	    {
 +	      if (canonical_arr)
 +		{
-+		  symname = DEPRECATED_SYMBOL_NAME (msym_arr[num]);
++		  symname = SYMBOL_LINKAGE_NAME (msym_arr[num]);
 +		  make_cleanup (xfree, symname);
 +		  canonical_arr[i] = savestring (symname, strlen (symname));
 +		}
@@ -376,7 +376,7 @@
  
  /* The parser of linespec itself. */
  
-@@ -1414,35 +1658,46 @@ find_method (int funfirstline, char ***c
+@@ -1438,35 +1682,46 @@ find_method (int funfirstline, char ***c
    struct symbol **sym_arr =  alloca (total_number_of_methods (t)
  				     * sizeof (struct symbol *));
  
@@ -437,7 +437,7 @@
        return decode_line_2 (sym_arr, i1, funfirstline, canonical);
      }
    else
-@@ -1469,11 +1722,12 @@ find_method (int funfirstline, char ***c
+@@ -1493,11 +1748,12 @@ find_method (int funfirstline, char ***c
  }
  
  /* Find all methods named COPY in the class whose type is T, and put
@@ -452,7 +452,7 @@
  {
    int i1 = 0;	/*  Counter for the symbol array.  */
  
-@@ -1495,7 +1749,7 @@ collect_methods (char *copy, struct type
+@@ -1518,7 +1774,7 @@ collect_methods (char *copy, struct type
  	}
      }
    else
@@ -461,15 +461,3 @@
  
    return i1;
  }
---- gdb-6.8/gdb/Makefile.in.orig	2008-08-27 12:59:59.000000000 +0200
-+++ gdb-6.8/gdb/Makefile.in	2008-08-27 13:00:19.000000000 +0200
-@@ -2341,7 +2341,8 @@ libunwind-frame.o: libunwind-frame.c $(d
- linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
- 	$(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
- 	$(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) \
--	$(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h)
-+	$(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h) \
-+	$(gdb_assert_h)
- linux-fork.o: linux-fork.c $(defs_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) \
- 	$(infcall_h) $(gdb_assert_h) $(gdb_string_h) $(linux_fork_h) \
- 	$(linux_nat_h) $(gdb_wait_h) $(gdb_dirent_h)

gdb-6.3-pie-20050110.patch:

Index: gdb-6.3-pie-20050110.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-pie-20050110.patch,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- gdb-6.3-pie-20050110.patch	2 Sep 2008 00:55:43 -0000	1.10
+++ gdb-6.3-pie-20050110.patch	14 Dec 2008 14:05:15 -0000	1.11
@@ -26,28 +26,19 @@
 
 	Fix scan_dyntag() for binaries provided by valgrind (BZ 460319).
 
---- ./gdb/Makefile.in	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/Makefile.in	2008-08-30 23:40:33.000000000 +0200
-@@ -1928,7 +1928,7 @@ amd64-tdep.o: amd64-tdep.c $(defs_h) $(a
- 	$(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
- 	$(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \
- 	$(regset_h) $(symfile_h) $(gdb_assert_h) $(amd64_tdep_h) \
--	$(i387_tdep_h)
-+	$(i387_tdep_h) $(exceptions_h)
- annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \
- 	$(gdbtypes_h) $(breakpoint_h)
- arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(buildsym_h) \
---- ./gdb/amd64-tdep.c	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/amd64-tdep.c	2008-08-30 23:40:33.000000000 +0200
-@@ -36,6 +36,7 @@
+Index: gdb-6.8.50.20081209/gdb/amd64-tdep.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/amd64-tdep.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/amd64-tdep.c	2008-12-14 14:56:49.000000000 +0100
+@@ -34,6 +34,7 @@
+ #include "regcache.h"
+ #include "regset.h"
  #include "symfile.h"
- #include "dwarf2-frame.h"
- #include "gdb_assert.h"
 +#include "exceptions.h"
  
- #include "amd64-tdep.h"
- #include "i387-tdep.h"
-@@ -731,16 +732,28 @@ amd64_alloc_frame_cache (void)
+ #include "gdb_assert.h"
+ 
+@@ -906,16 +907,28 @@ amd64_analyze_stack_align (CORE_ADDR pc,
     Any function that doesn't start with this sequence will be assumed
     to have no prologue and thus no valid frame pointer in %rbp.  */
  
@@ -78,9 +69,9 @@
 +      return 1;
 +    }
  
-   op = read_memory_unsigned_integer (pc, 1);
+   pc = amd64_analyze_stack_align (pc, current_pc, cache);
  
-@@ -753,18 +766,57 @@ amd64_analyze_prologue (CORE_ADDR pc, CO
+@@ -930,18 +943,57 @@ amd64_analyze_prologue (CORE_ADDR pc, CO
  
        /* If that's all, return now.  */
        if (current_pc <= pc + 1)
@@ -141,18 +132,29 @@
    return pc;
  }
  
---- ./gdb/auxv.c	2008-01-16 17:27:37.000000000 +0100
-+++ ./gdb/auxv.c	2008-08-30 23:40:33.000000000 +0200
+Index: gdb-6.8.50.20081209/gdb/auxv.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/auxv.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/auxv.c	2008-12-14 14:57:58.000000000 +0100
 @@ -80,7 +80,7 @@ procfs_xfer_auxv (struct target_ops *ops
     Return 1 if an entry was read into *TYPEP and *VALP.  */
  int
- target_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
+ default_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
 -		   gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
 +		   gdb_byte *endptr, ULONGEST *typep, CORE_ADDR *valp)
  {
-   const int sizeof_auxv_field = TYPE_LENGTH (builtin_type_void_data_ptr);
-   gdb_byte *ptr = *readptr;
-@@ -105,9 +105,10 @@ target_auxv_parse (struct target_ops *op
+   const int sizeof_auxv_field = gdbarch_ptr_bit (target_gdbarch)
+ 				/ TARGET_CHAR_BIT;
+@@ -107,7 +107,7 @@ default_auxv_parse (struct target_ops *o
+    Return 1 if an entry was read into *TYPEP and *VALP.  */
+ int
+ target_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
+-                  gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
++                  gdb_byte *endptr, ULONGEST *typep, CORE_ADDR *valp)
+ {
+   struct target_ops *t;
+   for (t = ops; t != NULL; t = t->beneath)
+@@ -122,9 +122,10 @@ target_auxv_parse (struct target_ops *op
     an error getting the information.  On success, return 1 after
     storing the entry's value field in *VALP.  */
  int
@@ -165,7 +167,7 @@
    gdb_byte *data;
    LONGEST n = target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL, &data);
    gdb_byte *ptr = data;
-@@ -117,10 +118,10 @@ target_auxv_search (struct target_ops *o
+@@ -134,10 +135,10 @@ target_auxv_search (struct target_ops *o
      return n;
  
    while (1)
@@ -178,7 +180,7 @@
  	  {
  	    xfree (data);
  	    *valp = val;
-@@ -143,7 +144,8 @@ target_auxv_search (struct target_ops *o
+@@ -160,7 +161,8 @@ target_auxv_search (struct target_ops *o
  int
  fprint_target_auxv (struct ui_file *file, struct target_ops *ops)
  {
@@ -188,14 +190,13 @@
    gdb_byte *data;
    LONGEST len = target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL,
  				   &data);
-@@ -153,14 +155,14 @@ fprint_target_auxv (struct ui_file *file
+@@ -170,13 +172,13 @@ fprint_target_auxv (struct ui_file *file
    if (len <= 0)
      return len;
  
 -  while (target_auxv_parse (ops, &ptr, data + len, &type, &val) > 0)
 +  while (target_auxv_parse (ops, &ptr, data + len, &at_type, &val) > 0)
      {
-       extern int addressprint;
        const char *name = "???";
        const char *description = "";
        enum { dec, hex, str } flavor = hex;
@@ -205,17 +206,28 @@
  	{
  #define TAG(tag, text, kind) \
  	case tag: name = #tag; description = text; flavor = kind; break
-@@ -213,7 +215,7 @@ fprint_target_auxv (struct ui_file *file
+@@ -231,7 +233,7 @@ fprint_target_auxv (struct ui_file *file
  	}
  
        fprintf_filtered (file, "%-4s %-20s %-30s ",
--			paddr_d (type), name, description);
-+			paddr_d (at_type), name, description);
+-			plongest (type), name, description);
++			plongest (at_type), name, description);
        switch (flavor)
  	{
  	case dec:
---- ./gdb/auxv.h	2008-01-01 23:53:09.000000000 +0100
-+++ ./gdb/auxv.h	2008-08-30 23:40:33.000000000 +0200
+@@ -252,7 +254,7 @@ fprint_target_auxv (struct ui_file *file
+ 	  break;
+ 	}
+       ++ents;
+-      if (type == AT_NULL)
++      if (at_type == AT_NULL)
+ 	break;
+     }
+ 
+Index: gdb-6.8.50.20081209/gdb/auxv.h
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/auxv.h	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/auxv.h	2008-12-14 14:56:49.000000000 +0100
 @@ -35,14 +35,14 @@ struct target_ops;		/* Forward declarati
     Return 1 if an entry was read into *TYPEP and *VALP.  */
  extern int target_auxv_parse (struct target_ops *ops,
@@ -233,9 +245,11 @@
  
  /* Print the contents of the target's AUXV on the specified file. */
  extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops);
---- ./gdb/breakpoint.c	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/breakpoint.c	2008-08-30 23:40:33.000000000 +0200
-@@ -3971,7 +3971,8 @@ describe_other_breakpoints (CORE_ADDR pc
+Index: gdb-6.8.50.20081209/gdb/breakpoint.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/breakpoint.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/breakpoint.c	2008-12-14 14:56:49.000000000 +0100
+@@ -3861,7 +3861,8 @@ describe_other_breakpoints (CORE_ADDR pc
  	      printf_filtered (" (thread %d)", b->thread);
  	    printf_filtered ("%s%s ",
  			     ((b->enable_state == bp_disabled || 
@@ -245,8 +259,8 @@
  			      ? " (disabled)"
  			      : b->enable_state == bp_permanent 
  			      ? " (permanent)"
-@@ -4623,6 +4624,62 @@ disable_breakpoints_in_unloaded_shlib (s
-   }
+@@ -4692,6 +4693,61 @@ create_catchpoint (int tempflag, char *c
+   return b;
  }
  
 +void
@@ -304,13 +318,14 @@
 +    }
 +}
 +
-+
  static void
  create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
- 				    enum bptype bp_kind)
---- ./gdb/breakpoint.h	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/breakpoint.h	2008-08-30 23:40:33.000000000 +0200
-@@ -144,6 +144,7 @@ enum enable_state
+                                     struct breakpoint_ops *ops)
+Index: gdb-6.8.50.20081209/gdb/breakpoint.h
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/breakpoint.h	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/breakpoint.h	2008-12-14 14:56:49.000000000 +0100
+@@ -126,6 +126,7 @@ enum enable_state
  			   automatically enabled and reset when the call 
  			   "lands" (either completes, or stops at another 
  			   eventpoint). */
@@ -318,7 +333,7 @@
      bp_permanent	/* There is a breakpoint instruction hard-wired into
  			   the target's code.  Don't try to write another
  			   breakpoint instruction on top of it, or restore
-@@ -828,6 +829,10 @@ extern void remove_thread_event_breakpoi
+@@ -818,6 +819,10 @@ extern void remove_thread_event_breakpoi
  
  extern void disable_breakpoints_in_shlibs (void);
  
@@ -329,9 +344,11 @@
  /* This function returns TRUE if ep is a catchpoint. */
  extern int ep_is_catchpoint (struct breakpoint *);
  
---- ./gdb/dwarf2read.c	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/dwarf2read.c	2008-08-30 23:40:33.000000000 +0200
-@@ -1222,7 +1222,7 @@ dwarf2_build_psymtabs (struct objfile *o
+Index: gdb-6.8.50.20081209/gdb/dwarf2read.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/dwarf2read.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/dwarf2read.c	2008-12-14 14:56:49.000000000 +0100
+@@ -1295,7 +1295,7 @@ dwarf2_build_psymtabs (struct objfile *o
    else
      dwarf2_per_objfile->loc_buffer = NULL;
  
@@ -340,9 +357,11 @@
        || (objfile->global_psymbols.size == 0
  	  && objfile->static_psymbols.size == 0))
      {
---- ./gdb/elfread.c	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/elfread.c	2008-08-30 23:40:33.000000000 +0200
-@@ -673,7 +673,7 @@ elf_symfile_read (struct objfile *objfil
+Index: gdb-6.8.50.20081209/gdb/elfread.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/elfread.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/elfread.c	2008-12-14 14:56:49.000000000 +0100
+@@ -680,7 +680,7 @@ elf_symfile_read (struct objfile *objfil
    /* If we are reinitializing, or if we have never loaded syms yet,
       set table to empty.  MAINLINE is cleared so that *_read_psymtab
       functions do not all also re-initialize the psymbol table. */
@@ -351,9 +370,11 @@
      {
        init_psymbol_list (objfile, 0);
        mainline = 0;
---- ./gdb/infrun.c	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/infrun.c	2008-08-30 23:40:33.000000000 +0200
-@@ -2314,6 +2314,11 @@ process_event_stop_test:
+Index: gdb-6.8.50.20081209/gdb/infrun.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/infrun.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/infrun.c	2008-12-14 14:56:49.000000000 +0100
+@@ -3229,6 +3229,11 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (
  #endif
  	  target_terminal_inferior ();
  
@@ -365,11 +386,13 @@
  	  /* If requested, stop when the dynamic linker notifies
  	     gdb of events.  This allows the user to get control
  	     and place breakpoints in initializer routines for
---- ./gdb/objfiles.c	2008-01-01 23:53:12.000000000 +0100
-+++ ./gdb/objfiles.c	2008-08-30 23:40:33.000000000 +0200
-@@ -49,6 +49,9 @@
- #include "source.h"
- #include "addrmap.h"
+Index: gdb-6.8.50.20081209/gdb/objfiles.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/objfiles.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/objfiles.c	2008-12-14 14:56:49.000000000 +0100
+@@ -51,6 +51,9 @@
+ #include "arch-utils.h"
+ #include "exec.h"
  
 +#include "auxv.h"
 +#include "elf/common.h"
@@ -377,7 +400,7 @@
  /* Prototypes for local functions */
  
  static void objfile_alloc_data (struct objfile *objfile);
-@@ -260,7 +263,19 @@ init_entry_point_info (struct objfile *o
+@@ -271,7 +274,19 @@ init_entry_point_info (struct objfile *o
  CORE_ADDR
  entry_point_address (void)
  {
@@ -398,18 +421,19 @@
  }
  
  /* Create the terminating entry of OBJFILE's minimal symbol table.
---- ./gdb/solib-svr4.c	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/solib-svr4.c	2008-09-01 17:12:31.000000000 +0200
-@@ -31,6 +31,8 @@
- #include "gdbcore.h"
- #include "target.h"
- #include "inferior.h"
-+#include "auxv.h"
+Index: gdb-6.8.50.20081209/gdb/solib-svr4.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/solib-svr4.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/solib-svr4.c	2008-12-14 14:56:49.000000000 +0100
+@@ -44,6 +44,7 @@
+ #include "exec.h"
+ #include "auxv.h"
+ #include "exceptions.h"
 +#include "command.h"
  
- #include "gdb_assert.h"
- 
-@@ -246,7 +248,9 @@ static char *debug_loader_name;
+ static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
+ static int svr4_have_link_map_offsets (void);
+@@ -286,7 +287,9 @@ static CORE_ADDR main_lm_addr;
  
  /* Local function prototypes */
  
@@ -419,7 +443,7 @@
  
  static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
  
-@@ -349,10 +353,12 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
+@@ -520,10 +523,12 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
    int arch_size, step, sect_size;
    long dyn_tag;
    CORE_ADDR dyn_ptr, dyn_addr;
@@ -432,7 +456,7 @@
  
    if (abfd == NULL)
      return 0;
-@@ -360,19 +366,81 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
+@@ -531,19 +536,81 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
    if (arch_size == -1)
     return 0;
  
@@ -516,7 +540,7 @@
  
    /* Iterate over BUF and scan for DYNTAG.  If found, set PTR and return.  */
    step = (arch_size == 32) ? sizeof (Elf32_External_Dyn)
-@@ -393,25 +461,103 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
+@@ -564,26 +631,105 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
  	dyn_tag = bfd_h_get_64 (abfd, (bfd_byte *) x_dynp_64->d_tag);
  	dyn_ptr = bfd_h_get_64 (abfd, (bfd_byte *) x_dynp_64->d_un.d_ptr);
        }
@@ -562,13 +586,14 @@
 -	    entry.  */
 -	 if (ptr)
 -	   {
+-	     struct type *ptr_type;
 -	     gdb_byte ptr_buf[8];
 -	     CORE_ADDR ptr_addr;
 -
+-	     ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
 -	     ptr_addr = dyn_addr + (buf - bufstart) + arch_size / 8;
 -	     if (target_read_memory (ptr_addr, ptr_buf, arch_size / 8) == 0)
--	       dyn_ptr = extract_typed_address (ptr_buf,
--						builtin_type_void_data_ptr);
+-	       dyn_ptr = extract_typed_address (ptr_buf, ptr_type);
 -	     *ptr = dyn_ptr;
 -	   }
 -	 return 1;
@@ -612,8 +637,10 @@
 +
 +	    if (got == 0)
 +	      {
-+		dyn_ptr = extract_typed_address (ptr_buf,
-+						 builtin_type_void_data_ptr);
++		struct type *ptr_type;
++
++		ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
++		dyn_ptr = extract_typed_address (ptr_buf, ptr_type);
 +		if (ptr != NULL)
 +		  {
 +		    if (debug_solib)
@@ -638,18 +665,18 @@
    }
  
    return 0;
-@@ -544,6 +690,10 @@ solib_svr4_r_map (void)
- {
+@@ -773,6 +919,10 @@ solib_svr4_r_map (void)
    struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
+   struct type *ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
  
 +  if (debug_solib)
 +    fprintf_unfiltered (gdb_stdlog, 
 +                        "solib_svr4_r_map: read at 0x%s\n",
 +                        paddr_nz (debug_base + lmo->r_map_offset));
-   return read_memory_typed_address (debug_base + lmo->r_map_offset,
- 				    builtin_type_void_data_ptr);
+   return read_memory_typed_address (debug_base + lmo->r_map_offset, ptr_type);
  }
-@@ -713,6 +863,11 @@ svr4_current_sos (void)
+ 
+@@ -944,6 +1094,11 @@ svr4_current_sos (void)
    struct so_list *head = 0;
    struct so_list **link_ptr = &head;
    CORE_ADDR ldsomap = 0;
@@ -661,7 +688,7 @@
  
    /* Always locate the debug struct, in case it has moved.  */
    debug_base = 0;
-@@ -721,10 +876,19 @@ svr4_current_sos (void)
+@@ -952,10 +1107,19 @@ svr4_current_sos (void)
    /* If we can't find the dynamic linker's base structure, this
       must not be a dynamically linked executable.  Hmm.  */
    if (! debug_base)
@@ -682,7 +709,7 @@
    lm = solib_svr4_r_map ();
  
    while (lm)
-@@ -740,23 +904,103 @@ svr4_current_sos (void)
+@@ -972,26 +1136,104 @@ svr4_current_sos (void)
        new->lm_info->lm = xzalloc (lmo->link_map_size);
        make_cleanup (xfree, new->lm_info->lm);
  
@@ -704,14 +731,17 @@
           does have a name, so we can no longer use a missing name to
           decide when to ignore it. */
 -      if (IGNORE_FIRST_LINK_MAP_ENTRY (new) && ldsomap == 0)
--	free_so (new);
 +      if (exec_bfd != NULL && IGNORE_FIRST_LINK_MAP_ENTRY (new) && ldsomap == 0)
-+	{
+ 	{
+-	  main_lm_addr = new->lm_info->lm_addr;
+-	  free_so (new);
+-	}
 +          /* It is the first link map entry, i.e. it is the main executable.  */
 +
 +	  if (bfd_get_start_address (exec_bfd) == entry_point_address ())
 +	    {
-+              /* Non-pie case, main executable has not been relocated.  */
++	      /* Non-pie case, main executable has not been relocated.  */
++	      main_lm_addr = new->lm_info->lm_addr;
 +	      free_so (new);
 +	    }
 +	  else
@@ -788,7 +818,7 @@
  	  target_read_string (LM_NAME (new), &buffer,
  			      SO_NAME_MAX_PATH_SIZE - 1, &errcode);
  	  if (errcode != 0)
-@@ -764,47 +1008,60 @@ svr4_current_sos (void)
+@@ -999,47 +1241,60 @@ svr4_current_sos (void)
  		     safe_strerror (errcode));
  	  else
  	    {
@@ -834,15 +864,15 @@
 +			}
 +		      else
 +			debug_print_missing (new->so_name, build_id_filename);
++
++		      xfree (build_id_filename);
++		      xfree (build_id);
++		    }
  
 -		  /* Missing the build-id matching separate debug info file
 -		     would be handled while SO_NAME gets loaded.  */
 -		  name = build_id_to_filename (build_id, &build_id_filename, 0);
 -		  if (name != NULL)
-+		      xfree (build_id_filename);
-+		      xfree (build_id);
-+		    }
-+
 +		  if (debug_solib)
  		    {
 -		      strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
@@ -882,7 +912,7 @@
  	}
  
        /* On Solaris, the dynamic linker is not in the normal list of
-@@ -820,6 +1077,9 @@ svr4_current_sos (void)
+@@ -1055,6 +1310,9 @@ svr4_current_sos (void)
    if (head == NULL)
      return svr4_default_sos ();
  
@@ -892,7 +922,7 @@
    return head;
  }
  
-@@ -921,7 +1181,7 @@ for (resolve = 0; resolve <= 1; resolve+
+@@ -1086,7 +1344,7 @@ svr4_fetch_objfile_link_map (struct objf
  /* On some systems, the only way to recognize the link map entry for
     the main executable file is by looking at its name.  Return
     non-zero iff SONAME matches one of the known main executable names.  */
@@ -901,7 +931,7 @@
  static int
  match_main (char *soname)
  {
-@@ -935,6 +1195,7 @@ match_main (char *soname)
+@@ -1100,6 +1358,7 @@ match_main (char *soname)
  
    return (0);
  }
@@ -909,28 +939,25 @@
  
  /* Return 1 if PC lies in the dynamic symbol resolution code of the
     SVR4 run time loader.  */
-@@ -1086,11 +1347,17 @@ enable_break (void)
-   /* Find the .interp section; if not found, warn the user and drop
+@@ -1250,15 +1509,29 @@ enable_break (void)
+   /* Find the program interpreter; if not found, warn the user and drop
       into the old breakpoint at symbol code.  */
-   interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
+   interp_name = find_program_interpreter ();
 +
 +  if (debug_solib)
 +     fprintf_unfiltered (gdb_stdlog,
 +                         "enable_break: search for .interp in %s\n",
 +                         exec_bfd->filename);
-   if (interp_sect)
+   if (interp_name)
      {
-       unsigned int interp_sect_size;
-       char *buf;
        CORE_ADDR load_addr = 0;
 +      CORE_ADDR load_addr_mask = -1L;
        int load_addr_found = 0;
        int loader_found_in_list = 0;
        struct so_list *so;
-@@ -1098,6 +1365,14 @@ enable_break (void)
+       bfd *tmp_bfd = NULL;
        struct target_ops *tmp_bfd_target;
-       int tmp_fd = -1;
-       char *tmp_pathname = NULL;
+       volatile struct gdb_exception ex;
 +      int arch_size;
 +
 +      /* For 32bit inferiors with 64bit GDB we may get LOAD_ADDR at 0xff......
@@ -940,19 +967,19 @@
 +      if (arch_size > 0 && arch_size < sizeof (1UL) * 8)
 +        load_addr_mask = (1UL << arch_size) - 1;
  
-       /* Read the contents of the .interp section into a local buffer;
-          the contents specify the dynamic linker this program uses.  */
-@@ -1120,6 +1395,9 @@ enable_break (void)
-       if (tmp_fd >= 0)
- 	tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
+       sym_addr = 0;
  
+@@ -1275,6 +1548,9 @@ enable_break (void)
+         {
+ 	  tmp_bfd = solib_bfd_open (interp_name);
+ 	}
 +      if (debug_solib)
-+         fprintf_unfiltered (gdb_stdlog,
-+                            "enable_break: opening %s\n", tmp_pathname);
++	 fprintf_unfiltered (gdb_stdlog,
++			    "enable_break: opening %s\n", interp_name);
        if (tmp_bfd == NULL)
  	goto bkpt_at_symbol;
  
-@@ -1181,16 +1459,16 @@ enable_break (void)
+@@ -1328,16 +1604,16 @@ enable_break (void)
        interp_sect = bfd_get_section_by_name (tmp_bfd, ".text");
        if (interp_sect)
  	{
@@ -973,29 +1000,29 @@
  	  interp_plt_sect_high =
  	    interp_plt_sect_low + bfd_section_size (tmp_bfd, interp_sect);
  	}
-@@ -1225,7 +1503,11 @@ enable_break (void)
+@@ -1372,7 +1648,11 @@ enable_break (void)
  
        if (sym_addr != 0)
  	{
 -	  create_solib_event_breakpoint (load_addr + sym_addr);
 +	  create_solib_event_breakpoint ((load_addr + sym_addr)
 +					 & load_addr_mask);
-+          if (debug_solib)
-+            fprintf_unfiltered (gdb_stdlog,
-+                               "enable_break: solib bp set\n");
++	  if (debug_solib)
++	    fprintf_unfiltered (gdb_stdlog,
++			       "enable_break: solib bp set\n");
+ 	  xfree (interp_name);
  	  return 1;
  	}
- 
-@@ -1486,6 +1768,8 @@ svr4_solib_create_inferior_hook (void)
-   while (stop_signal != TARGET_SIGNAL_TRAP);
-   stop_soon = NO_STOP_QUIETLY;
+@@ -1638,6 +1918,8 @@ svr4_solib_create_inferior_hook (void)
+   while (tp->stop_signal != TARGET_SIGNAL_TRAP);
+   inf->stop_soon = NO_STOP_QUIETLY;
  #endif /* defined(_SCO_DS) */
-+ 
-+   disable_breakpoints_at_startup (1); 
++
++   disable_breakpoints_at_startup (1);
  }
  
  static void
-@@ -1666,6 +1950,75 @@ svr4_lp64_fetch_link_map_offsets (void)
+@@ -1819,6 +2101,75 @@ svr4_lp64_fetch_link_map_offsets (void)
  
    return lmp;
  }
@@ -1071,7 +1098,7 @@
  
  
  struct target_so_ops svr4_so_ops;
-@@ -1724,4 +2077,7 @@ _initialize_svr4_solib (void)
+@@ -1858,4 +2209,7 @@ _initialize_svr4_solib (void)
    svr4_so_ops.in_dynsym_resolve_code = svr4_in_dynsym_resolve_code;
    svr4_so_ops.lookup_lib_global_symbol = elf_lookup_lib_symbol;
    svr4_so_ops.same = svr4_same;
@@ -1079,9 +1106,11 @@
 +  add_info ("linkmap", info_linkmap_command,
 +	    "Display the inferior's linkmap.");
  }
---- ./gdb/solib.c	2008-01-07 16:19:58.000000000 +0100
-+++ ./gdb/solib.c	2008-09-01 17:16:12.000000000 +0200
-@@ -79,6 +79,8 @@ set_solib_ops (struct gdbarch *gdbarch, 
+Index: gdb-6.8.50.20081209/gdb/solib.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/solib.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/solib.c	2008-12-14 14:56:49.000000000 +0100
+@@ -80,6 +80,8 @@ set_solib_ops (struct gdbarch *gdbarch, 
  
  /* external data declarations */
  
@@ -1090,7 +1119,7 @@
  /* FIXME: gdbarch needs to control this variable, or else every
     configuration needs to call set_solib_ops.  */
  struct target_so_ops *current_target_so_ops;
-@@ -102,6 +104,8 @@ The search path for loading non-absolute
+@@ -103,6 +105,8 @@ The search path for loading non-absolute
  		    value);
  }
  
@@ -1099,7 +1128,7 @@
  /*
  
     GLOBAL FUNCTION
-@@ -391,7 +395,6 @@ free_so (struct so_list *so)
+@@ -405,7 +409,6 @@ free_so (struct so_list *so)
    xfree (so);
  }
  
@@ -1107,7 +1136,7 @@
  /* Return address of first so_list entry in master shared object list.  */
  struct so_list *
  master_so_list (void)
-@@ -399,7 +402,6 @@ master_so_list (void)
+@@ -413,7 +416,6 @@ master_so_list (void)
    return so_list_head;
  }
  
@@ -1115,7 +1144,7 @@
  /* A small stub to get us past the arg-passing pinhole of catch_errors.  */
  
  static int
-@@ -411,15 +413,40 @@ symbol_add_stub (void *arg)
+@@ -425,15 +427,40 @@ symbol_add_stub (void *arg)
    /* Have we already loaded this shared object?  */
    ALL_OBJFILES (so->objfile)
      {
@@ -1159,7 +1188,7 @@
    free_section_addr_info (sap);
  
    return (1);
-@@ -545,6 +572,10 @@ update_solib_list (int from_tty, struct 
+@@ -565,6 +592,10 @@ update_solib_list (int from_tty, struct 
  	    }
  	  else
  	    {
@@ -1170,7 +1199,7 @@
  	      if (! strcmp (gdb->so_original_name, i->so_original_name))
  		break;	      
  	    }
-@@ -599,28 +630,7 @@ update_solib_list (int from_tty, struct 
+@@ -619,28 +650,7 @@ update_solib_list (int from_tty, struct 
        /* Fill in the rest of each of the `struct so_list' nodes.  */
        for (i = inferior; i; i = i->next)
  	{
@@ -1200,7 +1229,7 @@
  
  	  /* Notify any observer that the shared object has been
               loaded now that we've added it to GDB's tables.  */
-@@ -716,6 +726,41 @@ solib_add (char *pattern, int from_tty, 
+@@ -736,6 +746,41 @@ solib_add (char *pattern, int from_tty, 
    }
  }
  
@@ -1242,7 +1271,7 @@
  
  /*
  
-@@ -1035,4 +1080,12 @@ This takes precedence over the environme
+@@ -1053,4 +1098,12 @@ This takes precedence over the environme
  				     reload_shared_libraries,
  				     show_solib_search_path,
  				     &setlist, &showlist);
@@ -1255,8 +1284,10 @@
 +			   NULL, NULL,
 +			   &setdebuglist, &showdebuglist);
  }
---- ./gdb/solist.h	2008-01-07 16:19:58.000000000 +0100
-+++ ./gdb/solist.h	2008-08-30 23:40:33.000000000 +0200
+Index: gdb-6.8.50.20081209/gdb/solist.h
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/solist.h	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/solist.h	2008-12-14 14:56:49.000000000 +0100
 @@ -61,6 +61,8 @@ struct so_list
      bfd *abfd;
      char symbols_loaded;	/* flag: symbols read in yet? */
@@ -1266,31 +1297,21 @@
      struct objfile *objfile;	/* objfile for loaded lib */
      struct section_table *sections;
      struct section_table *sections_end;
-@@ -127,9 +129,15 @@ void free_so (struct so_list *so);
- /* Return address of first so_list entry in master shared object list.  */
- struct so_list *master_so_list (void);
- 
-+/* Return address of first so_list entry in master shared object list.  */
-+struct so_list *master_so_list (void);
-+
- /* Find solib binary file and open it.  */
- extern int solib_open (char *in_pathname, char **found_pathname);
+@@ -138,4 +140,10 @@ struct symbol *solib_global_lookup (cons
+ 				    const char *linkage_name,
+ 				    const domain_enum domain);
  
 +/* Add the list of sections in so_list to the target to_sections.  */
 +extern void add_to_target_sections (int, struct target_ops *, struct so_list *);
 +
- /* FIXME: gdbarch needs to control this variable */
- extern struct target_so_ops *current_target_so_ops;
- 
-@@ -140,4 +148,6 @@ struct symbol *solib_global_lookup (cons
- 				    const domain_enum domain,
- 				    struct symtab **symtab);
- 
 +/* Controls the printing of debugging output.  */
 +extern int debug_solib;
++
  #endif
---- ./gdb/symfile-mem.c	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/symfile-mem.c	2008-08-30 23:40:33.000000000 +0200
+Index: gdb-6.8.50.20081209/gdb/symfile-mem.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/symfile-mem.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/symfile-mem.c	2008-12-14 14:56:49.000000000 +0100
 @@ -116,7 +116,7 @@ symbol_file_add_from_memory (struct bfd 
        }
  
@@ -1300,8 +1321,10 @@
  
    /* This might change our ideas about frames already looked at.  */
    reinit_frame_cache ();
---- ./gdb/symfile.c	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/symfile.c	2008-08-30 23:41:48.000000000 +0200
+Index: gdb-6.8.50.20081209/gdb/symfile.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/symfile.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/symfile.c	2008-12-14 14:56:49.000000000 +0100
 @@ -47,6 +47,7 @@
  #include "readline/readline.h"
  #include "gdb_assert.h"
@@ -1310,7 +1333,7 @@
  #include "observer.h"
  #include "exec.h"
  #include "parser-defs.h"
-@@ -815,7 +816,7 @@ syms_from_objfile (struct objfile *objfi
+@@ -787,7 +788,7 @@ syms_from_objfile (struct objfile *objfi
  
    /* Now either addrs or offsets is non-zero.  */
  
@@ -1319,16 +1342,16 @@
      {
        /* We will modify the main symbol table, make sure that all its users
           will be cleaned up if an error occurs during symbol reading.  */
-@@ -843,7 +844,7 @@ syms_from_objfile (struct objfile *objfi
+@@ -815,7 +816,7 @@ syms_from_objfile (struct objfile *objfi
  
       We no longer warn if the lowest section is not a text segment (as
       happens for the PA64 port.  */
 -  if (!mainline && addrs && addrs->other[0].name)
 +  if (/*!mainline &&*/ addrs && addrs->other[0].name)
      {
+       asection *lower_sect;
        asection *sect;
-       CORE_ADDR lower_offset = 0;	/* Shut up the GCC warning.  */
-@@ -1002,17 +1003,21 @@ new_symfile_objfile (struct objfile *obj
+@@ -916,17 +917,21 @@ new_symfile_objfile (struct objfile *obj
    /* If this is the main symbol file we have to clean up all users of the
       old main symbol file. Otherwise it is sufficient to fixup all the
       breakpoints that may have been redefined by this symbol file.  */
@@ -1352,7 +1375,7 @@
  
    /* We're done reading the symbol file; finish off complaints.  */
    clear_complaints (&symfile_complaints, 0, verbo);
-@@ -1055,7 +1060,7 @@ symbol_file_add_with_addrs_or_offsets (b
+@@ -969,7 +974,7 @@ symbol_file_add_with_addrs_or_offsets (b
       interactively wiping out any existing symbols.  */
  
    if ((have_full_symbols () || have_partial_symbols ())
@@ -1361,7 +1384,7 @@
        && from_tty
        && !query ("Load new symbol table from \"%s\"? ", name))
      error (_("Not confirmed."));
-@@ -1242,6 +1247,10 @@ symbol_file_clear (int from_tty)
+@@ -1160,6 +1165,10 @@ symbol_file_clear (int from_tty)
  		    symfile_objfile->name)
  	  : !query (_("Discard symbol table? "))))
      error (_("Not confirmed."));
@@ -1372,7 +1395,7 @@
      free_all_objfiles ();
  
      /* solib descriptors may have handles to objfiles.  Since their
-@@ -3335,6 +3344,8 @@ reread_symbols (void)
+@@ -3259,6 +3268,8 @@ reread_symbols (void)
  	      /* Discard cleanups as symbol reading was successful.  */
  	      discard_cleanups (old_cleanups);
  
@@ -1381,7 +1404,7 @@
  	      /* If the mtime has changed between the time we set new_modtime
  	         and now, we *want* this to be out of date, so don't call stat
  	         again now.  */
-@@ -3703,6 +3714,7 @@ clear_symtab_users (void)
+@@ -3628,6 +3639,7 @@ clear_symtab_users (void)
    breakpoint_re_set ();
    set_default_breakpoint (0, 0, 0, 0);
    clear_pc_function_cache ();
@@ -1389,9 +1412,11 @@
    observer_notify_new_objfile (NULL);
  
    /* Clear globals which might have pointed into a removed objfile.
---- ./gdb/varobj.c	2008-09-01 17:16:38.000000000 +0200
-+++ ./gdb/varobj.c	2008-08-30 23:40:33.000000000 +0200
-@@ -1075,6 +1075,62 @@ install_new_value (struct varobj *var, s
+Index: gdb-6.8.50.20081209/gdb/varobj.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/varobj.c	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/varobj.c	2008-12-14 14:56:49.000000000 +0100
+@@ -1116,6 +1116,62 @@ install_new_value (struct varobj *var, s
    return changed;
  }
  
@@ -1454,12 +1479,27 @@
  /* Update the values for a variable and its children.  This is a
     two-pronged attack.  First, re-parse the value for the root's
     expression to see if it's changed.  Then go all the way
---- ./gdb/varobj.h	2008-01-30 08:17:31.000000000 +0100
-+++ ./gdb/varobj.h	2008-08-30 23:40:33.000000000 +0200
-@@ -122,4 +122,6 @@ extern void varobj_invalidate (void);
+Index: gdb-6.8.50.20081209/gdb/varobj.h
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/varobj.h	2008-12-14 14:55:58.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/varobj.h	2008-12-14 14:56:49.000000000 +0100
+@@ -141,4 +141,6 @@ extern int varobj_editable_p (struct var
  
- extern int varobj_editable_p (struct varobj *var);
+ extern int varobj_floating_p (struct varobj *var);
  
 +extern void varobj_refresh(void);
 +
  #endif /* VAROBJ_H */
+Index: gdb-6.8.50.20081209/gdb/target.h
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/target.h	2008-12-14 11:52:54.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/target.h	2008-12-14 14:57:21.000000000 +0100
+@@ -524,7 +524,7 @@ struct target_ops
+        Return -1 if there is insufficient buffer for a whole entry.
+        Return 1 if an entry was read into *TYPEP and *VALP.  */
+     int (*to_auxv_parse) (struct target_ops *ops, gdb_byte **readptr,
+-                         gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp);
++                         gdb_byte *endptr, ULONGEST *typep, CORE_ADDR *valp);
+ 
+     /* Search SEARCH_SPACE_LEN bytes beginning at START_ADDR for the
+        sequence of bytes in PATTERN with length PATTERN_LEN.

gdb-6.3-ppc64displaysymbol-20041124.patch:

Index: gdb-6.3-ppc64displaysymbol-20041124.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-ppc64displaysymbol-20041124.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.3-ppc64displaysymbol-20041124.patch	2 Dec 2004 18:30:25 -0000	1.1
+++ gdb-6.3-ppc64displaysymbol-20041124.patch	14 Dec 2008 14:05:15 -0000	1.2
@@ -3,9 +3,11 @@
 	* printcmd.c (build_address_symbolic): Find a section for the
 	address.
 
---- ./gdb/printcmd.c.1	2004-11-24 17:54:27.316295608 -0500
-+++ ./gdb/printcmd.c	2004-11-24 17:59:20.069790312 -0500
-@@ -615,6 +615,20 @@
+Index: gdb-6.8.50.20081128/gdb/printcmd.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/printcmd.c	2008-12-04 01:36:05.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/printcmd.c	2008-12-04 01:37:18.000000000 +0100
+@@ -616,6 +616,14 @@ build_address_symbolic (CORE_ADDR addr, 
  	  addr = overlay_mapped_address (addr, section);
  	}
      }
@@ -16,13 +18,7 @@
 +     the normal section code (which almost always succeeds).  */
 +  section = find_pc_overlay (addr);
 +  if (section == NULL)
-+    {
-+      struct obj_section *obj_section = find_pc_section (addr);
-+      if (obj_section == NULL)
-+	section = NULL;
-+      else
-+	section = obj_section->the_bfd_section;
-+    }
++    section = find_pc_section (addr);
  
    /* First try to find the address in the symbol table, then
       in the minsyms.  Take the closest one.  */

gdb-6.3-readnever-20050907.patch:

Index: gdb-6.3-readnever-20050907.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-readnever-20050907.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.3-readnever-20050907.patch	14 Jul 2008 09:09:04 -0000	1.2
+++ gdb-6.3-readnever-20050907.patch	14 Dec 2008 14:05:15 -0000	1.3
@@ -11,11 +11,11 @@
 
         * gdb.texinfo (File Options): Document --readnever.
 
-Index: gdb-6.8/gdb/doc/gdb.texinfo
+Index: gdb-6.8.50.20081128/gdb/doc/gdb.texinfo
 ===================================================================
---- gdb-6.8.orig/gdb/doc/gdb.texinfo	2008-03-26 19:38:21.000000000 +0100
-+++ gdb-6.8/gdb/doc/gdb.texinfo	2008-07-14 10:27:01.000000000 +0200
-@@ -983,6 +983,12 @@ Read each symbol file's entire symbol ta
+--- gdb-6.8.50.20081128.orig/gdb/doc/gdb.texinfo	2008-11-27 10:23:01.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/doc/gdb.texinfo	2008-12-02 19:07:35.000000000 +0100
+@@ -994,6 +994,12 @@ Read each symbol file's entire symbol ta
  the default, which is to read it incrementally as it is needed.
  This makes startup slower, but makes future operations faster.
  
@@ -28,11 +28,11 @@
  @end table
  
  @node Mode Options
-Index: gdb-6.8/gdb/main.c
+Index: gdb-6.8.50.20081128/gdb/main.c
 ===================================================================
---- gdb-6.8.orig/gdb/main.c	2008-07-14 10:26:39.000000000 +0200
-+++ gdb-6.8/gdb/main.c	2008-07-14 10:27:01.000000000 +0200
-@@ -296,6 +296,7 @@ captured_main (void *data)
+--- gdb-6.8.50.20081128.orig/gdb/main.c	2008-12-02 18:07:21.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/main.c	2008-12-02 19:07:35.000000000 +0100
+@@ -295,6 +295,7 @@ captured_main (void *data)
        {"xdb", no_argument, &xdb_commands, 1},
        {"dbx", no_argument, &dbx_commands, 1},
        {"readnow", no_argument, &readnow_symbol_files, 1},
@@ -40,7 +40,7 @@
        {"r", no_argument, &readnow_symbol_files, 1},
        {"quiet", no_argument, &quiet, 1},
        {"q", no_argument, &quiet, 1},
-@@ -947,6 +948,7 @@ Options:\n\n\
+@@ -895,6 +896,7 @@ Options:\n\n\
    fputs_unfiltered (_(" file.\n\
    --quiet            Do not print version number on startup.\n\
    --readnow          Fully read symbol files on first access.\n\
@@ -48,11 +48,11 @@
  "), stream);
    fputs_unfiltered (_("\
    --se=FILE          Use FILE as symbol file and executable file.\n\
-Index: gdb-6.8/gdb/symfile.c
+Index: gdb-6.8.50.20081128/gdb/symfile.c
 ===================================================================
---- gdb-6.8.orig/gdb/symfile.c	2008-07-14 10:26:30.000000000 +0200
-+++ gdb-6.8/gdb/symfile.c	2008-07-14 10:27:01.000000000 +0200
-@@ -76,6 +76,7 @@ static void clear_symtab_users_cleanup (
+--- gdb-6.8.50.20081128.orig/gdb/symfile.c	2008-12-01 16:34:36.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/symfile.c	2008-12-02 19:07:35.000000000 +0100
+@@ -77,6 +77,7 @@ static void clear_symtab_users_cleanup (
  
  /* Global variables owned by this file */
  int readnow_symbol_files;	/* Read full symbols immediately */
@@ -60,32 +60,32 @@
  
  /* External variables and functions referenced. */
  
-Index: gdb-6.8/gdb/dwarf2read.c
+Index: gdb-6.8.50.20081128/gdb/dwarf2read.c
 ===================================================================
---- gdb-6.8.orig/gdb/dwarf2read.c	2008-07-14 10:26:09.000000000 +0200
-+++ gdb-6.8/gdb/dwarf2read.c	2008-07-14 10:27:01.000000000 +0200
-@@ -43,6 +43,7 @@
- #include "dwarf2loc.h"
- #include "cp-support.h"
- #include "hashtab.h"
-+#include "top.h"
+--- gdb-6.8.50.20081128.orig/gdb/dwarf2read.c	2008-11-15 19:49:50.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/dwarf2read.c	2008-12-02 19:08:53.000000000 +0100
+@@ -46,6 +46,7 @@
  #include "command.h"
  #include "gdbcmd.h"
+ #include "addrmap.h"
++#include "top.h"
  
-@@ -1106,7 +1107,8 @@ dwarf2_has_info (struct objfile *objfile
+ #include <fcntl.h>
+ #include "gdb_string.h"
+@@ -1122,7 +1123,8 @@ dwarf2_has_info (struct objfile *objfile
    dwarf_loc_section = 0;
    
    bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
 -  return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
-+  return (!readnever_symbol_files
-+	  && dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
++  return !readnever_symbol_files
++	 && dwarf_info_section != NULL && dwarf_abbrev_section != NULL;
  }
  
- /* This function is mapped across the sections and remembers the
-Index: gdb-6.8/gdb/top.h
+ /* When loading sections, we can either look for ".<name>", or for
+Index: gdb-6.8.50.20081128/gdb/top.h
 ===================================================================
---- gdb-6.8.orig/gdb/top.h	2008-01-01 23:53:13.000000000 +0100
-+++ gdb-6.8/gdb/top.h	2008-07-14 10:27:01.000000000 +0200
+--- gdb-6.8.50.20081128.orig/gdb/top.h	2008-01-01 23:53:13.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/top.h	2008-12-02 19:07:35.000000000 +0100
 @@ -59,6 +59,7 @@ extern void set_prompt (char *);
  
  /* From random places.  */

gdb-6.3-security-errata-20050610.patch:

Index: gdb-6.3-security-errata-20050610.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-security-errata-20050610.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- gdb-6.3-security-errata-20050610.patch	21 Jan 2007 01:53:01 -0000	1.4
+++ gdb-6.3-security-errata-20050610.patch	14 Dec 2008 14:05:15 -0000	1.5
@@ -1,3 +1,6 @@
+http://sourceware.org/ml/gdb-patches/2005-05/threads.html#00637
+Proposed upstream but never committed upstream.
+
 2005-06-09  Jeff Johnston  <jjohnstn at redhat.com>
 
         * gdb.base/gdbinit.exp: New testcase.
@@ -16,11 +19,11 @@
         (source_command): Update documentation.  Check permissions if
         FROM_TTY is -1.
 
-Index: gdb-6.6/gdb/cli/cli-cmds.c
+Index: gdb-6.8.50.20081128/gdb/cli/cli-cmds.c
 ===================================================================
---- gdb-6.6.orig/gdb/cli/cli-cmds.c
-+++ gdb-6.6/gdb/cli/cli-cmds.c
-@@ -38,6 +38,7 @@
+--- gdb-6.8.50.20081128.orig/gdb/cli/cli-cmds.c	2008-12-07 10:12:24.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/cli/cli-cmds.c	2008-12-07 13:04:06.000000000 +0100
+@@ -36,6 +36,7 @@
  #include "objfiles.h"
  #include "source.h"
  #include "disasm.h"
@@ -28,7 +31,7 @@
  
  #include "ui-out.h"
  
-@@ -461,12 +462,31 @@ source_script (char *file, int from_tty)
+@@ -460,7 +461,7 @@ source_script (char *file, int from_tty)
  
    if (fd == -1)
      {
@@ -36,23 +39,29 @@
 +      if (from_tty > 0)
  	perror_with_name (file);
        else
- 	return;
+ 	{
+@@ -469,9 +470,33 @@ source_script (char *file, int from_tty)
+ 	}
      }
  
 +#ifdef HAVE_GETUID
 +  if (from_tty == -1)
 +    {
 +      struct stat statbuf;
++
 +      if (fstat (fd, &statbuf) < 0)
 +	{
-+	  perror_with_name (file);
 +	  close (fd);
-+	  return;
++	  /* Do not do_cleanups (old_cleanups) as FILE is allocated there.
++	     perror_with_name calls error which should call the cleanups.  */
++	  perror_with_name (file);
 +	}
 +      if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH))
 +	{
-+          warning (_("not using untrusted file \"%s\""), file);
++	  /* FILE gets freed by do_cleanups (old_cleanups).  */
++	  warning (_("not using untrusted file \"%s\""), file);
 +	  close (fd);
++	  do_cleanups (old_cleanups);
 +	  return;
 +	}
 +    }
@@ -61,10 +70,14 @@
    stream = fdopen (fd, FOPEN_RT);
    script_from_file (stream, file);
  
-Index: gdb-6.6/gdb/testsuite/gdb.base/gdbinit.exp
++  /* FILE gets freed by do_cleanups (old_cleanups).  */
+   do_cleanups (old_cleanups);
+ }
+ 
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/gdbinit.exp
 ===================================================================
---- /dev/null
-+++ gdb-6.6/gdb/testsuite/gdb.base/gdbinit.exp
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/gdbinit.exp	2008-12-07 10:13:01.000000000 +0100
 @@ -0,0 +1,98 @@
 +#   Copyright 2005
 +#   Free Software Foundation, Inc.
@@ -81,7 +94,7 @@
 +# 
 +# 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.  
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 +
 +# Please email any bugs, comments, and/or additions to this file to:
 +# bug-gdb at prep.ai.mit.edu
@@ -107,15 +120,15 @@
 +global gdb_prompt
 +global timeout
 +global gdb_spawn_id;
-+                                                                                
++
 +gdb_stop_suppressing_tests;
-+                                                                                
++
 +verbose "Spawning $GDB -nw"
-+                                                                                
++
 +if [info exists gdb_spawn_id] {
 +    return 0;
 +}
-+                                                                                
++
 +if ![is_remote host] {
 +   if { [which $GDB] == 0 } then {
 +        perror "$GDB does not exist."
@@ -164,17 +177,17 @@
 +}
 +
 +remote_exec build "rm .gdbinit"
-Index: gdb-6.6/gdb/testsuite/gdb.base/gdbinit.sample
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/gdbinit.sample
 ===================================================================
---- /dev/null
-+++ gdb-6.6/gdb/testsuite/gdb.base/gdbinit.sample
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/gdbinit.sample	2008-12-07 10:13:01.000000000 +0100
 @@ -0,0 +1 @@
 +echo "\nin gdbinit"
-Index: gdb-6.6/gdb/main.c
+Index: gdb-6.8.50.20081128/gdb/main.c
 ===================================================================
---- gdb-6.6.orig/gdb/main.c
-+++ gdb-6.6/gdb/main.c
-@@ -644,7 +644,7 @@ extern int gdbtk_test (char *);
+--- gdb-6.8.50.20081128.orig/gdb/main.c	2008-12-07 10:12:24.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/main.c	2008-12-07 12:58:37.000000000 +0100
+@@ -690,7 +690,7 @@ Excess command line arguments ignored. (
  
        if (!inhibit_gdbinit)
  	{
@@ -183,7 +196,7 @@
  	}
  
        /* Do stats; no need to do them elsewhere since we'll only
-@@ -722,7 +722,7 @@ extern int gdbtk_test (char *);
+@@ -778,7 +778,7 @@ Can't attach to process and specify a co
        || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
      if (!inhibit_gdbinit)
        {
@@ -192,16 +205,3 @@
        }
  
    for (i = 0; i < ncmd; i++)
-Index: gdb-6.6/gdb/Makefile.in
-===================================================================
---- gdb-6.6.orig/gdb/Makefile.in
-+++ gdb-6.6/gdb/Makefile.in
-@@ -2927,7 +2927,7 @@ cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(d
- 	$(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \
- 	$(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \
- 	$(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \
--	$(tui_h)
-+	$(tui_h) $(gdb_stat_h)
- 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
- cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
- 	$(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \

gdb-6.3-sepcrc-20050402.patch:

Index: gdb-6.3-sepcrc-20050402.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-sepcrc-20050402.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.3-sepcrc-20050402.patch	14 Jul 2008 09:09:04 -0000	1.3
+++ gdb-6.3-sepcrc-20050402.patch	14 Dec 2008 14:05:15 -0000	1.4
@@ -4,11 +4,11 @@
 	print a warning.
 	(find_separate_debug_file): Pass in the objfile's name.
 
-Index: gdb-6.8/gdb/symfile.c
+Index: gdb-6.8.50.20081128/gdb/symfile.c
 ===================================================================
---- gdb-6.8.orig/gdb/symfile.c	2008-01-29 23:47:20.000000000 +0100
-+++ gdb-6.8/gdb/symfile.c	2008-07-14 10:26:30.000000000 +0200
-@@ -1348,7 +1348,8 @@ get_debug_link_info (struct objfile *obj
+--- gdb-6.8.50.20081128.orig/gdb/symfile.c	2008-10-03 18:36:10.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/symfile.c	2008-12-01 16:34:36.000000000 +0100
+@@ -1296,7 +1296,8 @@ get_debug_link_info (struct objfile *obj
  }
  
  static int
@@ -17,23 +17,10 @@
 +			    const char *parent_name)
  {
    unsigned long file_crc = 0;
-   int fd;
-@@ -1357,6 +1358,12 @@ separate_debug_file_exists (const char *
+   bfd *abfd;
+@@ -1316,7 +1317,15 @@ separate_debug_file_exists (const char *
  
-   fd = open (name, O_RDONLY | O_BINARY);
-   if (fd < 0)
-+    /* Fail silently, this preserves existing behavior.  The
-+       assumption here is that the file wasn't found because there's
-+       no file to find (we shouldn't be printing warnings about
-+       missing debug info files when the user hasn't installed them).
-+       The alternative is to complain here - that better belongs in a
-+       warning.  */
-     return 0;
- 
-   while ((count = read (fd, buffer, sizeof (buffer))) > 0)
-@@ -1364,7 +1371,16 @@ separate_debug_file_exists (const char *
- 
-   close (fd);
+   bfd_close (abfd);
  
 -  return crc == file_crc;
 +  if (crc != file_crc)
@@ -44,12 +31,11 @@
 +      return 0;
 +    }
 +
-+  /* No worries!  */
 +  return 1;
  }
  
  char *debug_file_directory = NULL;
-@@ -1416,6 +1432,8 @@ find_separate_debug_file (struct objfile
+@@ -1368,6 +1377,8 @@ find_separate_debug_file (struct objfile
    basename = get_debug_link_info (objfile, &crc32);
  
    if (basename == NULL)
@@ -58,7 +44,7 @@
      return NULL;
  
    dir = xstrdup (objfile->name);
-@@ -1443,7 +1461,7 @@ find_separate_debug_file (struct objfile
+@@ -1395,7 +1406,7 @@ find_separate_debug_file (struct objfile
    strcpy (debugfile, dir);
    strcat (debugfile, basename);
  
@@ -67,7 +53,7 @@
      {
        xfree (basename);
        xfree (dir);
-@@ -1456,7 +1474,7 @@ find_separate_debug_file (struct objfile
+@@ -1408,7 +1419,7 @@ find_separate_debug_file (struct objfile
    strcat (debugfile, "/");
    strcat (debugfile, basename);
  
@@ -76,7 +62,7 @@
      {
        xfree (basename);
        xfree (dir);
-@@ -1469,7 +1487,7 @@ find_separate_debug_file (struct objfile
+@@ -1421,7 +1432,7 @@ find_separate_debug_file (struct objfile
    strcat (debugfile, dir);
    strcat (debugfile, basename);
  
@@ -85,7 +71,7 @@
      {
        xfree (basename);
        xfree (dir);
-@@ -1488,7 +1506,7 @@ find_separate_debug_file (struct objfile
+@@ -1440,7 +1451,7 @@ find_separate_debug_file (struct objfile
        strcat (debugfile, "/");
        strcat (debugfile, basename);
  

gdb-6.3-step-thread-exit-20050211-test.patch:

Index: gdb-6.3-step-thread-exit-20050211-test.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-step-thread-exit-20050211-test.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.3-step-thread-exit-20050211-test.patch	9 Nov 2008 21:04:28 -0000	1.2
+++ gdb-6.3-step-thread-exit-20050211-test.patch	14 Dec 2008 14:05:15 -0000	1.3
@@ -3,10 +3,10 @@
 	* testsuite/gdb.threads/step-thread-exit.c: New testcase.
 	* testsuite/gdb.threads/step-thread-exit.exp: Ditto.
 	
-Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c	2006-07-12 03:18:47.000000000 -0300
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.c	2008-12-08 22:21:26.000000000 +0100
 @@ -0,0 +1,50 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -58,11 +58,11 @@
 +}
 +
 +
-Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp	2006-07-12 03:22:30.000000000 -0300
-@@ -0,0 +1,123 @@
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.exp	2008-12-08 22:22:14.000000000 +0100
+@@ -0,0 +1,130 @@
 +# This testcase is part of GDB, the GNU debugger.
 +
 +# Copyright 2005 Free Software Foundation, Inc.
@@ -113,6 +113,11 @@
 +    gdb_suppress_tests
 +}
 +
++# FIXME: Currently the main thread will escape/exit before our thread finishes
++# without this setting.
++gdb_test "set scheduler-locking step"
++gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking first"
++
 +set sleep_line [expr [gdb_get_line_number "sleep"]]
 +set end_line [expr [gdb_get_line_number "thread_function_end"]]
 +
@@ -128,7 +133,7 @@
 +     send_gdb "next\n"
 +     exp_continue
 +  }
-+  -re "Stepped over thread exit.*Program received signal SIGSTOP.*$gdb_prompt $" {
++  -re "\[Thread .* exited\].*Program received signal SIGSTOP.*$gdb_prompt $" {
 +     pass "$test"
 +  }
 +  -re "start_thread.*$gdb_prompt $" {
@@ -150,6 +155,8 @@
 +gdb_test "bt" "main.*$sleep_line.*" "backtrace after step 1"
 +
 +runto_main
++gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking second"
++
 +gdb_breakpoint "$sleep_line"
 +gdb_breakpoint "$end_line"
 +set test "continue to thread_function 2"
@@ -174,10 +181,10 @@
 +     send_gdb "next\n"
 +     exp_continue
 +  }
-+  -re "Stepped over thread exit.*Break.*$sleep_line.*$gdb_prompt $" {
++  -re "\[Thread .* exited\].*Break.*$sleep_line.*$gdb_prompt $" {
 +     pass "$test (breakpoint hit)"
 +  }
-+  -re "Stepped over thread exit.*$gdb_prompt $" {
++  -re "\[Thread .* exited\].*$gdb_prompt $" {
 +     pass "$test (breakpoint not hit)"
 +  }
 +  -re "start_thread.*$gdb_prompt $" {

gdb-6.3-test-movedir-20050125.patch:

Index: gdb-6.3-test-movedir-20050125.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-test-movedir-20050125.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.3-test-movedir-20050125.patch	4 Feb 2005 21:01:49 -0000	1.1
+++ gdb-6.3-test-movedir-20050125.patch	14 Dec 2008 14:05:15 -0000	1.2
@@ -4,9 +4,12 @@
         * gdb.base/move-dir.c: Ditto.
         * gdb.base/move-dir.h: Ditto.
 
---- gdb-6.3/gdb/testsuite/gdb.base/move-dir.c.fix	Tue Jan 25 19:13:14 2005
-+++ gdb-6.3/gdb/testsuite/gdb.base/move-dir.c	Tue Jan 25 19:12:40 2005
-@@ -0,0 +1,9 @@
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c	2008-12-07 23:57:41.000000000 +0100
+@@ -0,0 +1,10 @@
++#include <stdio.h>
 +#include <stdlib.h>
 +#include "move-dir.h"
 +
@@ -16,8 +19,10 @@
 +   other();
 +}
 +
---- gdb-6.3/gdb/testsuite/gdb.base/move-dir.exp.fix	Tue Jan 25 19:13:21 2005
-+++ gdb-6.3/gdb/testsuite/gdb.base/move-dir.exp	Tue Jan 25 19:12:40 2005
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp	2008-12-07 10:13:01.000000000 +0100
 @@ -0,0 +1,67 @@
 +#   Copyright 2005
 +#   Free Software Foundation, Inc.
@@ -86,8 +91,10 @@
 +
 +set timeout $oldtimeout
 +return 0
---- gdb-6.3/gdb/testsuite/gdb.base/move-dir.h.fix	Tue Jan 25 19:17:50 2005
-+++ gdb-6.3/gdb/testsuite/gdb.base/move-dir.h	Tue Jan 25 19:19:20 2005
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h	2008-12-07 10:13:01.000000000 +0100
 @@ -0,0 +1,7 @@
 +#include <stdlib.h>
 +

gdb-6.3-test-pie-20050107.patch:

Index: gdb-6.3-test-pie-20050107.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-test-pie-20050107.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gdb-6.3-test-pie-20050107.patch	28 Aug 2008 18:48:34 -0000	1.7
+++ gdb-6.3-test-pie-20050107.patch	14 Dec 2008 14:05:15 -0000	1.8
@@ -1,35 +1,40 @@
---- gdb-6.8/gdb/testsuite/configure.ac.orig	2007-10-25 22:30:26.000000000 +0200
-+++ gdb-6.8/gdb/testsuite/configure.ac	2008-08-26 18:02:17.000000000 +0200
-@@ -116,5 +116,5 @@ AC_OUTPUT([Makefile \
+Index: gdb-6.8.50.20081128/gdb/testsuite/configure.ac
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/configure.ac	2008-12-09 17:02:39.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/testsuite/configure.ac	2008-12-09 17:02:55.000000000 +0100
+@@ -116,6 +116,6 @@ AC_OUTPUT([Makefile \
    gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
    gdb.fortran/Makefile gdb.server/Makefile \
    gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile \
 -  gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
 +  gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
+   gdb.python/Makefile \
    gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
---- gdb-6.8/gdb/testsuite/configure.orig	2007-12-29 15:01:30.000000000 +0100
-+++ gdb-6.8/gdb/testsuite/configure	2008-08-26 18:02:02.000000000 +0200
-@@ -3104,7 +3104,7 @@ done
+Index: gdb-6.8.50.20081128/gdb/testsuite/configure
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/configure	2008-12-09 17:02:39.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/testsuite/configure	2008-12-09 17:02:55.000000000 +0100
+@@ -3131,7 +3131,7 @@ done
  
  
  
--                                                                                                                                                                                              ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
-+                                                                                                                                                                                              ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+-                                                                                                                                                                                                        ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
++                                                                                                                                                                                                        ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
  cat >confcache <<\_ACEOF
  # This file is a shell script that caches the results of configure
  # tests run on this system so they can be shared between configure
-@@ -3671,6 +3671,7 @@ do
+@@ -3698,6 +3698,7 @@ do
    "gdb.objc/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.objc/Makefile" ;;
    "gdb.opt/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
    "gdb.pascal/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
 +  "gdb.pie/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.pie/Makefile" ;;
+   "gdb.python/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
    "gdb.threads/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
    "gdb.trace/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.trace/Makefile" ;;
-   "gdb.xml/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.xml/Makefile" ;;
-Index: gdb-6.5/gdb/testsuite/gdb.pie/attach.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.pie/attach.c	2006-07-07 01:13:23.000000000 -0300
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach.c	2008-12-09 17:02:55.000000000 +0100
 @@ -0,0 +1,20 @@
 +/* This program is intended to be started outside of gdb, and then
 +   attached to by gdb.  Thus, it simply spins in a loop.  The loop
@@ -51,10 +56,10 @@
 +    }
 +  return 0;
 +}
-Index: gdb-6.5/gdb/testsuite/gdb.pie/attach2.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach2.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.pie/attach2.c	2006-07-07 01:13:23.000000000 -0300
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach2.c	2008-12-09 17:02:55.000000000 +0100
 @@ -0,0 +1,24 @@
 +/* This program is intended to be started outside of gdb, and then
 +   attached to by gdb.  Thus, it simply spins in a loop.  The loop
@@ -80,10 +85,10 @@
 +    }
 +  return (0);
 +}
-Index: gdb-6.5/gdb/testsuite/gdb.pie/break.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.pie/break.c	2006-07-07 01:13:23.000000000 -0300
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.c	2008-12-09 17:02:55.000000000 +0100
 @@ -0,0 +1,146 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -231,10 +236,10 @@
 +    }
 +  return 0;
 +}
-Index: gdb-6.5/gdb/testsuite/gdb.pie/break1.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break1.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.pie/break1.c	2006-07-07 01:13:23.000000000 -0300
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break1.c	2008-12-09 17:02:55.000000000 +0100
 @@ -0,0 +1,44 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -280,10 +285,10 @@
 +void marker3 (a, b) char *a, *b; {}	/* set breakpoint 18 here */
 +void marker4 (d) long d; {}		/* set breakpoint 13 here */
 +#endif
-Index: gdb-6.5/gdb/testsuite/gdb.pie/coremaker.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/coremaker.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.pie/coremaker.c	2006-07-07 01:13:23.000000000 -0300
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/coremaker.c	2008-12-09 17:02:55.000000000 +0100
 @@ -0,0 +1,142 @@
 +/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
 +   Free Software Foundation, Inc.
@@ -427,10 +432,10 @@
 +  return 0;
 +}
 +
-Index: gdb-6.5/gdb/testsuite/gdb.pie/attach.exp
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.pie/attach.exp	2006-07-07 01:13:23.000000000 -0300
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/attach.exp	2008-12-09 17:02:55.000000000 +0100
 @@ -0,0 +1,432 @@
 +#   Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
 +
@@ -689,7 +694,7 @@
 +   #
 +   send_gdb "tbreak 19\n"
 +   gdb_expect {
-+      -re "Breakpoint .*at.*$srcfile, line 19.*$gdb_prompt $"\
++      -re "reakpoint .*at.*$srcfile, line 19.*$gdb_prompt $"\
 +                      {pass "after attach2, set tbreak postloop"}
 +      -re "$gdb_prompt $" {fail "after attach2, set tbreak postloop"}
 +      timeout         {fail "(timeout) after attach2, set tbreak postloop"}
@@ -864,10 +869,10 @@
 +do_call_attach_tests
 +
 +return 0
-Index: gdb-6.5/gdb/testsuite/gdb.pie/break.exp
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.pie/break.exp	2006-07-07 01:13:23.000000000 -0300
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/break.exp	2008-12-09 17:24:34.000000000 +0100
 @@ -0,0 +1,973 @@
 +#   Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
 +#   2000, 2002, 2003, 2004
@@ -1144,13 +1149,13 @@
 +# test temporary breakpoint at function
 +#
 +
-+gdb_test "tbreak main" "Breakpoint.*at.* file .*$srcfile, line.*" "Temporary breakpoint function"
++gdb_test "tbreak main" "reakpoint.*at.* file .*$srcfile, line.*" "Temporary breakpoint function"
 +
 +#
 +# test break at function in file
 +#
 +
-+gdb_test "tbreak $srcfile:factorial" "Breakpoint.*at.* file .*$srcfile, line.*" \
++gdb_test "tbreak $srcfile:factorial" "reakpoint.*at.* file .*$srcfile, line.*" \
 +	"Temporary breakpoint function in file"
 +
 +#
@@ -1158,25 +1163,25 @@
 +#
 +send_gdb "tbreak $bp_location1\n"
 +gdb_expect {
-+    -re "Breakpoint.*at.* file .*$srcfile, line $bp_location1.*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
++    -re "reakpoint.*at.* file .*$srcfile, line $bp_location1.*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
 +	-re ".*$gdb_prompt $"   { pass "Temporary breakpoint line number #1" }
 +	timeout	    { fail "breakpoint line number #1 (timeout)" }
 +}
 +
-+gdb_test "tbreak $bp_location6" "Breakpoint.*at.* file .*$srcfile, line $bp_location6.*" "Temporary breakpoint line number #2"
++gdb_test "tbreak $bp_location6" "reakpoint.*at.* file .*$srcfile, line $bp_location6.*" "Temporary breakpoint line number #2"
 +
 +#
 +# test break at line number in file
 +#
 +send_gdb "tbreak $srcfile:$bp_location2\n"
 +gdb_expect {
-+    -re "Breakpoint.*at.* file .*$srcfile, line $bp_location2.*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
++    -re "reakpoint.*at.* file .*$srcfile, line $bp_location2.*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
 +	-re ".*$gdb_prompt $"   { pass "Temporary breakpoint line number in file #1" }
 +	timeout	    { fail "Temporary breakpoint line number in file #1 (timeout)" }
 +}
 +
 +set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
-+gdb_test  "tbreak $srcfile:$bp_location11" "Breakpoint.*at.* file .*$srcfile, line $bp_location11.*" "Temporary breakpoint line number in file #2"
++gdb_test  "tbreak $srcfile:$bp_location11" "reakpoint.*at.* file .*$srcfile, line $bp_location11.*" "Temporary breakpoint line number in file #2"
 +
 +#
 +# check to see what breakpoints are set (temporary this time)
@@ -1842,10 +1847,10 @@
 +    send_gdb "set args main\n"
 +    gdb_expect -re ".*$gdb_prompt $" {}
 +}
-Index: gdb-6.5/gdb/testsuite/gdb.pie/corefile.exp
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/corefile.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.pie/corefile.exp	2006-07-07 01:13:23.000000000 -0300
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/corefile.exp	2008-12-09 17:02:55.000000000 +0100
 @@ -0,0 +1,243 @@
 +# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 +# Free Software Foundation, Inc.
@@ -2090,10 +2095,10 @@
 +gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\).*" "up in corefile.exp (reinit)"
 +
 +gdb_test "core" "No core file now."
-Index: gdb-6.5/gdb/testsuite/gdb.pie/Makefile.in
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/Makefile.in
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.5/gdb/testsuite/gdb.pie/Makefile.in	2006-07-07 01:13:23.000000000 -0300
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.pie/Makefile.in	2008-12-09 17:02:55.000000000 +0100
 @@ -0,0 +1,19 @@
 +VPATH = @srcdir@
 +srcdir = @srcdir@

gdb-6.3-warnings-20050317.patch:

Index: gdb-6.3-warnings-20050317.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-warnings-20050317.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gdb-6.3-warnings-20050317.patch	1 Nov 2007 20:24:20 -0000	1.7
+++ gdb-6.3-warnings-20050317.patch	14 Dec 2008 14:05:15 -0000	1.8
@@ -1,389 +1,231 @@
-[base]
+http://sourceware.org/ml/gdb-patches/2008-12/msg00243.html
 
-2007-10-14  Jan Kratochvil  <jan.kratochvil at redhat.com>
+ 	Check return values of functions declared with warn_unused_result
+ 	attribute in GLIBC 2.8.
+ 	* cli/cli-cmds.c (pwd_command): Check return value from getcwd.
+ 	* inflow.c (check_syscall): New function.
+ 	(new_tty): Use check_syscall to check return values from open and dup.
+ 	* linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
+ 	* main.c (captured_main): Call cwd after setting up gdb_stderr;
+ 	check for errors from getcwd.
+ 	* mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
+ 	* ui-file.c (stdio_file_write): Check return value from fwrite.
+ 	(stdio_file_fputs): Check return value from fputs.
+ 	* utils.c (internal_vproblem): abort if last-ditch error message
+ 	write fails.
 
-	Port to GDB-6.7.
+[ +linespec.c: Fedora patch. ]
+[ +top.c: Fedora patch. ]
 
-Index: gdb-6.7/gdb/mi/mi-cmd-env.c
-===================================================================
---- gdb-6.7.orig/gdb/mi/mi-cmd-env.c	2007-10-14 23:42:39.000000000 +0200
-+++ gdb-6.7/gdb/mi/mi-cmd-env.c	2007-10-14 23:42:39.000000000 +0200
-@@ -78,7 +78,8 @@ mi_cmd_env_pwd (char *command, char **ar
-      
-   /* Otherwise the mi level is 2 or higher.  */
- 
+---
+ gdb/ChangeLog       |   14 ++++++++++++++
+ gdb/cli/cli-cmds.c  |    4 +++-
+ gdb/inflow.c        |   22 ++++++++++++++--------
+ gdb/linux-nat.c     |    6 ++++--
+ gdb/main.c          |   12 +++++++++---
+ gdb/mi/mi-cmd-env.c |    5 ++++-
+ gdb/ui-file.c       |    6 ++++--
+ gdb/utils.c         |    8 +++++++-
+ 8 files changed, 59 insertions(+), 18 deletions(-)
+
+diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
+index 806a68a..b80bdfc 100644
+--- a/gdb/cli/cli-cmds.c
++++ b/gdb/cli/cli-cmds.c
+@@ -323,7 +323,9 @@ pwd_command (char *args, int from_tty)
+ {
+   if (args)
+     error (_("The \"pwd\" command does not take an argument: %s"), args);
 -  getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
-+  /* Unused result.  */
-+  1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
-   ui_out_field_string (uiout, "cwd", gdb_dirbuf);
++  if (! getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)))
++    error (_("Error finding name of working directory: %s"),
++           safe_strerror (errno));
  
-   return MI_CMD_DONE;
-Index: gdb-6.7/gdb/testsuite/gdb.base/move-dir.h
-===================================================================
---- gdb-6.7.orig/gdb/testsuite/gdb.base/move-dir.h	2007-10-14 23:31:22.000000000 +0200
-+++ gdb-6.7/gdb/testsuite/gdb.base/move-dir.h	2007-10-14 23:42:39.000000000 +0200
-@@ -1,4 +1,4 @@
--#include <stdlib.h>
-+#include <stdio.h>
- 
- void other() {
-   const char* ostring = "other";
-Index: gdb-6.7/gdb/testsuite/gdb.base/sigrepeat.c
-===================================================================
---- gdb-6.7.orig/gdb/testsuite/gdb.base/sigrepeat.c	2007-08-23 20:08:49.000000000 +0200
-+++ gdb-6.7/gdb/testsuite/gdb.base/sigrepeat.c	2007-10-14 23:42:39.000000000 +0200
-@@ -21,6 +21,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <signal.h>
-+#include <stdlib.h>
- #include <sys/time.h>
+   if (strcmp (gdb_dirbuf, current_directory) != 0)
+     printf_unfiltered (_("Working directory %s\n (canonically %s).\n"),
+diff --git a/gdb/inflow.c b/gdb/inflow.c
+index e82514e..7ecb5ab 100644
+--- a/gdb/inflow.c
++++ b/gdb/inflow.c
+@@ -523,6 +523,16 @@ new_tty_prefork (const char *ttyname)
+   inferior_thisrun_terminal = ttyname;
+ }
  
- static volatile int done[2];
-Index: gdb-6.7/gdb/s390-tdep.c
-===================================================================
---- gdb-6.7.orig/gdb/s390-tdep.c	2007-10-02 21:26:42.000000000 +0200
-+++ gdb-6.7/gdb/s390-tdep.c	2007-10-14 23:42:39.000000000 +0200
-@@ -2214,6 +2214,9 @@ s390_return_value (struct gdbarch *gdbar
- 	case RETURN_VALUE_STRUCT_CONVENTION:
- 	  error (_("Cannot set function return value."));
- 	  break;
-+
-+        default:
-+      	  break;
- 	}
-     }
-   else if (out)
-@@ -2246,6 +2249,9 @@ s390_return_value (struct gdbarch *gdbar
- 	case RETURN_VALUE_STRUCT_CONVENTION:
- 	  error (_("Function return value unknown."));
- 	  break;
++static void
++check_syscall (const char *msg, int result)
++{
++  if (result < 0)
++    {
++      print_sys_errmsg (msg, errno);
++      _exit (1);
++    }
++}
 +
-+        default:
-+      	  break;
- 	}
-     }
- 
-Index: gdb-6.7/gdb/f-exp.y
-===================================================================
---- gdb-6.7.orig/gdb/f-exp.y	2007-06-12 17:33:03.000000000 +0200
-+++ gdb-6.7/gdb/f-exp.y	2007-10-14 23:42:39.000000000 +0200
-@@ -567,6 +567,8 @@ ptype	:	typebase
- 		      case tp_function:
- 			follow_type = lookup_function_type (follow_type);
- 			break;
-+		      default:
-+			break;
- 		      }
- 		  $$ = follow_type;
- 		}
-Index: gdb-6.7/gdb/source.c
-===================================================================
---- gdb-6.7.orig/gdb/source.c	2007-08-23 20:08:38.000000000 +0200
-+++ gdb-6.7/gdb/source.c	2007-10-14 23:42:39.000000000 +0200
-@@ -170,7 +170,7 @@ get_current_source_symtab_and_line (void
  void
- set_default_source_symtab_and_line (void)
+ new_tty (void)
  {
--  struct symtab_and_line cursal;
-+  struct symtab_and_line cursal = {0};
+@@ -549,27 +559,23 @@ new_tty (void)
  
-   if (!have_full_symbols () && !have_partial_symbols ())
-     error (_("No symbol table is loaded.  Use the \"file\" command."));
-@@ -1439,7 +1439,7 @@ static void
- line_info (char *arg, int from_tty)
- {
-   struct symtabs_and_lines sals;
--  struct symtab_and_line sal;
-+  struct symtab_and_line sal = {0};
-   CORE_ADDR start_pc, end_pc;
-   int i;
+   /* Now open the specified new terminal.  */
+   tty = open (inferior_thisrun_terminal, O_RDWR | O_NOCTTY);
+-  if (tty == -1)
+-    {
+-      print_sys_errmsg (inferior_thisrun_terminal, errno);
+-      _exit (1);
+-    }
++  check_syscall (inferior_thisrun_terminal, tty);
  
-Index: gdb-6.7/gdb/linespec.c
-===================================================================
---- gdb-6.7.orig/gdb/linespec.c	2007-10-14 23:31:03.000000000 +0200
-+++ gdb-6.7/gdb/linespec.c	2007-10-14 23:53:57.000000000 +0200
-@@ -1654,7 +1654,7 @@ static struct symtabs_and_lines
- find_method (int funfirstline, char ***canonical, char *saved_arg,
- 	     char *copy, struct type *t, struct symbol *sym_class)
- {
--  struct symtabs_and_lines values;
-+  struct symtabs_and_lines values = { NULL }; 
-   struct symbol *sym = NULL;
-   int i1;	/*  Counter for the symbol array.  */
-   struct symbol **sym_arr =  alloca (total_number_of_methods (t)
-Index: gdb-6.7/gdb/gdb-events.c
-===================================================================
---- gdb-6.7.orig/gdb/gdb-events.c	2007-08-23 20:08:31.000000000 +0200
-+++ gdb-6.7/gdb/gdb-events.c	2007-10-14 23:42:39.000000000 +0200
-@@ -319,6 +319,8 @@ gdb_events_deliver (struct gdb_events *v
- 	case architecture_changed:
- 	  vector->architecture_changed ();
- 	  break;
-+	default:
-+	  break;
- 	}
-       delivering_events = event->next;
-       xfree (event);
-Index: gdb-6.7/gdb/dwarf2read.c
-===================================================================
---- gdb-6.7.orig/gdb/dwarf2read.c	2007-10-14 23:31:22.000000000 +0200
-+++ gdb-6.7/gdb/dwarf2read.c	2007-10-14 23:42:39.000000000 +0200
-@@ -9585,6 +9585,7 @@ dwarf_decode_macros (struct line_header 
-   for (;;)
-     {
-       enum dwarf_macinfo_record_type macinfo_type;
-+      int tmp;
- 
-       /* Do we at least have room for a macinfo type byte?  */
-       if (mac_ptr >= mac_end)
-@@ -9596,13 +9597,16 @@ dwarf_decode_macros (struct line_header 
-       macinfo_type = read_1_byte (abfd, mac_ptr);
-       mac_ptr++;
- 
-+      /* Check for a zero macinfo type which indicates the end of the macro
-+         information.  We do this as the compiler may warn us if we
-+         try and look for 0 in the switch below because 0 is not
-+         an enumerated value.  */
-+      tmp = (int)macinfo_type;
-+      if (tmp == 0)
-+	return;
-+
-       switch (macinfo_type)
-         {
--          /* A zero macinfo type indicates the end of the macro
--             information.  */
--        case 0:
--          return;
--
-         case DW_MACINFO_define:
-         case DW_MACINFO_undef:
-           {
-Index: gdb-6.7/gdb/stabsread.c
-===================================================================
---- gdb-6.7.orig/gdb/stabsread.c	2007-10-09 00:44:32.000000000 +0200
-+++ gdb-6.7/gdb/stabsread.c	2007-10-14 23:42:39.000000000 +0200
-@@ -1842,7 +1842,8 @@ again:
- 	  struct type *domain = read_type (pp, objfile);
- 	  struct type *return_type;
- 	  struct field *args;
--	  int nargs, varargs;
-+	  int nargs = 0;
-+	  int varargs = 0;
- 
- 	  if (**pp != ',')
- 	    /* Invalid member type data format.  */
-Index: gdb-6.7/gdb/dwarf2expr.c
-===================================================================
---- gdb-6.7.orig/gdb/dwarf2expr.c	2007-08-23 20:08:28.000000000 +0200
-+++ gdb-6.7/gdb/dwarf2expr.c	2007-10-14 23:42:39.000000000 +0200
-@@ -594,6 +594,8 @@ execute_stack_op (struct dwarf_expr_cont
- 	      op_ptr = read_uleb128 (op_ptr, op_end, &reg);
- 	      result += reg;
- 	      break;
-+	    default:
-+	      break;
- 	    }
- 	  break;
- 
-Index: gdb-6.7/gdb/varobj.c
-===================================================================
---- gdb-6.7.orig/gdb/varobj.c	2007-10-13 05:29:58.000000000 +0200
-+++ gdb-6.7/gdb/varobj.c	2007-10-14 23:42:39.000000000 +0200
-@@ -347,8 +347,7 @@ static struct language_specific language
-    c_value_of_variable}
-   ,
-   /* C */
--  {
--   vlang_c,
-+  {vlang_c,
-    c_number_of_children,
-    c_name_of_variable,
-    c_name_of_child,
-@@ -360,8 +359,7 @@ static struct language_specific language
-    c_value_of_variable}
-   ,
-   /* C++ */
--  {
--   vlang_cplus,
-+  {vlang_cplus,
-    cplus_number_of_children,
-    cplus_name_of_variable,
-    cplus_name_of_child,
-@@ -373,8 +371,7 @@ static struct language_specific language
-    cplus_value_of_variable}
-   ,
-   /* Java */
--  {
--   vlang_java,
-+  {vlang_java,
-    java_number_of_children,
-    java_name_of_variable,
-    java_name_of_child,
-Index: gdb-6.7/gdb/doublest.c
-===================================================================
---- gdb-6.7.orig/gdb/doublest.c	2007-08-23 20:08:28.000000000 +0200
-+++ gdb-6.7/gdb/doublest.c	2007-10-14 23:42:39.000000000 +0200
-@@ -92,15 +92,10 @@ get_field (const bfd_byte *data, enum fl
-     {
-       result |= (unsigned long)*(data + cur_byte) << cur_bitshift;
-       cur_bitshift += FLOATFORMAT_CHAR_BIT;
--      switch (order)
--	{
--	case floatformat_little:
--	  ++cur_byte;
--	  break;
--	case floatformat_big:
--	  --cur_byte;
--	  break;
--	}
-+      if (order == floatformat_little)
-+	++cur_byte;
-+      else
-+	--cur_byte;
-     }
-   if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
-     /* Mask out bits which are not part of the field */
-Index: gdb-6.7/gdb/cli/cli-cmds.c
-===================================================================
---- gdb-6.7.orig/gdb/cli/cli-cmds.c	2007-08-23 20:08:47.000000000 +0200
-+++ gdb-6.7/gdb/cli/cli-cmds.c	2007-10-14 23:42:39.000000000 +0200
-@@ -320,7 +320,8 @@ pwd_command (char *args, int from_tty)
- {
-   if (args)
-     error (_("The \"pwd\" command does not take an argument: %s"), args);
--  getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
-+  /* Unused result.  */
-+  1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
- 
-   if (strcmp (gdb_dirbuf, current_directory) != 0)
-     printf_unfiltered (_("Working directory %s\n (canonically %s).\n"),
-Index: gdb-6.7/gdb/inflow.c
-===================================================================
---- gdb-6.7.orig/gdb/inflow.c	2007-08-23 20:08:35.000000000 +0200
-+++ gdb-6.7/gdb/inflow.c	2007-10-14 23:42:39.000000000 +0200
-@@ -547,17 +547,20 @@ new_tty (void)
+   /* Avoid use of dup2; doesn't exist on all systems.  */
    if (tty != 0)
      {
        close (0);
 -      dup (tty);
-+      /* Unused result.  */
-+      1 && dup (tty);
++      check_syscall ("dup'ing tty into fd 0", dup (tty));
      }
    if (tty != 1)
      {
        close (1);
 -      dup (tty);
-+      /* Unused result.  */
-+      1 && dup (tty);
++      check_syscall ("dup'ing tty into fd 1", dup (tty));
      }
    if (tty != 2)
      {
        close (2);
 -      dup (tty);
-+      /* Unused result.  */
-+      1 && dup (tty);
++      check_syscall ("dup'ing tty into fd 2", dup (tty));
      }
-   if (tty > 2)
-     close (tty);
-Index: gdb-6.7/gdb/linux-nat.c
-===================================================================
---- gdb-6.7.orig/gdb/linux-nat.c	2007-10-14 23:31:22.000000000 +0200
-+++ gdb-6.7/gdb/linux-nat.c	2007-10-14 23:42:39.000000000 +0200
-@@ -2895,7 +2895,8 @@ linux_nat_info_proc_cmd (char *args, int
-       sprintf (fname1, "/proc/%lld/cmdline", pid);
+ 
+ #ifdef TIOCSCTTY
+diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
+index 913bfec..a829eb8 100644
+--- a/gdb/linux-nat.c
++++ b/gdb/linux-nat.c
+@@ -3666,8 +3666,10 @@ linux_nat_info_proc_cmd (char *args, int from_tty)
        if ((procfile = fopen (fname1, "r")) != NULL)
  	{
+ 	  struct cleanup *cleanup = make_cleanup_fclose (procfile);
 -	  fgets (buffer, sizeof (buffer), procfile);
-+	  /* Unused result.  */
-+	  1 && fgets (buffer, sizeof (buffer), procfile);
- 	  printf_filtered ("cmdline = '%s'\n", buffer);
- 	  fclose (procfile);
+-	  printf_filtered ("cmdline = '%s'\n", buffer);
++          if (fgets (buffer, sizeof (buffer), procfile))
++            printf_filtered ("cmdline = '%s'\n", buffer);
++          else
++            warning (_("unable to read '/proc/%lld/cmdline'"), pid);
+ 	  do_cleanups (cleanup);
  	}
-Index: gdb-6.7/gdb/main.c
-===================================================================
---- gdb-6.7.orig/gdb/main.c	2007-08-23 20:08:36.000000000 +0200
-+++ gdb-6.7/gdb/main.c	2007-10-14 23:42:39.000000000 +0200
-@@ -193,7 +193,8 @@ captured_main (void *data)
+       else
+diff --git a/gdb/main.c b/gdb/main.c
+index a53002d..a9fd988 100644
+--- a/gdb/main.c
++++ b/gdb/main.c
+@@ -195,9 +195,6 @@ captured_main (void *data)
    line[0] = '\0';		/* Terminate saved (now empty) cmd line */
    instream = stdin;
  
 -  getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
-+  /* Unused result.  */
-+  1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
-   current_directory = gdb_dirbuf;
- 
+-  current_directory = gdb_dirbuf;
+-
    gdb_stdout = stdio_fileopen (stdout);
-Index: gdb-6.7/gdb/top.c
-===================================================================
---- gdb-6.7.orig/gdb/top.c	2007-10-14 23:38:27.000000000 +0200
-+++ gdb-6.7/gdb/top.c	2007-10-14 23:42:39.000000000 +0200
-@@ -1636,7 +1636,8 @@ gdb_init (char *argv0)
- 
-   /* Run the init function of each source file */
+   gdb_stderr = stdio_fileopen (stderr);
+   gdb_stdlog = gdb_stderr;	/* for moment */
+@@ -206,6 +203,15 @@ captured_main (void *data)
+   gdb_stdtargerr = gdb_stderr;	/* for moment */
+   gdb_stdtargin = gdb_stdin;	/* for moment */
+ 
++  if (! getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)))
++    /* Don't use *_filtered or warning() (which relies on
++       current_target) until after initialize_all_files(). */
++    fprintf_unfiltered (gdb_stderr,
++                        _("%s: warning: error finding working directory: %s\n"),
++                        argv[0], safe_strerror (errno));
++    
++  current_directory = gdb_dirbuf;
++
+   /* Set the sysroot path.  */
+ #ifdef TARGET_SYSTEM_ROOT_RELOCATABLE
+   gdb_sysroot = make_relative_prefix (argv[0], BINDIR, TARGET_SYSTEM_ROOT);
+diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
+index 327ddc5..0103153 100644
+--- a/gdb/mi/mi-cmd-env.c
++++ b/gdb/mi/mi-cmd-env.c
+@@ -78,7 +78,10 @@ mi_cmd_env_pwd (char *command, char **argv, int argc)
+      
+   /* Otherwise the mi level is 2 or higher.  */
  
 -  getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
-+  /* Unused result.  */
-+  1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
-   current_directory = gdb_dirbuf;
++  if (! getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)))
++    error (_("mi_cmd_env_pwd: error finding name of working directory: %s"),
++           safe_strerror (errno));
++    
+   ui_out_field_string (uiout, "cwd", gdb_dirbuf);
+ }
  
- #ifdef __MSDOS__
-Index: gdb-6.7/gdb/ui-file.c
-===================================================================
---- gdb-6.7.orig/gdb/ui-file.c	2007-08-23 20:08:46.000000000 +0200
-+++ gdb-6.7/gdb/ui-file.c	2007-10-14 23:42:39.000000000 +0200
-@@ -480,7 +480,8 @@ stdio_file_write (struct ui_file *file, 
+diff --git a/gdb/ui-file.c b/gdb/ui-file.c
+index 9a1d892..2ed304f 100644
+--- a/gdb/ui-file.c
++++ b/gdb/ui-file.c
+@@ -481,7 +481,8 @@ stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
    if (stdio->magic != &stdio_file_magic)
      internal_error (__FILE__, __LINE__,
  		    _("stdio_file_write: bad magic number"));
 -  fwrite (buf, length_buf, 1, stdio->file);
-+  /* Unused result.  */
-+  1 && fwrite (buf, length_buf, 1, stdio->file);
++  if (fwrite (buf, length_buf, 1, stdio->file) != 1)
++    error ("stdio_file_write: %s", safe_strerror (errno));
  }
  
  static void
-Index: gdb-6.7/gdb/utils.c
-===================================================================
---- gdb-6.7.orig/gdb/utils.c	2007-08-23 20:08:46.000000000 +0200
-+++ gdb-6.7/gdb/utils.c	2007-10-14 23:42:39.000000000 +0200
-@@ -716,7 +716,8 @@ internal_vproblem (struct internal_probl
+@@ -491,7 +492,8 @@ stdio_file_fputs (const char *linebuffer, struct ui_file *file)
+   if (stdio->magic != &stdio_file_magic)
+     internal_error (__FILE__, __LINE__,
+ 		    _("stdio_file_fputs: bad magic number"));
+-  fputs (linebuffer, stdio->file);
++  if (fputs (linebuffer, stdio->file) == EOF)
++    error ("stdio_file_fputs: %s", safe_strerror (errno));
+ }
+ 
+ static int
+diff --git a/gdb/utils.c b/gdb/utils.c
+index d14009f..725f00b 100644
+--- a/gdb/utils.c
++++ b/gdb/utils.c
+@@ -865,7 +865,13 @@ internal_vproblem (struct internal_problem *problem,
  	abort ();	/* NOTE: GDB has only three calls to abort().  */
        default:
  	dejavu = 3;
 -	write (STDERR_FILENO, msg, sizeof (msg));
-+	/* Unused result.  */
-+	1 && write (STDERR_FILENO, msg, sizeof (msg));
++        /* Newer GLIBC versions put the warn_unused_result attribute
++           on write, but this is one of those rare cases where
++           ignoring the return value is correct.  Casting to (void)
++           does not fix this problem.  This is the solution suggested
++           at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509.  */
++	if (write (STDERR_FILENO, msg, sizeof (msg)) != sizeof (msg))
++          abort ();
  	exit (1);
        }
    }
-Index: gdb-6.7/gdb/gdbserver/gdbreplay.c
+Index: gdb-6.7/gdb/linespec.c
 ===================================================================
---- gdb-6.7.orig/gdb/gdbserver/gdbreplay.c	2007-08-23 20:08:48.000000000 +0200
-+++ gdb-6.7/gdb/gdbserver/gdbreplay.c	2007-10-14 23:42:39.000000000 +0200
-@@ -356,7 +356,12 @@ expect (FILE *fp)
- 	{
- 	  break;
- 	}
--      read (remote_desc, &fromgdb, 1);
-+      if (read (remote_desc, &fromgdb, 1) != 1)
-+        {
-+	  /* Error gets reported below.  */
-+	  fromlog = 0;
-+	  break;
-+	}
-     }
-   while (fromlog == fromgdb);
-   if (fromlog != EOL)
-@@ -383,7 +388,11 @@ play (FILE *fp)
-   while ((fromlog = logchar (fp)) != EOL)
-     {
-       ch = fromlog;
--      write (remote_desc, &ch, 1);
-+      if (write (remote_desc, &ch, 1) != 1)
-+        {
-+	  sync_error (fp, "Sync error during write of gdb packet", ch, 0);
-+	  break;
-+	}
-     }
- }
+--- gdb-6.7.orig/gdb/linespec.c	2007-10-14 23:31:03.000000000 +0200
++++ gdb-6.7/gdb/linespec.c	2007-10-14 23:53:57.000000000 +0200
+@@ -1654,7 +1654,7 @@ static struct symtabs_and_lines
+ find_method (int funfirstline, char ***canonical, char *saved_arg,
+ 	     char *copy, struct type *t, struct symbol *sym_class)
+ {
+-  struct symtabs_and_lines values;
++  struct symtabs_and_lines values = { NULL }; 
+   struct symbol *sym = NULL;
+   int i1;	/*  Counter for the symbol array.  */
+   struct symbol **sym_arr =  alloca (total_number_of_methods (t)
+Index: gdb-6.7/gdb/top.c
+===================================================================
+--- gdb-6.7.orig/gdb/top.c	2007-10-14 23:38:27.000000000 +0200
++++ gdb-6.7/gdb/top.c	2007-10-14 23:42:39.000000000 +0200
+@@ -1636,7 +1636,8 @@ gdb_init (char *argv0)
  
+   /* Run the init function of each source file */
+ 
+-  getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
++  /* Unused result.  */
++  1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
+   current_directory = gdb_dirbuf;
+ 
+ #ifdef __MSDOS__

gdb-6.5-bz181390-memory-address-width.patch:

Index: gdb-6.5-bz181390-memory-address-width.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.5-bz181390-memory-address-width.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.5-bz181390-memory-address-width.patch	3 Mar 2008 16:13:47 -0000	1.3
+++ gdb-6.5-bz181390-memory-address-width.patch	14 Dec 2008 14:05:15 -0000	1.4
@@ -4,7 +4,7 @@
 
 	* gdb/utils.c (paddress): Disable cutting of the printed addresses
 	to the target's address bit size; user wants to see everything.
-	* gdb/value.c (value_as_address_core): Original `value_as_address'.
+	* gdb/value.c (value_as_address1): Original `value_as_address'.
 	(value_as_address): New `value_as_address' wrapper - cut memory address
 	to the target's address bit size, bugreport by John Reiser.
 
@@ -56,7 +56,7 @@
 -value_as_address (struct value *val)
 +/* See `value_as_address' below - core of value to C pointer extraction.  */
 +static CORE_ADDR
-+value_as_address_core (struct value *val)
++value_as_address1 (struct value *val)
  {
    /* Assume a CORE_ADDR can fit in a LONGEST (for now).  Not sure
       whether we want this to be true eventually.  */
@@ -74,7 +74,7 @@
 +  CORE_ADDR addr;
 +  int addr_bit;
 +
-+  addr = value_as_address_core (val);
++  addr = value_as_address1 (val);
 +
 +  /* Truncate address to the size of a target address, avoiding shifts
 +     larger or equal than the width of a CORE_ADDR.  The local

gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch:

Index: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch	4 Aug 2008 04:42:57 -0000	1.6
+++ gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch	14 Dec 2008 14:05:16 -0000	1.7
@@ -30,11 +30,11 @@
   <81a2>     DW_AT_name        : (indirect string, offset: 0x280e): __errno_location
   <81a8>     DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
 
-Index: gdb-6.8cvs20080219/gdb/dwarf2read.c
+Index: gdb-6.8.50.20081128/gdb/dwarf2read.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/dwarf2read.c	2008-02-19 17:27:21.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/dwarf2read.c	2008-02-20 13:35:19.000000000 +0100
-@@ -5679,8 +5679,8 @@ read_partial_die (struct partial_die_inf
+--- gdb-6.8.50.20081128.orig/gdb/dwarf2read.c	2008-12-04 10:26:18.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/dwarf2read.c	2008-12-04 10:26:40.000000000 +0100
+@@ -5886,8 +5886,8 @@ read_partial_die (struct partial_die_inf
  	{
  	case DW_AT_name:
  
@@ -45,7 +45,7 @@
  	    part_die->name = DW_STRING (&attr);
  	  break;
  	case DW_AT_comp_dir:
-@@ -5688,7 +5688,9 @@ read_partial_die (struct partial_die_inf
+@@ -5895,7 +5895,9 @@ read_partial_die (struct partial_die_inf
  	    part_die->dirname = DW_STRING (&attr);
  	  break;
  	case DW_AT_MIPS_linkage_name:
@@ -56,7 +56,7 @@
  	  break;
  	case DW_AT_low_pc:
  	  has_low_pc_attr = 1;
-@@ -7936,9 +7938,13 @@ dwarf2_linkage_name (struct die_info *di
+@@ -8129,9 +8131,13 @@ dwarf2_linkage_name (struct die_info *di
  {
    struct attribute *attr;
  
@@ -73,11 +73,11 @@
    attr = dwarf2_attr (die, DW_AT_name, cu);
    if (attr && DW_STRING (attr))
      return DW_STRING (attr);
-Index: gdb-6.8cvs20080219/gdb/gdbtypes.c
+Index: gdb-6.8.50.20081128/gdb/gdbtypes.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/gdbtypes.c	2008-02-14 23:03:57.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/gdbtypes.c	2008-02-20 13:35:19.000000000 +0100
-@@ -3106,6 +3106,8 @@ gdbtypes_post_init (struct gdbarch *gdba
+--- gdb-6.8.50.20081128.orig/gdb/gdbtypes.c	2008-11-10 21:53:43.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/gdbtypes.c	2008-12-04 10:26:40.000000000 +0100
+@@ -3141,6 +3141,8 @@ gdbtypes_post_init (struct gdbarch *gdba
      init_type (TYPE_CODE_INT, 
  	       gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
  	       0, "int", (struct objfile *) NULL);
@@ -86,7 +86,7 @@
    builtin_type->builtin_unsigned_int =
      init_type (TYPE_CODE_INT, 
  	       gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
-@@ -3215,6 +3217,11 @@ gdbtypes_post_init (struct gdbarch *gdba
+@@ -3250,6 +3252,11 @@ gdbtypes_post_init (struct gdbarch *gdba
  	       "<text variable, no debug info>", NULL);
    TYPE_TARGET_TYPE (builtin_type->nodebug_text_symbol) =
      builtin_type->builtin_int;
@@ -98,11 +98,11 @@
    builtin_type->nodebug_data_symbol =
      init_type (TYPE_CODE_INT, 
  	       gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT, 0,
-Index: gdb-6.8cvs20080219/gdb/gdbtypes.h
+Index: gdb-6.8.50.20081128/gdb/gdbtypes.h
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/gdbtypes.h	2008-02-14 23:03:57.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/gdbtypes.h	2008-02-20 13:35:19.000000000 +0100
-@@ -942,6 +942,7 @@ struct builtin_type
+--- gdb-6.8.50.20081128.orig/gdb/gdbtypes.h	2008-10-28 18:19:56.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/gdbtypes.h	2008-12-04 10:26:40.000000000 +0100
+@@ -975,6 +975,7 @@ struct builtin_type
  
    /* Types used for symbols with no debug information.  */
    struct type *nodebug_text_symbol;
@@ -110,7 +110,7 @@
    struct type *nodebug_data_symbol;
    struct type *nodebug_unknown_symbol;
    struct type *nodebug_tls_symbol;
-@@ -960,6 +961,7 @@ struct builtin_type
+@@ -987,6 +988,7 @@ struct builtin_type
    struct type *builtin_char;
    struct type *builtin_short;
    struct type *builtin_int;
@@ -118,11 +118,11 @@
    struct type *builtin_long;
    struct type *builtin_signed_char;
    struct type *builtin_unsigned_char;
-Index: gdb-6.8cvs20080219/gdb/parse.c
+Index: gdb-6.8.50.20081128/gdb/parse.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/parse.c	2008-01-02 00:04:03.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/parse.c	2008-02-20 13:35:19.000000000 +0100
-@@ -437,7 +437,12 @@ write_exp_msymbol (struct minimal_symbol
+--- gdb-6.8.50.20081128.orig/gdb/parse.c	2008-11-24 18:05:43.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/parse.c	2008-12-04 10:26:40.000000000 +0100
+@@ -449,7 +449,12 @@ write_exp_msymbol (struct minimal_symbol
      case mst_text:
      case mst_file_text:
      case mst_solib_trampoline:
@@ -136,12 +136,12 @@
        break;
  
      case mst_data:
-Index: gdb-6.8cvs20080219/gdb/target.c
+Index: gdb-6.8.50.20081128/gdb/target.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/target.c	2008-02-19 17:22:33.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/target.c	2008-02-20 13:36:17.000000000 +0100
-@@ -812,6 +812,25 @@ pop_target (void)
-   internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
+--- gdb-6.8.50.20081128.orig/gdb/target.c	2008-12-04 10:24:58.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/target.c	2008-12-04 10:29:07.000000000 +0100
+@@ -850,6 +850,25 @@ pop_all_targets (int quitting)
+   pop_all_targets_above (dummy_stratum, quitting);
  }
  
 +static int
@@ -166,7 +166,7 @@
  /* Using the objfile specified in OBJFILE, find the address for the
     current thread's thread-local storage with offset OFFSET.  */
  CORE_ADDR
-@@ -893,7 +912,28 @@ target_translate_tls_address (struct obj
+@@ -931,7 +950,28 @@ target_translate_tls_address (struct obj
    /* It wouldn't be wrong here to try a gdbarch method, too; finding
       TLS is an ABI-specific thing.  But we don't do that yet.  */
    else
@@ -177,13 +177,13 @@
 +      msymbol = lookup_minimal_symbol ("errno", NULL, NULL);
 +      if (msymbol != NULL
 +	  && SYMBOL_VALUE_ADDRESS (msymbol) == offset
-+	  && (SYMBOL_BFD_SECTION (msymbol)->owner == objfile->obfd
++	  && (SYMBOL_OBJ_SECTION (msymbol)->objfile == objfile
 +	      || (objfile->separate_debug_objfile != NULL
-+	          && SYMBOL_BFD_SECTION (msymbol)->owner
-+		     == objfile->separate_debug_objfile->obfd)
++	          && SYMBOL_OBJ_SECTION (msymbol)->objfile
++		     == objfile->separate_debug_objfile)
 +	      || (objfile->separate_debug_objfile_backlink != NULL
-+	          && SYMBOL_BFD_SECTION (msymbol)->owner
-+		     == objfile->separate_debug_objfile_backlink->obfd)))
++	          && SYMBOL_OBJ_SECTION (msymbol)->objfile
++		     == objfile->separate_debug_objfile_backlink)))
 +	{
 +	  if (!catch_errors (resolve_errno, (void *) &addr, "",
 +	                     RETURN_MASK_ALL))
@@ -196,22 +196,10 @@
  
    return addr;
  }
---- ./gdb/elfread.c	2008-08-03 11:02:10.000000000 +0200
-+++ ./gdb/elfread.c	2008-08-03 11:01:21.000000000 +0200
-@@ -318,7 +318,8 @@ elf_symtab_read (struct objfile *objfile
- 	  /* Bfd symbols are section relative. */
- 	  symaddr = sym->value + sym->section->vma;
- 	  /* Relocate all non-absolute symbols by the section offset.  */
--	  if (sym->section != &bfd_abs_section)
-+	  if (sym->section != &bfd_abs_section
-+	    && (sym->section->flags & SEC_THREAD_LOCAL) == 0)
- 	    {
- 	      symaddr += offset;
- 	    }
-Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-errno.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.c	2008-02-20 13:35:19.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-errno.c	2008-12-04 10:26:40.000000000 +0100
 @@ -0,0 +1,28 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -241,10 +229,10 @@
 +
 +  return 0;	/* breakpoint */
 +}
-Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.exp	2008-02-20 13:35:19.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp	2008-12-04 10:26:40.000000000 +0100
 @@ -0,0 +1,67 @@
 +# Copyright 2007 Free Software Foundation, Inc.
 +

gdb-6.5-bz190810-gdbserver-arch-advice.patch:

Index: gdb-6.5-bz190810-gdbserver-arch-advice.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.5-bz190810-gdbserver-arch-advice.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.5-bz190810-gdbserver-arch-advice.patch	14 Jul 2008 09:09:04 -0000	1.3
+++ gdb-6.5-bz190810-gdbserver-arch-advice.patch	14 Dec 2008 14:05:16 -0000	1.4
@@ -7,37 +7,23 @@
 	(remote_async_wait): Likewise.
 
 
-Index: gdb-6.8/gdb/remote.c
+Index: gdb-6.8.50.20081128/gdb/remote.c
 ===================================================================
---- gdb-6.8.orig/gdb/remote.c	2008-07-14 10:27:07.000000000 +0200
-+++ gdb-6.8/gdb/remote.c	2008-07-14 10:27:17.000000000 +0200
-@@ -3509,8 +3509,13 @@ Packet: '%s'\n"),
- 					 reg->regnum, regs);
- 		  }
- 
-+		/* It may also occur on amd64 which defaults to 32-bit i386
-+		   target.  gdbserver(1) is not aware of the `set architecture'
-+		   name itself as it is not using libbfd.  */
- 		if (*p++ != ';')
--		  error (_("Remote register badly formatted: %s\nhere: %s"),
-+		  error (_("Remote register badly formatted: %s\nhere: %s"
-+			   "\nTry to load the executable by `file' first,"
-+			   "\nyou may also check `set/show architecture'."),
- 			 buf, p);
+--- gdb-6.8.50.20081128.orig/gdb/remote.c	2008-12-09 16:59:51.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/remote.c	2008-12-09 17:00:04.000000000 +0100
+@@ -4329,8 +4329,13 @@ Packet: '%s'\n"),
+ 		VEC_safe_push (cached_reg_t, event->regcache, &cached_reg);
  	      }
- 	  }
-@@ -3737,8 +3742,13 @@ Packet: '%s'\n"),
- 					 reg->regnum, regs);
- 		  }
  
-+		/* It may also occur on amd64 which defaults to 32-bit i386
-+		   target.  gdbserver(1) is not aware of the `set architecture'
-+		   name itself as it is not using libbfd.  */
- 		if (*p++ != ';')
--		  error (_("Remote register badly formatted: %s\nhere: %s"),
-+		  error (_("Remote register badly formatted: %s\nhere: %s"
-+			   "\nTry to load the executable by `file' first,"
-+			   "\nyou may also check `set/show architecture'."),
- 			 buf, p);
- 	      }
+-	    if (*p != ';')
+-	      error (_("Remote register badly formatted: %s\nhere: %s"),
++	    /* It may also occur on amd64 which defaults to 32-bit i386
++	       target.  gdbserver(1) is not aware of the `set architecture'
++	       name itself as it is not using libbfd.  */
++	    if (*p != ';')
++	      error (_("Remote register badly formatted: %s\nhere: %s"
++		       "\nTry to load the executable by `file' first,"
++		       "\nyou may also check `set/show architecture'."),
+ 		     buf, p);
+ 	    ++p;
  	  }

gdb-6.5-bz216711-clone-is-outermost.patch:

Index: gdb-6.5-bz216711-clone-is-outermost.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.5-bz216711-clone-is-outermost.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.5-bz216711-clone-is-outermost.patch	1 Nov 2007 20:24:20 -0000	1.2
+++ gdb-6.5-bz216711-clone-is-outermost.patch	14 Dec 2008 14:05:16 -0000	1.3
@@ -1,5 +1,8 @@
 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216711
 
+FIXME: This workaround should be dropped and
+glibc/sysdeps/unix/sysv/linux/x86_64/clone.S should get CFI for the child
+instead.
 
 2006-12-17  Jan Kratochvil  <jan.kratochvil at redhat.com>
 
@@ -20,10 +23,10 @@
 
 	Port to GDB-6.7.
 
-Index: gdb-6.7/gdb/amd64-linux-tdep.c
+Index: gdb-6.8.50.20081128/gdb/amd64-linux-tdep.c
 ===================================================================
---- gdb-6.7.orig/gdb/amd64-linux-tdep.c	2007-08-23 20:08:26.000000000 +0200
-+++ gdb-6.7/gdb/amd64-linux-tdep.c	2007-10-16 15:57:03.000000000 +0200
+--- gdb-6.8.50.20081128.orig/gdb/amd64-linux-tdep.c	2008-12-08 10:56:17.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/amd64-linux-tdep.c	2008-12-08 21:11:08.000000000 +0100
 @@ -234,6 +234,80 @@ amd64_linux_register_reggroup_p (struct 
  
  /* Set the program counter for process PTID to PC.  */
@@ -65,12 +68,12 @@
 +#define LINUX_CLONE_LEN (sizeof linux_clone_code)
 +
 +static int
-+amd64_linux_clone_running (struct frame_info *next_frame)
++amd64_linux_clone_running (struct frame_info *this_frame)
 +{
-+  CORE_ADDR pc = frame_pc_unwind (next_frame);
++  CORE_ADDR pc = get_frame_pc (this_frame);
 +  unsigned char buf[LINUX_CLONE_LEN];
 +
-+  if (!safe_frame_unwind_memory (next_frame, pc - LINUX_CLONE_LEN, buf,
++  if (!safe_frame_unwind_memory (this_frame, pc - LINUX_CLONE_LEN, buf,
 +				 LINUX_CLONE_LEN))
 +    return 0;
 +
@@ -81,9 +84,9 @@
 +}
 +
 +static int
-+amd64_linux_outermost_frame (struct frame_info *next_frame)
++amd64_linux_outermost_frame (struct frame_info *this_frame)
 +{
-+  CORE_ADDR pc = frame_pc_unwind (next_frame);
++  CORE_ADDR pc = get_frame_pc (this_frame);
 +  char *name;
 +
 +  find_pc_partial_function (pc, &name, NULL, NULL);
@@ -97,7 +100,7 @@
 +     subtle changes in specific glibc revisions.  */
 +  if (name == NULL || strcmp (name, "clone") == 0
 +      || strcmp ("__clone", name) == 0)
-+    return (amd64_linux_clone_running (next_frame) != 0);
++    return (amd64_linux_clone_running (this_frame) != 0);
 +
 +  return 0;
 +}
@@ -114,32 +117,32 @@
    /* GNU/Linux uses SVR4-style shared libraries.  */
    set_solib_svr4_fetch_link_map_offsets
      (gdbarch, svr4_lp64_fetch_link_map_offsets);
-Index: gdb-6.7/gdb/amd64-tdep.c
+Index: gdb-6.8.50.20081128/gdb/amd64-tdep.c
 ===================================================================
---- gdb-6.7.orig/gdb/amd64-tdep.c	2007-10-12 17:48:39.000000000 +0200
-+++ gdb-6.7/gdb/amd64-tdep.c	2007-10-16 15:57:03.000000000 +0200
-@@ -849,11 +849,16 @@ amd64_frame_this_id (struct frame_info *
+--- gdb-6.8.50.20081128.orig/gdb/amd64-tdep.c	2008-12-08 10:56:17.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/amd64-tdep.c	2008-12-08 21:05:12.000000000 +0100
+@@ -1044,11 +1044,16 @@ amd64_frame_this_id (struct frame_info *
  {
    struct amd64_frame_cache *cache =
-     amd64_frame_cache (next_frame, this_cache);
-+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+     amd64_frame_cache (this_frame, this_cache);
++  struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
  
    /* This marks the outermost frame.  */
    if (cache->base == 0)
      return;
  
 +  /* Detect OS dependent outermost frames; such as `clone'.  */
-+  if (tdep->outermost_frame_p && tdep->outermost_frame_p (next_frame))
++  if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame))
 +    return;
 +
    (*this_id) = frame_id_build (cache->base + 16, cache->pc);
  }
  
-Index: gdb-6.7/gdb/i386-tdep.c
+Index: gdb-6.8.50.20081128/gdb/i386-tdep.c
 ===================================================================
---- gdb-6.7.orig/gdb/i386-tdep.c	2007-10-12 17:48:39.000000000 +0200
-+++ gdb-6.7/gdb/i386-tdep.c	2007-10-16 15:57:03.000000000 +0200
-@@ -2355,6 +2355,9 @@ i386_gdbarch_init (struct gdbarch_info i
+--- gdb-6.8.50.20081128.orig/gdb/i386-tdep.c	2008-12-08 10:56:17.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/i386-tdep.c	2008-12-08 11:00:43.000000000 +0100
+@@ -2698,6 +2698,9 @@ i386_gdbarch_init (struct gdbarch_info i
    tdep->sc_pc_offset = -1;
    tdep->sc_sp_offset = -1;
  
@@ -149,24 +152,24 @@
    /* The format used for `long double' on almost all i386 targets is
       the i387 extended floating-point format.  In fact, of all targets
       in the GCC 2.95 tree, only OSF/1 does it different, and insists
-Index: gdb-6.7/gdb/i386-tdep.h
+Index: gdb-6.8.50.20081128/gdb/i386-tdep.h
 ===================================================================
---- gdb-6.7.orig/gdb/i386-tdep.h	2007-08-23 20:08:34.000000000 +0200
-+++ gdb-6.7/gdb/i386-tdep.h	2007-10-16 15:57:32.000000000 +0200
+--- gdb-6.8.50.20081128.orig/gdb/i386-tdep.h	2008-12-08 10:56:17.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/i386-tdep.h	2008-12-08 21:07:47.000000000 +0100
 @@ -106,6 +106,9 @@ struct gdbarch_tdep
    /* ISA-specific data types.  */
    struct type *i386_mmx_type;
    struct type *i386_sse_type;
 +
 +  /* Detect OS dependent outermost frames; such as `clone'.  */
-+  int (*outermost_frame_p) (struct frame_info *next_frame);
++  int (*outermost_frame_p) (struct frame_info *this_frame);
  };
  
  /* Floating-point registers.  */
-Index: gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.c	2007-10-16 15:57:03.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.c	2008-12-08 11:00:43.000000000 +0100
 @@ -0,0 +1,39 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -207,10 +210,10 @@
 +	for (;;)
 +		pause();
 +}
-Index: gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.exp
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.exp	2007-10-16 15:57:03.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.exp	2008-12-08 11:00:43.000000000 +0100
 @@ -0,0 +1,61 @@
 +# Copyright 2006 Free Software Foundation, Inc.
 +

gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch:

Index: gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch	21 Jan 2007 01:53:01 -0000	1.2
+++ gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch	14 Dec 2008 14:05:16 -0000	1.3
@@ -1,19 +1,19 @@
 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
 
 
-Index: gdb-6.6/gdb/minsyms.c
+Index: gdb-6.8.50.20081128/gdb/minsyms.c
 ===================================================================
---- gdb-6.6.orig/gdb/minsyms.c	2007-01-20 13:53:48.000000000 +0100
-+++ gdb-6.6/gdb/minsyms.c	2007-01-20 13:58:47.000000000 +0100
-@@ -490,6 +490,11 @@ lookup_minimal_symbol_by_pc_section (COR
+--- gdb-6.8.50.20081128.orig/gdb/minsyms.c	2008-10-01 18:56:52.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/minsyms.c	2008-12-02 23:24:27.000000000 +0100
+@@ -544,6 +544,11 @@ lookup_minimal_symbol_by_pc_section_1 (C
  			 don't fill the bfd_section member, so don't
  			 throw away symbols on those platforms.  */
- 		      && SYMBOL_BFD_SECTION (&msymbol[hi]) != NULL
+ 		      && SYMBOL_OBJ_SECTION (&msymbol[hi]) != NULL
 +		      /* Don't ignore symbols for solib trampolines.
-+		         Limit its sideeffects - only for non-0 sized trampolines.
-+		         Red Hat Bug 200533 with its regression Bug 218379.  */
++			 Limit its sideeffects - only for non-0 sized trampolines.
++			 Red Hat Bug 200533 with its regression Bug 218379.  */
 +		      && (MSYMBOL_TYPE (&msymbol[hi]) != mst_solib_trampoline
 +		          || MSYMBOL_SIZE (&msymbol[hi]))
- 		      && (!matching_bfd_sections
- 			  (SYMBOL_BFD_SECTION (&msymbol[hi]), section)))
+ 		      && (!matching_obj_sections
+ 			  (SYMBOL_OBJ_SECTION (&msymbol[hi]), section)))
  		    {

gdb-6.5-gcore-i386-on-amd64.patch:

Index: gdb-6.5-gcore-i386-on-amd64.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.5-gcore-i386-on-amd64.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- gdb-6.5-gcore-i386-on-amd64.patch	3 Mar 2008 16:13:47 -0000	1.4
+++ gdb-6.5-gcore-i386-on-amd64.patch	14 Dec 2008 14:05:16 -0000	1.5
@@ -23,40 +23,10 @@
 
 	Port to GDB-6.8pre.
 
-Index: gdb-6.8cvs20080219/gdb/Makefile.in
+Index: gdb-6.8.50.20081128/gdb/amd64-linux-nat.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/Makefile.in	2008-02-19 16:52:21.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/Makefile.in	2008-02-20 13:39:08.000000000 +0100
-@@ -785,6 +785,7 @@ gdb_expat_h = gdb_expat.h
- gdb_locale_h = gdb_locale.h
- gdb_obstack_h = gdb_obstack.h $(obstack_h)
- gdb_proc_service_h = gdb_proc_service.h $(gregset_h)
-+gdb_procfs32_h = gdb_procfs32.h $(gdb_user32_h)
- gdb_ptrace_h = gdb_ptrace.h
- gdb_regex_h = gdb_regex.h $(xregex_h)
- gdb_select_h = gdb_select.h
-@@ -794,6 +795,7 @@ gdb_string_h = gdb_string.h
- gdb_thread_db_h = gdb_thread_db.h
- gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h)
- gdbtypes_h = gdbtypes.h $(hashtab_h)
-+gdb_user32_h = gdb_user32.h $(gdb_stdint_h)
- gdb_vfork_h = gdb_vfork.h
- gdb_wait_h = gdb_wait.h
- glibc_tdep_h = glibc-tdep.h
-@@ -1888,7 +1890,8 @@ amd64fbsd-tdep.o: amd64fbsd-tdep.c $(def
- amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- 	$(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \
- 	$(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \
--	$(i386_linux_tdep_h) $(amd64_nat_h) $(amd64_linux_tdep_h)
-+	$(i386_linux_tdep_h) $(amd64_nat_h) $(amd64_linux_tdep_h) \
-+	$(i387_tdep_h) $(elf_bfd_h) $(gdb_procfs32_h)
- amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- 	$(regcache_h) $(osabi_h) $(symtab_h) $(gdb_string_h) $(amd64_tdep_h) \
- 	$(solib_svr4_h) $(gdbtypes_h) $(reggroups_h) $(amd64_linux_tdep_h)
-Index: gdb-6.8cvs20080219/gdb/amd64-linux-nat.c
-===================================================================
---- gdb-6.8cvs20080219.orig/gdb/amd64-linux-nat.c	2008-02-16 19:10:27.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/amd64-linux-nat.c	2008-02-20 13:39:08.000000000 +0100
+--- gdb-6.8.50.20081128.orig/gdb/amd64-linux-nat.c	2008-03-01 05:39:36.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/amd64-linux-nat.c	2008-12-02 23:06:16.000000000 +0100
 @@ -50,6 +50,9 @@
  #include "amd64-tdep.h"
  #include "i386-linux-tdep.h"
@@ -200,7 +170,7 @@
  /* Transfering the general-purpose registers between GDB, inferiors
     and core files.  */
  
-@@ -429,6 +551,11 @@ _initialize_amd64_linux_nat (void)
+@@ -431,6 +553,11 @@ _initialize_amd64_linux_nat (void)
    t->to_fetch_registers = amd64_linux_fetch_inferior_registers;
    t->to_store_registers = amd64_linux_store_inferior_registers;
  
@@ -212,11 +182,11 @@
    /* Register the target.  */
    linux_nat_add_target (t);
    linux_nat_set_new_thread (t, amd64_linux_new_thread);
-Index: gdb-6.8cvs20080219/gdb/config.in
+Index: gdb-6.8.50.20081128/gdb/config.in
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/config.in	2008-01-10 19:17:06.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/config.in	2008-02-20 13:39:08.000000000 +0100
-@@ -385,6 +385,9 @@
+--- gdb-6.8.50.20081128.orig/gdb/config.in	2008-08-06 21:41:31.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/config.in	2008-12-02 23:06:16.000000000 +0100
+@@ -456,6 +456,9 @@
  /* Define to 1 if you have the <sys/poll.h> header file. */
  #undef HAVE_SYS_POLL_H
  
@@ -226,7 +196,7 @@
  /* Define to 1 if you have the <sys/procfs.h> header file. */
  #undef HAVE_SYS_PROCFS_H
  
-@@ -412,6 +415,9 @@
+@@ -483,6 +486,9 @@
  /* Define to 1 if you have the <sys/types.h> header file. */
  #undef HAVE_SYS_TYPES_H
  
@@ -236,14 +206,16 @@
  /* Define to 1 if you have the <sys/user.h> header file. */
  #undef HAVE_SYS_USER_H
  
-Index: gdb-6.8cvs20080219/gdb/configure
+Index: gdb-6.8.50.20081128/gdb/configure
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/configure	2008-02-14 23:03:56.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/configure	2008-02-20 13:39:08.000000000 +0100
-@@ -11140,6 +11140,157 @@ done
- 
+--- gdb-6.8.50.20081128.orig/gdb/configure	2008-11-21 23:35:57.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/configure	2008-12-02 23:08:29.000000000 +0100
+@@ -12026,6 +12026,157 @@ _ACEOF
  
+ fi
  
++
++
 +for ac_header in sys/user32.h sys/procfs32.h
 +do
 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -393,28 +365,26 @@
 +
 +done
 +
-+
-+
- for ac_header in sys/wait.h wait.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-Index: gdb-6.8cvs20080219/gdb/configure.ac
+ # elf_hp.h is for HP/UX 64-bit shared library support.
+ # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
+ # unconditionally, so what's the point in checking these?
+Index: gdb-6.8.50.20081128/gdb/configure.ac
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/configure.ac	2008-02-14 23:03:56.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/configure.ac	2008-02-20 13:39:08.000000000 +0100
-@@ -523,6 +523,7 @@ AC_CHECK_HEADERS(sys/user.h, [], [],
- # include <sys/param.h>
- #endif
- ])
-+AC_CHECK_HEADERS(sys/user32.h sys/procfs32.h)
- AC_CHECK_HEADERS(sys/wait.h wait.h)
- AC_CHECK_HEADERS(termios.h termio.h sgtty.h)
- AC_CHECK_HEADERS(unistd.h)
-Index: gdb-6.8cvs20080219/gdb/gcore.c
+--- gdb-6.8.50.20081128.orig/gdb/configure.ac	2008-11-21 23:35:58.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/configure.ac	2008-12-02 23:07:33.000000000 +0100
+@@ -686,6 +686,7 @@ AC_SUBST(PYTHON_CFLAGS)
+ AC_HEADER_DIRENT
+ AC_HEADER_STAT
+ AC_HEADER_STDC
++AC_CHECK_HEADERS([sys/user32.h sys/procfs32.h])
+ # elf_hp.h is for HP/UX 64-bit shared library support.
+ # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
+ # unconditionally, so what's the point in checking these?
+Index: gdb-6.8.50.20081128/gdb/gcore.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/gcore.c	2008-02-19 16:52:21.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/gcore.c	2008-02-20 13:39:08.000000000 +0100
-@@ -317,6 +317,11 @@ gcore_create_callback (CORE_ADDR vaddr, 
+--- gdb-6.8.50.20081128.orig/gdb/gcore.c	2008-12-01 16:39:04.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/gcore.c	2008-12-02 23:06:16.000000000 +0100
+@@ -320,6 +320,11 @@ gcore_create_callback (CORE_ADDR vaddr, 
    asection *osec;
    flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD;
  
@@ -426,10 +396,10 @@
    /* If the memory segment has no permissions set, ignore it, otherwise
       when we later try to access it for read/write, we'll get an error
       or jam the kernel.  */
-Index: gdb-6.8cvs20080219/gdb/gdb_procfs32.h
+Index: gdb-6.8.50.20081128/gdb/gdb_procfs32.h
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.8cvs20080219/gdb/gdb_procfs32.h	2008-02-20 13:39:08.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/gdb_procfs32.h	2008-12-02 23:06:16.000000000 +0100
 @@ -0,0 +1,128 @@
 +#ifdef HAVE_SYS_PROCFS32_H
 +#include <sys/procfs32.h>
@@ -559,10 +529,10 @@
 +#endif	/* _SYS_PROCFS32_H */
 +
 +#endif /* HAVE_SYS_PROCFS32_H */
-Index: gdb-6.8cvs20080219/gdb/gdb_user32.h
+Index: gdb-6.8.50.20081128/gdb/gdb_user32.h
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.8cvs20080219/gdb/gdb_user32.h	2008-02-20 13:39:08.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/gdb_user32.h	2008-12-02 23:06:16.000000000 +0100
 @@ -0,0 +1,108 @@
 +#ifdef HAVE_SYS_USER32_H
 +#include <sys/user32.h>
@@ -672,11 +642,11 @@
 +#endif	/* _SYS_USER32_H */
 +
 +#endif /* HAVE_SYS_USER32_H */
-Index: gdb-6.8cvs20080219/gdb/linux-nat.c
+Index: gdb-6.8.50.20081128/gdb/linux-nat.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/linux-nat.c	2008-02-19 17:27:21.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/linux-nat.c	2008-02-20 13:39:08.000000000 +0100
-@@ -104,6 +104,21 @@ static LONGEST (*super_xfer_partial) (st
+--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c	2008-12-02 22:15:53.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/linux-nat.c	2008-12-02 23:13:18.000000000 +0100
+@@ -209,6 +209,21 @@ static LONGEST (*super_xfer_partial) (st
  				      const gdb_byte *,
  				      ULONGEST, LONGEST);
  
@@ -698,40 +668,29 @@
  static int debug_linux_nat;
  static void
  show_debug_linux_nat (struct ui_file *file, int from_tty,
-@@ -2716,11 +2731,11 @@ linux_nat_do_thread_registers (bfd *obfd
+@@ -3470,7 +3485,7 @@ linux_nat_do_thread_registers (bfd *obfd
    else
      fill_gregset (regcache, &gregs, -1);
  
 -  note_data = (char *) elfcore_write_prstatus (obfd,
--					       note_data,
--					       note_size,
--					       lwp,
--					       stop_signal, &gregs);
 +  note_data = (char *) linux_elfcore_write_prstatus (obfd,
-+						     note_data,
-+						     note_size,
-+						     lwp,
-+						     stop_signal, &gregs);
- 
-   if (core_regset_p
-       && (regset = gdbarch_regset_from_core_section (gdbarch, ".reg2",
-@@ -2731,10 +2746,11 @@ linux_nat_do_thread_registers (bfd *obfd
-   else
-     fill_fpregset (regcache, &fpregs, -1);
+ 					       note_data,
+ 					       note_size,
+ 					       lwp,
+@@ -3520,10 +3535,10 @@ linux_nat_do_thread_registers (bfd *obfd
+       else
+ 	fill_fpregset (regcache, &fpregs, -1);
+ 
+-      note_data = (char *) elfcore_write_prfpreg (obfd,
++      note_data = (char *) linux_elfcore_write_prfpreg (obfd,
+ 						  note_data,
+ 						  note_size,
+-						  &fpregs, sizeof (fpregs));
++						  &fpregs, sizeof (fpregs), regcache);
+     }
  
--  note_data = (char *) elfcore_write_prfpreg (obfd,
--					      note_data,
--					      note_size,
--					      &fpregs, sizeof (fpregs));
-+  note_data = (char *) linux_elfcore_write_prfpreg (obfd,
-+						    note_data,
-+						    note_size,
-+						    &fpregs, sizeof (fpregs),
-+						    regcache);
- 
- #ifdef FILL_FPXREGSET
-   if (core_regset_p
-@@ -2828,9 +2844,9 @@ linux_nat_make_corefile_notes (bfd *obfd
+   return note_data;
+@@ -3592,9 +3607,9 @@ linux_nat_make_corefile_notes (bfd *obfd
  		       psargs_end - string_end);
  	    }
  	}
@@ -744,11 +703,11 @@
      }
  
    /* Dump information for threads.  */
-Index: gdb-6.8cvs20080219/gdb/linux-nat.h
+Index: gdb-6.8.50.20081128/gdb/linux-nat.h
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/linux-nat.h	2008-02-19 14:26:32.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/linux-nat.h	2008-02-20 13:39:37.000000000 +0100
-@@ -124,3 +124,12 @@ void linux_nat_switch_fork (ptid_t new_p
+--- gdb-6.8.50.20081128.orig/gdb/linux-nat.h	2008-12-01 15:58:23.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/linux-nat.h	2008-12-02 23:06:16.000000000 +0100
+@@ -134,3 +134,12 @@ void linux_nat_switch_fork (ptid_t new_p
  
  /* Return the saved siginfo associated with PTID.  */
  struct siginfo *linux_nat_get_siginfo (ptid_t ptid);

gdb-6.5-sharedlibrary-path.patch:

Index: gdb-6.5-sharedlibrary-path.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.5-sharedlibrary-path.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.5-sharedlibrary-path.patch	3 Mar 2008 16:13:47 -0000	1.3
+++ gdb-6.5-sharedlibrary-path.patch	14 Dec 2008 14:05:16 -0000	1.4
@@ -3,6 +3,9 @@
 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'.
 
@@ -20,57 +23,6 @@
 
 	Port to gdb-6.7.50.20080227.
 
-Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
-===================================================================
---- gdb-6.7.50.20080227.orig/gdb/solib-svr4.c	2008-02-27 08:59:06.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/solib-svr4.c	2008-02-27 09:00:44.000000000 +0100
-@@ -1017,10 +1017,14 @@ CORE_ADDR
- svr4_fetch_objfile_link_map (struct objfile *objfile)
- {
-   CORE_ADDR lm;
-+  int resolve;
- 
-   if (locate_base () == 0)
-     return 0;   /* failed somehow... */
- 
-+for (resolve = 0; resolve <= 1; resolve++)
-+{
-+
-   /* Position ourselves on the first link map.  */
-   lm = solib_svr4_r_map ();  
-   while (lm)
-@@ -1059,6 +1063,21 @@ svr4_fetch_objfile_link_map (struct objf
- 		 safe_strerror (errcode));
-       else
-   	{
-+	  /* solib_svr4_r_map() may contain relative pathnames while
-+	     `objfile->name' is absolute.  */
-+	  if (resolve && buffer && buffer[0] != '/')
-+	    {
-+	      char *absolute;
-+	      int fd;
-+
-+	      fd = solib_open (buffer, &absolute);
-+	      if (fd != -1)
-+		{
-+		  make_cleanup (xfree, absolute);
-+		  buffer = absolute;
-+		  close (fd);
-+		}
-+	    }
- 	  /* Is this the linkmap for the file we want?  */
- 	  /* If the file is not a shared library and has no name,
- 	     we are sure it is the main executable, so we return that.  */
-@@ -1077,6 +1096,9 @@ svr4_fetch_objfile_link_map (struct objf
- 				  builtin_type_void_data_ptr);
-       do_cleanups (old_chain);
-     }
-+
-+}	/* resolve */
-+
-   return 0;
- }
- 
 Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000

gdb-6.6-buildid-locate.patch:

Index: gdb-6.6-buildid-locate.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-buildid-locate.patch,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- gdb-6.6-buildid-locate.patch	3 Nov 2008 03:34:39 -0000	1.15
+++ gdb-6.6-buildid-locate.patch	14 Dec 2008 14:05:16 -0000	1.16
@@ -47,9 +47,11 @@
 	Fix found by Denys Vlasenko <dvlasenk at redhat.com>.
 	Fixes Red Hat Bug 459414.
 
---- ./gdb/Makefile.in	2008-08-21 00:29:46.000000000 +0200
-+++ ./gdb/Makefile.in	2008-08-21 00:28:43.000000000 +0200
-@@ -340,7 +340,7 @@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
+Index: gdb-6.8.50.20081128/gdb/Makefile.in
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/Makefile.in	2008-12-04 10:33:25.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/Makefile.in	2008-12-04 10:34:31.000000000 +0100
+@@ -363,7 +363,7 @@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
  # your system doesn't have fcntl.h in /usr/include (which is where it
  # should be according to Posix).
  DEFS = @DEFS@
@@ -58,55 +60,19 @@
  
  # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
  GLOBAL_CFLAGS = $(MH_CFLAGS)
-@@ -392,7 +392,7 @@ INSTALLED_LIBS=-lbfd -lreadline -lopcode
+@@ -415,7 +415,7 @@ INSTALLED_LIBS=-lbfd -lreadline -lopcode
  CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
- 	$(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
+ 	$(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
  	$(LIBICONV) $(LIBEXPAT) \
--	$(LIBIBERTY) $(WIN32LIBS)
-+	$(LIBIBERTY) $(WIN32LIBS) -lrpm
- CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
- 	$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS)
- 
-@@ -2029,7 +2029,8 @@ corelow.o: corelow.c $(defs_h) $(arch_ut
- 	$(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \
- 	$(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \
- 	$(exec_h) $(readline_h) $(gdb_assert_h) \
--	$(exceptions_h) $(solib_h) $(filenames_h)
-+	$(exceptions_h) $(solib_h) $(filenames_h) $(auxv_h) $(elf_common_h) \
-+	$(objfiles_h) $(gdbcmd_h)
- core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \
- 	$(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(gregset_h)
- cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \
-@@ -2117,7 +2118,7 @@ event-loop.o: event-loop.c $(defs_h) $(e
- event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \
- 	$(terminal_h) $(event_loop_h) $(event_top_h) $(interps_h) \
- 	$(exceptions_h) $(cli_script_h) $(gdbcmd_h) $(readline_h) \
--	$(readline_history_h)
-+	$(readline_history_h) $(symfile_h)
- exceptions.o: exceptions.c $(defs_h) $(exceptions_h) $(breakpoint_h) \
- 	$(target_h) $(inferior_h) $(annotate_h) $(ui_out_h) $(gdb_assert_h) \
- 	$(gdb_string_h) $(serial_h)
-@@ -2884,7 +2885,8 @@ symfile.o: symfile.c $(defs_h) $(bfdlink
- 	$(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \
- 	$(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \
- 	$(gdb_string_h) $(gdb_stat_h) $(observer_h) $(exec_h) \
--	$(parser_defs_h) $(varobj_h) $(elf_bfd_h) $(solib_h)
-+	$(parser_defs_h) $(varobj_h) $(elf_bfd_h) $(solib_h) $(gdb_stdint_h) \
-+	$(libbfd_h) $(elf_bfd_h) $(elf_external_h)
- symfile-mem.o: symfile-mem.c $(defs_h) $(symtab_h) $(gdbcore_h) \
- 	$(objfiles_h) $(exceptions_h) $(gdbcmd_h) $(target_h) $(value_h) \
- 	$(symfile_h) $(observer_h) $(auxv_h) $(elf_common_h)
-@@ -3325,7 +3327,7 @@ tui-hooks.o: $(srcdir)/tui/tui-hooks.c $
- tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \
- 	$(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \
- 	$(tui_data_h) $(readline_h) $(tui_win_h) $(tui_h) $(tui_io_h) \
--	$(exceptions_h)
-+	$(exceptions_h) $(symfile_h)
- 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c
- tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(target_h) \
- 	$(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(tui_h) \
---- ./gdb/corelow.c	2008-02-09 14:45:33.000000000 +0100
-+++ ./gdb/corelow.c	2008-08-21 00:28:43.000000000 +0200
+-	$(LIBIBERTY) $(WIN32LIBS) $(LIBGNU)
++	$(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) -lrpm
+ CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
+ 	$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
+ 
+Index: gdb-6.8.50.20081128/gdb/corelow.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/corelow.c	2008-11-09 12:27:17.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/corelow.c	2008-12-04 10:34:31.000000000 +0100
 @@ -45,6 +45,10 @@
  #include "exceptions.h"
  #include "solib.h"
@@ -118,8 +84,8 @@
  
  
  #ifndef O_LARGEFILE
-@@ -248,6 +252,56 @@ add_to_thread_list (bfd *abfd, asection 
-     inferior_ptid = pid_to_ptid (thread_id);	/* Yes, make it current */
+@@ -262,6 +266,56 @@ add_to_thread_list (bfd *abfd, asection 
+     inferior_ptid = ptid;			 /* Yes, make it current */
  }
  
 +static int build_id_core_loads = 1;
@@ -175,23 +141,20 @@
  /* This routine opens and sets up the core file bfd.  */
  
  static void
-@@ -344,6 +398,15 @@ core_open (char *filename, int from_tty)
-   ontop = !push_target (&core_ops);
+@@ -358,6 +412,12 @@ core_open (char *filename, int from_tty)
+   push_target (&core_ops);
    discard_cleanups (old_chain);
  
-+  if (ontop)
-+    {
-+      /* Find the build_id identifiers.  If it gets executed after
-+         POST_CREATE_INFERIOR we would clash with asking to discard the already
-+         loaded VDSO symbols.  */
-+      if (build_id_core_loads != 0)
-+        build_id_locate_exec (from_tty);
-+    }
++  /* Find the build_id identifiers.  If it gets executed after
++     POST_CREATE_INFERIOR we would clash with asking to discard the already
++     loaded VDSO symbols.  */
++  if (build_id_core_loads != 0)
++    build_id_locate_exec (from_tty);
 +
-   /* This is done first, before anything has a chance to query the
-      inferior for information such as symbols.  */
-   post_create_inferior (&core_ops, from_tty);
-@@ -692,4 +755,11 @@ _initialize_corelow (void)
+   add_inferior_silent (corelow_pid);
+ 
+   /* Do this before acknowledging the inferior, so if
+@@ -737,4 +797,11 @@ _initialize_corelow (void)
  
    if (!coreops_suppress_target)
      add_target (&core_ops);
@@ -203,9 +166,11 @@
 +			   NULL, NULL, NULL,
 +			   &setlist, &showlist);
  }
---- ./gdb/doc/gdb.texinfo	2008-08-21 00:29:46.000000000 +0200
-+++ ./gdb/doc/gdb.texinfo	2008-08-21 00:28:43.000000000 +0200
-@@ -12195,6 +12195,27 @@ information files.
+Index: gdb-6.8.50.20081128/gdb/doc/gdb.texinfo
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/doc/gdb.texinfo	2008-12-04 10:34:04.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/doc/gdb.texinfo	2008-12-04 10:34:31.000000000 +0100
+@@ -13138,6 +13138,27 @@ information files.
  
  @end table
  
@@ -233,17 +198,19 @@
  @cindex @code{.gnu_debuglink} sections
  @cindex debug link sections
  A debug link is a special section of the executable file named
---- ./gdb/event-top.c	2008-01-01 23:53:09.000000000 +0100
-+++ ./gdb/event-top.c	2008-08-21 00:28:43.000000000 +0200
-@@ -31,6 +31,7 @@
- #include <signal.h>
- #include "exceptions.h"
+Index: gdb-6.8.50.20081128/gdb/event-top.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/event-top.c	2008-09-08 23:46:21.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/event-top.c	2008-12-04 10:34:31.000000000 +0100
+@@ -33,6 +33,7 @@
  #include "cli/cli-script.h"     /* for reset_command_nest_depth */
+ #include "main.h"
+ #include "gdbthread.h"
 +#include "symfile.h"
  
  /* For dont_repeat() */
  #include "gdbcmd.h"
-@@ -192,6 +193,8 @@ cli_command_loop (void)
+@@ -193,6 +194,8 @@ cli_command_loop (void)
        char *a_prompt;
        char *gdb_prompt = get_prompt ();
  
@@ -252,7 +219,7 @@
        /* Tell readline what the prompt to display is and what function it
           will need to call after a whole line is read. This also displays
           the first prompt. */
-@@ -263,6 +266,8 @@ display_gdb_prompt (char *new_prompt)
+@@ -264,6 +267,8 @@ display_gdb_prompt (char *new_prompt)
    /* Reset the nesting depth used when trace-commands is set.  */
    reset_command_nest_depth ();
  
@@ -261,9 +228,11 @@
    /* Each interpreter has its own rules on displaying the command
       prompt.  */
    if (!current_interp_display_prompt_p ())
---- ./gdb/solib-svr4.c	2008-08-21 00:29:46.000000000 +0200
-+++ ./gdb/solib-svr4.c	2008-08-21 00:28:43.000000000 +0200
-@@ -764,9 +764,33 @@ svr4_current_sos (void)
+Index: gdb-6.8.50.20081128/gdb/solib-svr4.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/solib-svr4.c	2008-12-04 01:34:17.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/solib-svr4.c	2008-12-04 10:34:31.000000000 +0100
+@@ -999,9 +999,33 @@ svr4_current_sos (void)
  		     safe_strerror (errcode));
  	  else
  	    {
@@ -300,19 +269,20 @@
  	    }
  	  xfree (buffer);
  
---- ./gdb/symfile.c	2008-08-21 00:29:46.000000000 +0200
-+++ ./gdb/symfile.c	2008-08-21 00:29:18.000000000 +0200
-@@ -53,6 +53,9 @@
- #include "varobj.h"
+Index: gdb-6.8.50.20081128/gdb/symfile.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/symfile.c	2008-12-04 10:26:12.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/symfile.c	2008-12-04 10:36:18.000000000 +0100
+@@ -54,6 +54,8 @@
  #include "elf-bfd.h"
  #include "solib.h"
-+#include "gdb_stdint.h"
+ #include "remote.h"
 +#include "libbfd.h"
 +#include "elf/external.h"
  
  #include <sys/types.h>
  #include <fcntl.h>
-@@ -61,6 +64,7 @@
+@@ -62,6 +64,7 @@
  #include <ctype.h>
  #include <time.h>
  #include <sys/time.h>
@@ -320,7 +290,7 @@
  
  
  int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num);
-@@ -1226,16 +1230,65 @@ symbol_file_clear (int from_tty)
+@@ -1168,16 +1171,65 @@ symbol_file_clear (int from_tty)
        printf_unfiltered (_("No symbol file now.\n"));
  }
  
@@ -388,7 +358,7 @@
  {
    struct build_id *retval;
  
-@@ -1251,6 +1304,348 @@ build_id_bfd_get (bfd *abfd)
+@@ -1193,6 +1245,348 @@ build_id_bfd_get (bfd *abfd)
    return retval;
  }
  
@@ -737,7 +707,7 @@
  /* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value.  */
  
  static int
-@@ -1265,7 +1660,7 @@ build_id_verify (const char *filename, s
+@@ -1210,7 +1604,7 @@ build_id_verify (const char *filename, s
    if (abfd == NULL)
      return 0;
  
@@ -746,7 +716,7 @@
  
    if (found == NULL)
      warning (_("File \"%s\" has no build-id, file skipped"), filename);
-@@ -1281,8 +1676,9 @@ build_id_verify (const char *filename, s
+@@ -1229,8 +1623,9 @@ build_id_verify (const char *filename, s
    return retval;
  }
  
@@ -758,7 +728,7 @@
  {
    char *link, *s, *retval = NULL;
    gdb_byte *data = build_id->data;
-@@ -1290,7 +1686,9 @@ build_id_to_debug_filename (struct build
+@@ -1238,7 +1633,9 @@ build_id_to_debug_filename (struct build
  
    /* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
    link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
@@ -769,7 +739,7 @@
    s = link + sprintf (link, "%s/.build-id/", debug_file_directory);
    if (size > 0)
      {
-@@ -1301,12 +1699,14 @@ build_id_to_debug_filename (struct build
+@@ -1249,12 +1646,14 @@ build_id_to_debug_filename (struct build
      *s++ = '/';
    while (size-- > 0)
      s += sprintf (s, "%02x", (unsigned) *data++);
@@ -786,7 +756,7 @@
  
    if (retval != NULL && !build_id_verify (retval, build_id))
      {
-@@ -1314,9 +1714,424 @@ build_id_to_debug_filename (struct build
+@@ -1262,9 +1661,424 @@ build_id_to_debug_filename (struct build
        retval = NULL;
      }
  
@@ -795,9 +765,9 @@
 +  else
 +    xfree (link);
 +
-   return retval;
- }
- 
++  return retval;
++}
++
 +#include <rpm/rpmlib.h>
 +#include <rpm/rpmts.h>
 +#include <rpm/rpmdb.h>
@@ -1083,9 +1053,9 @@
 +
 +  retval = obstack_alloc (&missing_filepair_obstack, size);
 +  memset (retval, 0, size);
-+  return retval;
-+}
-+
+   return retval;
+ }
+ 
 +static hashval_t
 +missing_filepair_hash_func (const struct missing_filepair *elem)
 +{
@@ -1120,7 +1090,7 @@
 +}
 +
 +static void
-+debug_print_executable_changed (void *unused)
++debug_print_executable_changed (void)
 +{
 +  missing_rpm_change ();
 +  missing_filepair_change ();
@@ -1211,7 +1181,7 @@
  static char *
  get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
  {
-@@ -1402,32 +2231,36 @@ static char *
+@@ -1347,32 +2161,36 @@ static char *
  find_separate_debug_file (struct objfile *objfile)
  {
    asection *sect;
@@ -1237,9 +1207,8 @@
        char *build_id_name;
  
 -      build_id_name = build_id_to_debug_filename (build_id);
--      free (build_id);
 +      build_id_name = build_id_to_filename (build_id, &build_id_filename, 1);
-+      xfree (build_id);
+       xfree (build_id);
        /* Prevent looping on a stripped .debug file.  */
        if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0)
          {
@@ -1257,7 +1226,7 @@
      }
  
    basename = get_debug_link_info (objfile, &crc32);
-@@ -1435,7 +2268,7 @@ find_separate_debug_file (struct objfile
+@@ -1380,7 +2198,7 @@ find_separate_debug_file (struct objfile
    if (basename == NULL)
      /* There's no separate debug info, hence there's no way we could
         load it => no warning.  */
@@ -1266,7 +1235,7 @@
  
    dir = xstrdup (objfile->name);
  
-@@ -1451,23 +2284,19 @@ find_separate_debug_file (struct objfile
+@@ -1396,23 +2214,19 @@ find_separate_debug_file (struct objfile
    gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i]));
    dir[i+1] = '\0';
  
@@ -1297,7 +1266,7 @@
  
    /* Then try in the subdirectory named DEBUG_SUBDIRECTORY.  */
    strcpy (debugfile, dir);
-@@ -1476,11 +2305,7 @@ find_separate_debug_file (struct objfile
+@@ -1421,11 +2235,7 @@ find_separate_debug_file (struct objfile
    strcat (debugfile, basename);
  
    if (separate_debug_file_exists (debugfile, crc32, objfile->name))
@@ -1310,7 +1279,7 @@
  
    /* Then try in the global debugfile directory.  */
    strcpy (debugfile, debug_file_directory);
-@@ -1489,11 +2314,7 @@ find_separate_debug_file (struct objfile
+@@ -1434,11 +2244,7 @@ find_separate_debug_file (struct objfile
    strcat (debugfile, basename);
  
    if (separate_debug_file_exists (debugfile, crc32, objfile->name))
@@ -1323,7 +1292,7 @@
  
    /* If the file is in the sysroot, try using its base path in the
       global debugfile directory.  */
-@@ -1508,20 +2329,18 @@ find_separate_debug_file (struct objfile
+@@ -1453,20 +2259,18 @@ find_separate_debug_file (struct objfile
        strcat (debugfile, basename);
  
        if (separate_debug_file_exists (debugfile, crc32, objfile->name))
@@ -1352,10 +1321,10 @@
  }
  
  
-@@ -4208,4 +5027,16 @@ the global debug-file directory prepende
- 				     NULL,
- 				     show_debug_file_directory,
- 				     &setlist, &showlist);
+@@ -4196,4 +5000,16 @@ Show printing of symbol loading messages
+                            NULL,
+                            NULL,
+                            &setprintlist, &showprintlist);
 +
 +  add_setshow_zinteger_cmd ("build-id-verbose", no_class, &build_id_verbose,
 +			    _("\
@@ -1369,9 +1338,11 @@
 +
 +  observer_attach_executable_changed (debug_print_executable_changed);
  }
---- ./gdb/symfile.h	2008-02-03 23:13:29.000000000 +0100
-+++ ./gdb/symfile.h	2008-08-21 00:28:43.000000000 +0200
-@@ -358,6 +358,14 @@ extern int symfile_map_offsets_to_segmen
+Index: gdb-6.8.50.20081128/gdb/symfile.h
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/symfile.h	2008-09-05 13:37:17.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/symfile.h	2008-12-04 10:34:31.000000000 +0100
+@@ -365,6 +365,14 @@ extern int symfile_map_offsets_to_segmen
  struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
  void free_symfile_segment_data (struct symfile_segment_data *data);
  
@@ -1386,9 +1357,11 @@
  /* From dwarf2read.c */
  
  extern int dwarf2_has_info (struct objfile *);
---- ./gdb/testsuite/lib/gdb.exp	2008-08-21 00:29:46.000000000 +0200
-+++ ./gdb/testsuite/lib/gdb.exp	2008-08-21 00:28:43.000000000 +0200
-@@ -1199,6 +1199,16 @@ proc default_gdb_start { } {
+Index: gdb-6.8.50.20081128/gdb/testsuite/lib/gdb.exp
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/lib/gdb.exp	2008-12-04 01:33:56.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/testsuite/lib/gdb.exp	2008-12-04 10:34:31.000000000 +0100
+@@ -1227,6 +1227,16 @@ proc default_gdb_start { } {
  	    warning "Couldn't set the width to 0."
  	}
      }
@@ -1405,8 +1378,10 @@
      return 0;
  }
  
---- ./gdb/tui/tui-interp.c	2008-01-01 23:53:22.000000000 +0100
-+++ ./gdb/tui/tui-interp.c	2008-08-21 00:28:43.000000000 +0200
+Index: gdb-6.8.50.20081128/gdb/tui/tui-interp.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/tui/tui-interp.c	2008-03-14 20:55:51.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/tui/tui-interp.c	2008-12-04 10:34:31.000000000 +0100
 @@ -30,6 +30,7 @@
  #include "tui/tui.h"
  #include "tui/tui-io.h"

gdb-6.6-buildid-readnever-silent.patch:

Index: gdb-6.6-buildid-readnever-silent.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-buildid-readnever-silent.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.6-buildid-readnever-silent.patch	24 Jan 2008 16:45:56 -0000	1.1
+++ gdb-6.6-buildid-readnever-silent.patch	14 Dec 2008 14:05:16 -0000	1.2
@@ -3,10 +3,11 @@
 	Suppress messages `(no debugging symbols found)' on the commandline
 	option -readnever.
 
-diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.6-orig/gdb/symfile.c gdb-6.6/gdb/symfile.c
---- gdb-6.6-orig/gdb/symfile.c	2008-01-12 22:10:40.000000000 +0100
-+++ gdb-6.6/gdb/symfile.c	2008-01-22 02:15:46.000000000 +0100
-@@ -996,8 +996,10 @@ symbol_file_add_with_addrs_or_offsets (b
+Index: gdb-6.8.50.20081128/gdb/symfile.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/symfile.c	2008-12-02 23:39:09.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/symfile.c	2008-12-02 23:52:23.000000000 +0100
+@@ -1028,8 +1028,10 @@ symbol_file_add_with_addrs_or_offsets (b
  
    /* If the file has its own symbol tables it has no separate debug info.
       `.dynsym'/`.symtab' go to MSYMBOLS, `.debug_info' goes to SYMTABS/PSYMTABS.
@@ -19,17 +20,16 @@
      debugfile = find_separate_debug_file (objfile);
    if (debugfile)
      {
-@@ -1021,7 +1023,8 @@ symbol_file_add_with_addrs_or_offsets (b
-       xfree (debugfile);
+@@ -1054,7 +1056,7 @@ symbol_file_add_with_addrs_or_offsets (b
      }
  
--  if (!have_partial_symbols () && !have_full_symbols ())
-+  if (!readnever_symbol_files && !have_partial_symbols ()
-+      && !have_full_symbols ())
+   if (!have_partial_symbols () && !have_full_symbols ()
+-      && print_symbol_loading)
++      && print_symbol_loading && !readnever_symbol_files)
      {
        wrap_here ("");
-       printf_filtered (_("(no debugging symbols found)"));
-@@ -2770,7 +2959,8 @@ reread_symbols (void)
+       printf_unfiltered (_("(no debugging symbols found)"));
+@@ -3239,7 +3241,8 @@ reread_symbols (void)
  	         zero is OK since dbxread.c also does what it needs to do if
  	         objfile->global_psymbols.size is 0.  */
  	      (*objfile->sf->sym_read) (objfile, 0);

gdb-6.6-bz225783-gdb-debuginfo-paths.patch:

Index: gdb-6.6-bz225783-gdb-debuginfo-paths.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-bz225783-gdb-debuginfo-paths.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.6-bz225783-gdb-debuginfo-paths.patch	24 Apr 2007 15:57:25 -0000	1.1
+++ gdb-6.6-bz225783-gdb-debuginfo-paths.patch	14 Dec 2008 14:05:16 -0000	1.2
@@ -1,12 +1,14 @@
 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225783
 
 
---- gdb-6.6-orig/gdb/Makefile.in	2007-04-08 20:49:10.000000000 +0200
-+++ gdb-6.6/gdb/Makefile.in	2007-04-08 23:22:40.000000000 +0200
-@@ -1672,17 +1672,19 @@ po/$(PACKAGE).pot: force
+Index: gdb-6.8.50.20081128/gdb/Makefile.in
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/Makefile.in	2008-12-02 23:06:16.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/Makefile.in	2008-12-02 23:28:02.000000000 +0100
+@@ -1490,8 +1490,10 @@ po/$(PACKAGE).pot: force
  
  .SUFFIXES: .y .l
- .y.c: 
+ .y.c:
 -	$(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- $(YACC) $(YFLAGS)
 -	-sed -e '/extern.*malloc/d' \
 +	rm -f $@ $@.tmp
@@ -16,8 +18,9 @@
  	     -e '/extern.*realloc/d' \
  	     -e '/extern.*free/d' \
  	     -e '/include.*malloc.h/d' \
- 	     -e 's/\([^x]\)malloc/\1xmalloc/g' \
- 	     -e 's/\([^x]\)realloc/\1xrealloc/g' \
+@@ -1500,9 +1502,9 @@ po/$(PACKAGE).pot: force
+ 	     -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
+ 	     -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
  	     -e '/^#line.*y.tab.c/d' \
 -	  < $@.tmp > $@.new
 -	-rm $@.tmp

gdb-6.6-bz237572-ppc-atomic-sequence-test.patch:

Index: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-bz237572-ppc-atomic-sequence-test.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.6-bz237572-ppc-atomic-sequence-test.patch	26 Jun 2007 04:37:05 -0000	1.2
+++ gdb-6.6-bz237572-ppc-atomic-sequence-test.patch	14 Dec 2008 14:05:16 -0000	1.3
@@ -3,8 +3,10 @@
 	* gdb.threads/atomic-seq-threaded.c,
 	gdb.threads/atomic-seq-threaded.exp: New files.
 
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ ./gdb/testsuite/gdb.threads/atomic-seq-threaded.c	25 Jun 2007 20:38:21 -0000
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c	2008-12-08 22:27:01.000000000 +0100
 @@ -0,0 +1,171 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -177,8 +179,10 @@
 +
 +  return 0;						/* _exit_ */
 +}
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ ./gdb/testsuite/gdb.threads/atomic-seq-threaded.exp	25 Jun 2007 20:38:21 -0000
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp	2008-12-08 22:31:01.000000000 +0100
 @@ -0,0 +1,84 @@
 +# atomic-seq-threaded.exp -- Test case for stepping over RISC atomic code seqs.
 +# This variant testcases the code for stepping another thread while skipping
@@ -230,7 +234,7 @@
 +# Pass after pthread_create () without any watchpoint active.
 +set line [gdb_get_line_number "_create_after_"]
 +gdb_test "tbreak $line" \
-+	 "Breakpoint (\[0-9\]+) at .*$srcfile, line $line\..*" \
++	 "reakpoint (\[0-9\]+) at .*$srcfile, line $line\..*" \
 +	 "set breakpoint after pthread_create ()"
 +gdb_test "c" \
 +	 ".*/\\* _create_after_ \\*/.*" \
@@ -254,7 +258,7 @@
 +# Critical code path is stepped through at this point.
 +set line [gdb_get_line_number "_exit_"]
 +gdb_test "tbreak $line" \
-+	 "Breakpoint \[0-9\]+ at .*$srcfile, line $line\..*" \
++	 "reakpoint \[0-9\]+ at .*$srcfile, line $line\..*" \
 +	 "set breakpoint at _exit_"
 +gdb_test "c" \
 +	 ".*/\\* _exit_ \\*/.*" \

gdb-6.6-bz247354-leader-exit-fix.patch:

Index: gdb-6.6-bz247354-leader-exit-fix.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-bz247354-leader-exit-fix.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.6-bz247354-leader-exit-fix.patch	3 Mar 2008 16:13:47 -0000	1.2
+++ gdb-6.6-bz247354-leader-exit-fix.patch	14 Dec 2008 14:05:16 -0000	1.3
@@ -10,11 +10,11 @@
 
 	Port to GDB-6.8pre.
 
-Index: gdb-6.8cvs20080219/gdb/linux-nat.c
+Index: gdb-6.8.50.20081209/gdb/linux-nat.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/linux-nat.c	2008-02-21 12:03:38.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/linux-nat.c	2008-02-21 12:05:01.000000000 +0100
-@@ -1570,6 +1570,31 @@ linux_handle_extended_wait (struct lwp_i
+--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c	2008-12-10 01:27:34.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/linux-nat.c	2008-12-10 01:28:14.000000000 +0100
+@@ -1981,6 +1981,31 @@ linux_handle_extended_wait (struct lwp_i
  		  _("unknown ptrace event %d"), event);
  }
  
@@ -46,7 +46,7 @@
  /* Wait for LP to stop.  Returns the wait status, or 0 if the LWP has
     exited.  */
  
-@@ -1577,16 +1602,31 @@ static int
+@@ -1988,16 +2013,31 @@ static int
  wait_lwp (struct lwp_info *lp)
  {
    pid_t pid;
@@ -82,23 +82,19 @@
        if (pid == -1 && errno == ECHILD)
  	{
  	  /* The thread has previously exited.  We need to delete it
-@@ -3451,10 +3491,12 @@ linux_proc_pending_signals (int pid, sig
-   fclose (procfile);
+@@ -4153,8 +4193,10 @@ linux_nat_xfer_osdata (struct target_ops
+   return len;
  }
  
 +/* Transfer from the specific LWP currently set by PID of INFERIOR_PTID.  */
 +
  static LONGEST
 -linux_xfer_partial (struct target_ops *ops, enum target_object object,
--                    const char *annex, gdb_byte *readbuf,
--		    const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 +linux_xfer_partial_lwp (struct target_ops *ops, enum target_object object,
-+			const char *annex, gdb_byte *readbuf,
-+			const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                     const char *annex, gdb_byte *readbuf,
+ 		    const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
  {
-   LONGEST xfer;
- 
-@@ -3495,6 +3537,45 @@ linux_xfer_partial (struct target_ops *o
+@@ -4201,6 +4243,45 @@ linux_xfer_partial (struct target_ops *o
  			     offset, len);
  }
  

gdb-6.6-multifork-debugreg.patch:

Index: gdb-6.6-multifork-debugreg.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-multifork-debugreg.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gdb-6.6-multifork-debugreg.patch	28 Aug 2008 18:48:34 -0000	1.7
+++ gdb-6.6-multifork-debugreg.patch	14 Dec 2008 14:05:16 -0000	1.8
@@ -28,10 +28,10 @@
 	* s390-nat.c (s390_fix_watch_points): Fix its compilation failure
 	- rename it to S390_FIX_WATCH_POINTS_LIST.
 
-Index: gdb-6.7.50.20080227/gdb/amd64-linux-nat.c
+Index: gdb-6.8.50.20081128/gdb/amd64-linux-nat.c
 ===================================================================
---- gdb-6.7.50.20080227.orig/gdb/amd64-linux-nat.c	2008-03-01 10:38:02.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/amd64-linux-nat.c	2008-03-01 16:33:40.000000000 +0100
+--- gdb-6.8.50.20081128.orig/gdb/amd64-linux-nat.c	2008-12-07 10:09:19.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/amd64-linux-nat.c	2008-12-07 10:10:20.000000000 +0100
 @@ -408,25 +408,43 @@ amd64_linux_dr_set (ptid_t ptid, int reg
  void
  amd64_linux_dr_set_control (unsigned long control)
@@ -128,7 +128,7 @@
  
  
  /* This function is called by libthread_db as part of its handling of
-@@ -520,6 +573,41 @@ amd64_linux_child_post_startup_inferior 
+@@ -520,6 +573,43 @@ amd64_linux_child_post_startup_inferior 
    i386_cleanup_dregs ();
    super_post_startup_inferior (ptid);
  }
@@ -152,7 +152,9 @@
 +  parent_pid = ptid_get_lwp (last_ptid);
 +  if (parent_pid == 0)
 +    parent_pid = ptid_get_pid (last_ptid);
-+  child_pid = last_status.value.related_pid;
++  child_pid = ptid_get_lwp (last_status.value.related_pid);
++  if (child_pid == 0)
++    child_pid = ptid_get_pid (last_status.value.related_pid);
 +
 +  if (! follow_child)
 +    {
@@ -170,7 +172,7 @@
  
  
  /* Provide a prototype to silence -Wmissing-prototypes.  */
-@@ -556,6 +644,9 @@ _initialize_amd64_linux_nat (void)
+@@ -558,6 +648,9 @@ _initialize_amd64_linux_nat (void)
    linux_elfcore_write_prstatus = amd64_linux_elfcore_write_prstatus;
    linux_elfcore_write_prfpreg = amd64_linux_elfcore_write_prfpreg;
  
@@ -180,24 +182,24 @@
    /* Register the target.  */
    linux_nat_add_target (t);
    linux_nat_set_new_thread (t, amd64_linux_new_thread);
-Index: gdb-6.7.50.20080227/gdb/config/i386/nm-i386.h
+Index: gdb-6.8.50.20081128/gdb/config/i386/nm-i386.h
 ===================================================================
---- gdb-6.7.50.20080227.orig/gdb/config/i386/nm-i386.h	2008-03-01 10:38:02.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/config/i386/nm-i386.h	2008-03-01 10:50:39.000000000 +0100
-@@ -110,6 +110,8 @@ extern int i386_stopped_by_watchpoint (v
- #define target_remove_hw_breakpoint(bp_tgt) \
-   i386_remove_hw_breakpoint (bp_tgt)
+--- gdb-6.8.50.20081128.orig/gdb/config/i386/nm-i386.h	2008-03-01 05:39:36.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/config/i386/nm-i386.h	2008-12-07 10:09:20.000000000 +0100
+@@ -120,6 +120,8 @@ extern int i386_stopped_by_watchpoint (v
+ 
+ #endif /* I386_WATCHPOINTS_IN_TARGET_VECTOR */
  
 +extern void i386_detach_breakpoints (int detached_pid);
 +
  #endif /* I386_USE_GENERIC_WATCHPOINTS */
  
  #endif /* NM_I386_H */
-Index: gdb-6.7.50.20080227/gdb/i386-linux-nat.c
+Index: gdb-6.8.50.20081128/gdb/i386-linux-nat.c
 ===================================================================
---- gdb-6.7.50.20080227.orig/gdb/i386-linux-nat.c	2008-03-01 10:38:02.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/i386-linux-nat.c	2008-03-01 16:33:40.000000000 +0100
-@@ -655,21 +655,42 @@ i386_linux_dr_set_control (unsigned long
+--- gdb-6.8.50.20081128.orig/gdb/i386-linux-nat.c	2008-03-13 13:22:13.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/i386-linux-nat.c	2008-12-07 10:09:20.000000000 +0100
+@@ -634,21 +634,42 @@ i386_linux_dr_set_control (unsigned long
    ptid_t ptid;
  
    i386_linux_dr[DR_CONTROL] = control;
@@ -247,7 +249,7 @@
  }
  
  void
-@@ -694,6 +715,41 @@ i386_linux_new_thread (ptid_t ptid)
+@@ -673,6 +694,41 @@ i386_linux_new_thread (ptid_t ptid)
  
    i386_linux_dr_set (ptid, DR_CONTROL, i386_linux_dr[DR_CONTROL]);
  }
@@ -289,7 +291,7 @@
  
  
  /* Called by libthread_db.  Returns a pointer to the thread local
-@@ -833,6 +889,40 @@ i386_linux_child_post_startup_inferior (
+@@ -812,6 +868,40 @@ i386_linux_child_post_startup_inferior (
    super_post_startup_inferior (ptid);
  }
  
@@ -312,7 +314,7 @@
 +  parent_pid = ptid_get_lwp (last_ptid);
 +  if (parent_pid == 0)
 +    parent_pid = ptid_get_pid (last_ptid);
-+  child_pid = last_status.value.related_pid;
++  child_pid = ptid_get_pid (last_status.value.related_pid);
 +
 +  if (! follow_child)
 +    {
@@ -330,7 +332,7 @@
  void
  _initialize_i386_linux_nat (void)
  {
-@@ -852,6 +942,9 @@ _initialize_i386_linux_nat (void)
+@@ -833,6 +923,9 @@ _initialize_i386_linux_nat (void)
    t->to_fetch_registers = i386_linux_fetch_inferior_registers;
    t->to_store_registers = i386_linux_store_inferior_registers;
  
@@ -340,11 +342,11 @@
    /* Register the target.  */
    linux_nat_add_target (t);
    linux_nat_set_new_thread (t, i386_linux_new_thread);
-Index: gdb-6.7.50.20080227/gdb/i386-nat.c
+Index: gdb-6.8.50.20081128/gdb/i386-nat.c
 ===================================================================
---- gdb-6.7.50.20080227.orig/gdb/i386-nat.c	2008-03-01 10:38:02.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/i386-nat.c	2008-03-01 10:50:39.000000000 +0100
-@@ -544,6 +544,17 @@ i386_remove_watchpoint (CORE_ADDR addr, 
+--- gdb-6.8.50.20081128.orig/gdb/i386-nat.c	2008-03-01 05:39:36.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/i386-nat.c	2008-12-07 10:09:20.000000000 +0100
+@@ -545,6 +545,17 @@ i386_remove_watchpoint (CORE_ADDR addr, 
    return retval;
  }
  
@@ -362,10 +364,10 @@
  /* Return non-zero if we can watch a memory region that starts at
     address ADDR and whose length is LEN bytes.  */
  
-Index: gdb-6.7.50.20080227/gdb/ia64-linux-nat.c
+Index: gdb-6.8.50.20081128/gdb/ia64-linux-nat.c
 ===================================================================
---- gdb-6.7.50.20080227.orig/gdb/ia64-linux-nat.c	2008-03-01 10:38:02.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/ia64-linux-nat.c	2008-03-01 10:50:39.000000000 +0100
+--- gdb-6.8.50.20081128.orig/gdb/ia64-linux-nat.c	2008-12-07 10:06:03.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/ia64-linux-nat.c	2008-12-07 10:09:20.000000000 +0100
 @@ -583,6 +583,12 @@ ia64_linux_insert_watchpoint (CORE_ADDR 
    return 0;
  }
@@ -437,7 +439,7 @@
 +  parent_pid = ptid_get_lwp (last_ptid);
 +  if (parent_pid == 0)
 +    parent_pid = ptid_get_pid (last_ptid);
-+  child_pid = last_status.value.related_pid;
++  child_pid = ptid_get_pid (last_status.value.related_pid);
 +
 +  if (! follow_child)
 +    {
@@ -465,11 +467,11 @@
    /* Register the target.  */
    linux_nat_add_target (t);
    linux_nat_set_new_thread (t, ia64_linux_new_thread);
-Index: gdb-6.7.50.20080227/gdb/ppc-linux-nat.c
+Index: gdb-6.8.50.20081128/gdb/ppc-linux-nat.c
 ===================================================================
---- gdb-6.7.50.20080227.orig/gdb/ppc-linux-nat.c	2008-03-01 10:38:02.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/ppc-linux-nat.c	2008-03-01 10:50:39.000000000 +0100
-@@ -847,6 +847,12 @@ ppc_linux_insert_watchpoint (CORE_ADDR a
+--- gdb-6.8.50.20081128.orig/gdb/ppc-linux-nat.c	2008-11-18 22:39:47.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/ppc-linux-nat.c	2008-12-07 10:09:20.000000000 +0100
+@@ -1118,6 +1118,12 @@ ppc_linux_insert_watchpoint (CORE_ADDR a
    return 0;
  }
  
@@ -482,7 +484,7 @@
  static int
  ppc_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw)
  {
-@@ -854,6 +860,11 @@ ppc_linux_remove_watchpoint (CORE_ADDR a
+@@ -1125,6 +1131,11 @@ ppc_linux_remove_watchpoint (CORE_ADDR a
    ptid_t ptid;
    long dabr_value = 0;
  
@@ -494,7 +496,7 @@
    saved_dabr_value = 0;
    ALL_LWPS (lp, ptid)
      if (ptrace (PTRACE_SET_DEBUGREG, TIDGET (ptid), 0, saved_dabr_value) < 0)
-@@ -867,6 +878,15 @@ ppc_linux_new_thread (ptid_t ptid)
+@@ -1138,6 +1149,15 @@ ppc_linux_new_thread (ptid_t ptid)
    ptrace (PTRACE_SET_DEBUGREG, TIDGET (ptid), 0, saved_dabr_value);
  }
  
@@ -510,8 +512,8 @@
  static int
  ppc_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
  {
-@@ -976,6 +996,40 @@ ppc_linux_read_description (struct targe
-   return NULL;
+@@ -1318,6 +1338,40 @@ ppc_linux_read_description (struct targe
+   return isa205? tdesc_powerpc_isa205_32l : tdesc_powerpc_32l;
  }
  
 +static int (*ppc_linux_super_follow_fork) (struct target_ops *ops,
@@ -533,7 +535,7 @@
 +  parent_pid = ptid_get_lwp (last_ptid);
 +  if (parent_pid == 0)
 +    parent_pid = ptid_get_pid (last_ptid);
-+  child_pid = last_status.value.related_pid;
++  child_pid = ptid_get_pid (last_status.value.related_pid);
 +
 +  if (! follow_child)
 +    {
@@ -551,7 +553,7 @@
  void _initialize_ppc_linux_nat (void);
  
  void
-@@ -1000,6 +1054,9 @@ _initialize_ppc_linux_nat (void)
+@@ -1343,6 +1397,9 @@ _initialize_ppc_linux_nat (void)
  
    t->to_read_description = ppc_linux_read_description;
  
@@ -561,10 +563,10 @@
    /* Register the target.  */
    linux_nat_add_target (t);
    linux_nat_set_new_thread (t, ppc_linux_new_thread);
-Index: gdb-6.7.50.20080227/gdb/s390-nat.c
+Index: gdb-6.8.50.20081128/gdb/s390-nat.c
 ===================================================================
---- gdb-6.7.50.20080227.orig/gdb/s390-nat.c	2008-03-01 10:38:02.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/s390-nat.c	2008-03-01 10:50:39.000000000 +0100
+--- gdb-6.8.50.20081128.orig/gdb/s390-nat.c	2007-11-07 07:36:57.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/s390-nat.c	2008-12-07 10:09:20.000000000 +0100
 @@ -283,21 +283,15 @@ s390_stopped_by_watchpoint (void)
  }
  
@@ -642,7 +644,7 @@
    for (parea = &watch_base; *parea; parea = &(*parea)->next)
      if ((*parea)->lo_addr == addr
  	&& (*parea)->hi_addr == addr + len - 1)
-@@ -378,8 +378,10 @@ s390_remove_watchpoint (CORE_ADDR addr, 
+@@ -361,8 +378,10 @@ s390_remove_watchpoint (CORE_ADDR addr, 
  
    if (!*parea)
      {
@@ -653,7 +655,7 @@
        return -1;
      }
  
-@@ -375,6 +392,15 @@ s390_remove_watchpoint (CORE_ADDR addr, 
+@@ -375,6 +394,15 @@ s390_remove_watchpoint (CORE_ADDR addr, 
    return 0;
  }
  
@@ -669,7 +671,7 @@
  static int
  s390_can_use_hw_breakpoint (int type, int cnt, int othertype)
  {
-@@ -387,6 +413,39 @@ s390_region_ok_for_hw_watchpoint (CORE_A
+@@ -387,6 +415,39 @@ s390_region_ok_for_hw_watchpoint (CORE_A
    return 1;
  }
  
@@ -691,7 +693,7 @@
 +  parent_pid = ptid_get_lwp (last_ptid);
 +  if (parent_pid == 0)
 +    parent_pid = ptid_get_pid (last_ptid);
-+  child_pid = last_status.value.related_pid;
++  child_pid = ptid_get_pid (last_status.value.related_pid);
 +
 +  if (! follow_child)
 +    {
@@ -709,7 +711,7 @@
  
  void _initialize_s390_nat (void);
  
-@@ -410,6 +469,9 @@ _initialize_s390_nat (void)
+@@ -410,6 +471,9 @@ _initialize_s390_nat (void)
    t->to_insert_watchpoint = s390_insert_watchpoint;
    t->to_remove_watchpoint = s390_remove_watchpoint;
  
@@ -719,8 +721,10 @@
    /* Register the target.  */
    linux_nat_add_target (t);
    linux_nat_set_new_thread (t, s390_fix_watch_points);
---- /dev/null	2008-03-30 17:41:11.547000906 -0400
-+++ gdb-6.8-patched/gdb/testsuite/gdb.threads/watchpoint-fork-forkoff.c	2008-03-30 18:09:25.000000000 -0400
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork-forkoff.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork-forkoff.c	2008-12-07 10:09:20.000000000 +0100
 @@ -0,0 +1,172 @@
 +/* Test case for forgotten hw-watchpoints after fork()-off of a process.
 +
@@ -894,10 +898,10 @@
 +#else
 +# error "!FOLLOW_PARENT && !FOLLOW_CHILD"
 +#endif
-Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c	2008-03-01 10:50:39.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c	2008-12-07 10:09:20.000000000 +0100
 @@ -0,0 +1,154 @@
 +/* Test case for forgotten hw-watchpoints after fork()-off of a process.
 +
@@ -1053,10 +1057,10 @@
 +
 +  return 0;
 +}
-Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork.c	2008-03-01 10:50:39.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork.c	2008-12-07 10:09:20.000000000 +0100
 @@ -0,0 +1,56 @@
 +/* Test case for forgotten hw-watchpoints after fork()-off of a process.
 +
@@ -1114,10 +1118,10 @@
 +
 +  return 0;
 +}
-Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork.exp
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/watchpoint-fork.exp	2008-03-01 10:50:39.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/watchpoint-fork.exp	2008-12-07 10:09:20.000000000 +0100
 @@ -0,0 +1,140 @@
 +# Copyright 2008 Free Software Foundation, Inc.
 +
@@ -1259,11 +1263,11 @@
 +if {[istarget "*-*-linux*"]} {
 +    test child FOLLOW_CHILD
 +}
-Index: gdb-6.7.50.20080227/gdb/doc/gdb.texinfo
+Index: gdb-6.8.50.20081128/gdb/doc/gdb.texinfo
 ===================================================================
---- gdb-6.7.50.20080227.orig/gdb/doc/gdb.texinfo	2008-03-01 10:50:39.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/doc/gdb.texinfo	2008-03-01 10:50:39.000000000 +0100
-@@ -3386,6 +3386,14 @@ confident that no other thread can becom
+--- gdb-6.8.50.20081128.orig/gdb/doc/gdb.texinfo	2008-12-07 10:09:20.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/doc/gdb.texinfo	2008-12-07 10:10:20.000000000 +0100
+@@ -3587,6 +3587,14 @@ confident that no other thread can becom
  software watchpoints as usual.  However, @value{GDBN} may not notice
  when a non-current thread's activity changes the expression.  (Hardware
  watchpoints, in contrast, watch an expression in all threads.)
@@ -1278,11 +1282,11 @@
  @end quotation
  
  @xref{set remote hardware-watchpoint-limit}.
-Index: gdb-6.7.50.20080227/gdb/config/i386/nm-linux.h
+Index: gdb-6.8.50.20081128/gdb/config/i386/nm-linux.h
 ===================================================================
---- gdb-6.7.50.20080227.orig/gdb/config/i386/nm-linux.h	2008-03-01 10:38:02.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/config/i386/nm-linux.h	2008-03-01 10:50:39.000000000 +0100
-@@ -44,6 +44,17 @@ extern void i386_linux_dr_reset_addr (in
+--- gdb-6.8.50.20081128.orig/gdb/config/i386/nm-linux.h	2008-03-01 05:39:36.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/config/i386/nm-linux.h	2008-12-07 10:09:20.000000000 +0100
+@@ -45,6 +45,16 @@ extern void i386_linux_dr_reset_addr (in
  extern unsigned long i386_linux_dr_get_status (void);
  #define I386_DR_LOW_GET_STATUS() \
    i386_linux_dr_get_status ()
@@ -1294,17 +1298,16 @@
 +
 +/* Override basic i386 macros for watchpoint and hardware breakpoint
 +   insertion/removal to support threads.  */
-+#undef target_remove_watchpoint
 +#define target_remove_watchpoint(addr, len, type) \
 +  i386_linux_remove_watchpoint (addr, len, type)
  
  
  #ifdef HAVE_PTRACE_GETFPXREGS
-Index: gdb-6.7.50.20080227/gdb/config/i386/nm-linux64.h
+Index: gdb-6.8.50.20081128/gdb/config/i386/nm-linux64.h
 ===================================================================
---- gdb-6.7.50.20080227.orig/gdb/config/i386/nm-linux64.h	2008-03-01 10:38:02.000000000 +0100
-+++ gdb-6.7.50.20080227/gdb/config/i386/nm-linux64.h	2008-03-01 10:50:39.000000000 +0100
-@@ -50,4 +50,15 @@ extern unsigned long amd64_linux_dr_get_
+--- gdb-6.8.50.20081128.orig/gdb/config/i386/nm-linux64.h	2008-03-01 05:39:36.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/config/i386/nm-linux64.h	2008-12-07 10:09:20.000000000 +0100
+@@ -51,4 +51,14 @@ extern unsigned long amd64_linux_dr_get_
  #define I386_DR_LOW_GET_STATUS() \
    amd64_linux_dr_get_status ()
  
@@ -1315,8 +1318,21 @@
 +
 +/* Override basic amd64 macros for watchpoint and hardware breakpoint
 +   insertion/removal to support threads.  */
-+#undef target_remove_watchpoint
 +#define target_remove_watchpoint(addr, len, type) \
 +  amd64_linux_remove_watchpoint (addr, len, type)
 +
  #endif /* nm-linux64.h */
+Index: gdb-6.8.50.20081128/gdb/target.h
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/target.h	2008-12-07 10:09:19.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/target.h	2008-12-07 10:10:38.000000000 +0100
+@@ -1123,7 +1123,9 @@ extern char *normal_pid_to_str (ptid_t p
+ #ifndef target_insert_watchpoint
+ #define	target_insert_watchpoint(addr, len, type)	\
+      (*current_target.to_insert_watchpoint) (addr, len, type)
++#endif
+ 
++#ifndef target_remove_watchpoint
+ #define	target_remove_watchpoint(addr, len, type)	\
+      (*current_target.to_remove_watchpoint) (addr, len, type)
+ #endif

gdb-6.6-scheduler_locking-step-is-default.patch:

Index: gdb-6.6-scheduler_locking-step-is-default.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-scheduler_locking-step-is-default.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.6-scheduler_locking-step-is-default.patch	26 Jun 2007 04:37:05 -0000	1.1
+++ gdb-6.6-scheduler_locking-step-is-default.patch	14 Dec 2008 14:05:16 -0000	1.2
@@ -1,6 +1,8 @@
---- ./gdb/infrun.c	22 Jun 2007 12:47:48 -0000	1.243
-+++ ./gdb/infrun.c	25 Jun 2007 20:43:18 -0000
-@@ -466,7 +467,7 @@ static const char *scheduler_enums[] = {
+Index: gdb-6.8.50.20081128/gdb/infrun.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/infrun.c	2008-12-09 15:56:16.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/infrun.c	2008-12-09 15:56:59.000000000 +0100
+@@ -931,7 +931,7 @@ static const char *scheduler_enums[] = {
    schedlock_step,
    NULL
  };
@@ -9,3 +11,31 @@
  static void
  show_scheduler_mode (struct ui_file *file, int from_tty,
  		     struct cmd_list_element *c, const char *value)
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi-console.exp
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.mi/mi-console.exp	2008-08-06 14:52:08.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi-console.exp	2008-12-09 15:59:34.000000000 +0100
+@@ -47,6 +47,9 @@ if  { [gdb_compile "${srcdir}/${subdir}/
+ 
+ mi_run_to_main
+ 
++# thread-id=\"all\" vs. thread-id=\"1\" below:
++mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
++
+ # Next over the hello() call which will produce lots of output
+ mi_gdb_test "220-exec-next" \
+ 	    "220\\^running(\r\n\\*running,thread-id=\"all\")?" \
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi2-console.exp
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.mi/mi2-console.exp	2008-08-06 14:52:08.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi2-console.exp	2008-12-09 16:00:33.000000000 +0100
+@@ -47,6 +47,9 @@ if  { [gdb_compile "${srcdir}/${subdir}/
+ 
+ mi_run_to_main
+ 
++# thread-id=\"all\" vs. thread-id=\"1\" below:
++mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
++
+ # Next over the hello() call which will produce lots of output
+ send_gdb "220-exec-next\n"
+ gdb_expect {

gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch:

Index: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch	3 Mar 2008 16:13:47 -0000	1.4
+++ gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch	14 Dec 2008 14:05:16 -0000	1.5
@@ -21,11 +21,11 @@
 
 	Port to GDB-6.8pre.
 
-Index: gdb-6.8cvs20080219/gdb/inferior.h
+Index: gdb-6.8.50.20081209/gdb/inferior.h
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/inferior.h	2008-02-14 23:03:57.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/inferior.h	2008-02-19 14:15:01.000000000 +0100
-@@ -179,7 +179,15 @@ extern void reopen_exec_file (void);
+--- gdb-6.8.50.20081209.orig/gdb/inferior.h	2008-11-20 01:35:23.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/inferior.h	2008-12-10 01:22:23.000000000 +0100
+@@ -168,7 +168,15 @@ extern void reopen_exec_file (void);
  /* The `resume' routine should only be called in special circumstances.
     Normally, use `proceed', which handles a lot of bookkeeping.  */
  
@@ -42,21 +42,20 @@
  
  /* From misc files */
  
-Index: gdb-6.8cvs20080219/gdb/infrun.c
+Index: gdb-6.8.50.20081209/gdb/infrun.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/infrun.c	2008-02-14 23:03:57.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/infrun.c	2008-02-19 14:24:37.000000000 +0100
-@@ -74,7 +74,8 @@ static void set_schedlock_func (char *ar
+--- gdb-6.8.50.20081209.orig/gdb/infrun.c	2008-12-02 20:20:23.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/infrun.c	2008-12-10 01:23:46.000000000 +0100
+@@ -73,7 +73,7 @@ static int follow_fork (void);
+ static void set_schedlock_func (char *args, int from_tty,
+ 				struct cmd_list_element *c);
  
- struct execution_control_state;
+-static int currently_stepping (struct thread_info *tp);
++static enum resume_step currently_stepping (struct thread_info *tp);
  
--static int currently_stepping (struct execution_control_state *ecs);
-+static enum resume_step currently_stepping (struct execution_control_state
-+									  *ecs);
+ static int currently_stepping_callback (struct thread_info *tp, void *data);
  
- static void xdb_handle_command (char *args, int from_tty);
- 
-@@ -508,15 +509,18 @@ set_schedlock_func (char *args, int from
+@@ -961,7 +961,7 @@ set_schedlock_func (char *args, int from
     STEP nonzero if we should step (zero to continue instead).
     SIG is the signal to give the inferior (zero for none).  */
  void
@@ -65,50 +64,54 @@
  {
    int should_resume = 1;
    struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
+@@ -975,10 +975,12 @@ resume (int step, enum target_signal sig
    QUIT;
  
    if (debug_infrun)
--    fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%d, signal=%d)\n",
--			step, sig);
-+    fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%s, signal=%d)\n",
+-    fprintf_unfiltered (gdb_stdlog,
+-                        "infrun: resume (step=%d, signal=%d), "
+-			"trap_expected=%d\n",
+- 			step, sig, tp->trap_expected);
++    fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%s, signal=%d), "
++				    "trap_expected=%d\n",
 +			(step == RESUME_STEP_CONTINUE ? "RESUME_STEP_CONTINUE"
 +			: (step == RESUME_STEP_USER ? "RESUME_STEP_USER"
 +			                            : "RESUME_STEP_NEEDED")),
-+			sig);
- 
-   /* FIXME: calling breakpoint_here_p (read_pc ()) three times! */
++			sig, tp->trap_expected);
  
-@@ -632,9 +636,10 @@ a command like `return' or `jump' to con
+   /* Some targets (e.g. Solaris x86) have a kernel bug when stepping
+      over an instruction that causes a page fault without triggering
+@@ -1127,9 +1129,10 @@ a command like `return' or `jump' to con
+ 	     individually.  */
  	  resume_ptid = inferior_ptid;
  	}
- 
--      if ((scheduler_mode == schedlock_on)
-+      if (scheduler_mode == schedlock_on
- 	  || (scheduler_mode == schedlock_step
--	      && (step || singlestep_breakpoints_inserted_p)))
-+	      && (step == RESUME_STEP_USER
-+		  || singlestep_breakpoints_inserted_p)))
+-      else if ((scheduler_mode == schedlock_on)
++      else if (scheduler_mode == schedlock_on
+ 	       || (scheduler_mode == schedlock_step
+-		   && (step || singlestep_breakpoints_inserted_p)))
++		   && (step == RESUME_STEP_USER
++		       || singlestep_breakpoints_inserted_p)))
  	{
  	  /* User-settable 'scheduler' mode requires solo thread resume. */
  	  resume_ptid = inferior_ptid;
-@@ -742,7 +747,7 @@ static CORE_ADDR prev_pc;
- void
- proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
- {
+@@ -1302,7 +1305,7 @@ proceed (CORE_ADDR addr, enum target_sig
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   struct thread_info *tp;
+   CORE_ADDR pc = regcache_read_pc (regcache);
 -  int oneproc = 0;
 +  enum resume_step resume_step = RESUME_STEP_CONTINUE;
  
    if (step > 0)
-     step_start_function = find_pc_function (read_pc ());
-@@ -756,13 +761,13 @@ proceed (CORE_ADDR addr, enum target_sig
- 	   step one instruction before inserting breakpoints so that
- 	   we do not stop right away (and report a second hit at this
- 	   breakpoint).  */
+     step_start_function = find_pc_function (pc);
+@@ -1322,13 +1325,13 @@ proceed (CORE_ADDR addr, enum target_sig
+ 	   actually be executing the breakpoint insn anyway.
+ 	   We'll be (un-)executing the previous instruction.  */
+ 
 -	oneproc = 1;
 +	resume_step = RESUME_STEP_USER;
-       else if (gdbarch_single_step_through_delay_p (current_gdbarch)
-               && gdbarch_single_step_through_delay (current_gdbarch,
-                                                     get_current_frame ()))
+       else if (gdbarch_single_step_through_delay_p (gdbarch)
+ 	       && gdbarch_single_step_through_delay (gdbarch,
+ 						     get_current_frame ()))
  	/* We stepped onto an instruction that needs to be stepped
  	   again before re-inserting the breakpoint, do so.  */
 -	oneproc = 1;
@@ -116,21 +119,25 @@
      }
    else
      {
-@@ -786,9 +791,9 @@ proceed (CORE_ADDR addr, enum target_sig
-      that reported the most recent event.  If a step-over is required
-      it returns TRUE and sets the current thread to the old thread. */
-   if (prepare_to_proceed (step))
--    oneproc = 1;
-+    resume_step = RESUME_STEP_USER;
+@@ -1359,13 +1362,13 @@ proceed (CORE_ADDR addr, enum target_sig
+ 	 is required it returns TRUE and sets the current thread to
+ 	 the old thread. */
+       if (prepare_to_proceed (step))
+-	oneproc = 1;
++	resume_step = RESUME_STEP_USER;
+     }
+ 
+   /* prepare_to_proceed may change the current thread.  */
+   tp = inferior_thread ();
  
 -  if (oneproc)
 +  if (resume_step == RESUME_STEP_USER)
-     /* We will get a trace trap after one instruction.
-        Continue it automatically and insert breakpoints then.  */
-     stepping_over_breakpoint = 1;
-@@ -832,8 +837,13 @@ proceed (CORE_ADDR addr, enum target_sig
-      updated correctly when the inferior is stopped.  */
-   prev_pc = read_pc ();
+     {
+       tp->trap_expected = 1;
+       /* If displaced stepping is enabled, we can step over the
+@@ -1451,8 +1454,13 @@ proceed (CORE_ADDR addr, enum target_sig
+   /* Reset to normal state.  */
+   init_infwait_state ();
  
 +  if (step)
 +    resume_step = RESUME_STEP_USER;
@@ -138,30 +145,21 @@
 +    resume_step = RESUME_STEP_NEEDED;
 +
    /* Resume inferior.  */
--  resume (oneproc || step || bpstat_should_step (), stop_signal);
-+  resume (resume_step, stop_signal);
+-  resume (oneproc || step || bpstat_should_step (), tp->stop_signal);
++  resume (resume_step, tp->stop_signal);
  
    /* Wait for it to stop (if not standalone)
       and in any case decode why it stopped, and act accordingly.  */
-@@ -2723,14 +2733,21 @@ process_event_stop_test:
- 
- /* Are we in the middle of stepping?  */
+@@ -3690,10 +3698,16 @@ currently_stepping_callback (struct thre
+   return tp != data && currently_stepping_thread (tp);
+ }
  
 -static int
 +static enum resume_step
- currently_stepping (struct execution_control_state *ecs)
+ currently_stepping (struct thread_info *tp)
  {
--  return ((!ecs->handling_longjmp
--	   && ((step_range_end && step_resume_breakpoint == NULL)
--	       || stepping_over_breakpoint))
--	  || ecs->stepping_through_solib_after_catch
--	  || bpstat_should_step ());
-+  if (!ecs->handling_longjmp
-+      && ((step_range_end && step_resume_breakpoint == NULL)
-+	  || stepping_over_breakpoint))
-+    return RESUME_STEP_USER;
-+
-+  if (ecs->stepping_through_solib_after_catch)
+-  return currently_stepping_thread (tp) || bpstat_should_step ();
++  if (currently_stepping_thread (tp))
 +    return RESUME_STEP_USER;
 +
 +  if (bpstat_should_step ())
@@ -170,12 +168,12 @@
 +  return RESUME_STEP_CONTINUE;
  }
  
- /* Subroutine call with source code we should not step over.  Do step
-Index: gdb-6.8cvs20080219/gdb/linux-nat.c
+ /* Inferior has stepped into a subroutine call with source code that
+Index: gdb-6.8.50.20081209/gdb/linux-nat.c
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/linux-nat.c	2008-02-14 23:03:57.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/linux-nat.c	2008-02-19 14:15:01.000000000 +0100
-@@ -1751,7 +1751,10 @@ count_events_callback (struct lwp_info *
+--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c	2008-12-02 08:57:36.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/linux-nat.c	2008-12-10 01:22:23.000000000 +0100
+@@ -2343,7 +2343,10 @@ count_events_callback (struct lwp_info *
  static int
  select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
  {
@@ -187,10 +185,10 @@
      return 1;
    else
      return 0;
-Index: gdb-6.8cvs20080219/gdb/linux-nat.h
+Index: gdb-6.8.50.20081209/gdb/linux-nat.h
 ===================================================================
---- gdb-6.8cvs20080219.orig/gdb/linux-nat.h	2008-02-14 23:03:58.000000000 +0100
-+++ gdb-6.8cvs20080219/gdb/linux-nat.h	2008-02-19 14:15:01.000000000 +0100
+--- gdb-6.8.50.20081209.orig/gdb/linux-nat.h	2008-07-27 23:12:40.000000000 +0200
++++ gdb-6.8.50.20081209/gdb/linux-nat.h	2008-12-10 01:22:23.000000000 +0100
 @@ -55,8 +55,8 @@ struct lwp_info
    /* If non-zero, a pending wait status.  */
    int status;

gdb-6.6-step-thread-exit.patch:

Index: gdb-6.6-step-thread-exit.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-step-thread-exit.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.6-step-thread-exit.patch	27 Aug 2008 11:07:47 -0000	1.2
+++ gdb-6.6-step-thread-exit.patch	14 Dec 2008 14:05:16 -0000	1.3
@@ -1,7 +1,8 @@
-diff -up -rup gdb-6.8-clean/gdb/linux-nat.c gdb-6.8-new/gdb/linux-nat.c
---- gdb-6.8-clean/gdb/linux-nat.c	2008-08-26 00:04:08.000000000 +0200
-+++ gdb-6.8-new/gdb/linux-nat.c	2008-08-26 00:04:50.000000000 +0200
-@@ -1083,15 +1083,17 @@ resume_set_callback (struct lwp_info *lp
+Index: gdb-6.8.50.20081128/gdb/linux-nat.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c	2008-12-04 01:44:26.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/linux-nat.c	2008-12-04 10:21:32.000000000 +0100
+@@ -1661,15 +1661,17 @@ resume_set_callback (struct lwp_info *lp
  }
  
  static void
@@ -21,56 +22,40 @@
  			target_pid_to_str (ptid),
  			signo ? strsignal (signo) : "0",
  			target_pid_to_str (inferior_ptid));
-@@ -2076,6 +2078,9 @@ retry:
- 	  /* Check if the thread has exited.  */
- 	  if ((WIFEXITED (status) || WIFSIGNALED (status)) && num_lwps > 1)
- 	    {
-+	      enum resume_step step = lp->step;
-+	      pid_t pid = GET_PID (lp->ptid);
+@@ -2586,6 +2588,9 @@ linux_nat_filter_event (int lwpid, int s
+   /* Check if the thread has exited.  */
+   if ((WIFEXITED (status) || WIFSIGNALED (status)) && num_lwps > 1)
+     {
++      enum resume_step step = lp->step;
++      pid_t pid = GET_PID (lp->ptid);
 +
- 	      /* If this is the main thread, we must stop all threads and
- 	         verify if they are still alive.  This is because in the nptl
- 	         thread model, there is no signal issued for exiting LWPs
-@@ -2096,6 +2101,10 @@ retry:
- 		fprintf_unfiltered (gdb_stdlog,
- 				    "LLW: %s exited.\n",
- 				    target_pid_to_str (lp->ptid));
-+	      /* Backward compatibility with:
-+		 gdb-6.3-step-thread-exit-20050211.patch  */
-+	      if (step == RESUME_STEP_USER)
-+		printf_unfiltered ("[Stepped over thread exit]\n");
+       /* If this is the main thread, we must stop all threads and
+ 	 verify if they are still alive.  This is because in the nptl
+ 	 thread model, there is no signal issued for exiting LWPs
+@@ -2609,6 +2614,26 @@ linux_nat_filter_event (int lwpid, int s
  
- 	      exit_lwp (lp);
+       exit_lwp (lp);
  
-@@ -2104,8 +2113,29 @@ retry:
- 	         ignored.  */
- 	      if (num_lwps > 0)
- 		{
--		  /* Make sure there is at least one thread running.  */
--		  gdb_assert (iterate_over_lwps (running_callback, NULL));
-+		  if (step == RESUME_STEP_USER)
-+		    {
-+		      /* Now stop the closest LWP's ...  */
-+		      lp = find_lwp_pid (pid_to_ptid (pid));
-+		      if (!lp)
-+		        lp = lwp_list;
-+		      errno = 0;
-+		      ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
-+			      (void *) (unsigned long) SIGSTOP);
-+		      if (debug_linux_nat)
-+			fprintf_unfiltered (gdb_stdlog,
-+					    "PTRACE_CONT %s, 0, 0 (%s)\n",
-+					    target_pid_to_str (lp->ptid),
-+					    errno ? safe_strerror (errno)
-+						  : "OK");
-+		      /* Avoid the silent `delayed SIGSTOP' handling.  */
-+		      lp->signalled = 0;
-+		    }
-+		  else
-+		    {
-+		      /* Make sure there is at least one thread running.  */
-+		      gdb_assert (iterate_over_lwps (running_callback, NULL));
-+		    }
- 
- 		  /* Discard the event.  */
- 		  status = 0;
++      if (step == RESUME_STEP_USER)
++	{
++	  /* Now stop the closest LWP's ...  */
++	  lp = find_lwp_pid (pid_to_ptid (pid));
++	  if (!lp)
++	    lp = lwp_list;
++	  gdb_assert (lp != NULL);
++	  errno = 0;
++	  ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
++		  (void *) (unsigned long) SIGSTOP);
++	  if (debug_linux_nat)
++	    fprintf_unfiltered (gdb_stdlog,
++				"PTRACE_CONT %s, 0, 0 (%s)\n",
++				target_pid_to_str (lp->ptid),
++				errno ? safe_strerror (errno)
++				      : "OK");
++	  /* Avoid the silent `delayed SIGSTOP' handling.  */
++	  lp->signalled = 0;
++	}
++
+       /* If there is at least one more LWP, then the exit signal was
+ 	 not the end of the debugged application and should be
+ 	 ignored.  */

gdb-6.7-testsuite-stable-results.patch:

Index: gdb-6.7-testsuite-stable-results.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.7-testsuite-stable-results.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- gdb-6.7-testsuite-stable-results.patch	28 Aug 2008 18:48:34 -0000	1.4
+++ gdb-6.7-testsuite-stable-results.patch	14 Dec 2008 14:05:16 -0000	1.5
@@ -91,39 +91,6 @@
 
 
 
-2008-04-21  Jan Kratochvil  <jan.kratochvil at redhat.com>
-
-	* ada-lang.c (get_selections): Variable PROMPT made non-const and
-	initialized with a trailing space now.  Use PROMPT_ARG of
-	COMMAND_LINE_INPUT instead of printing it ourselves.
-
---- ./gdb/ada-lang.c	6 Apr 2008 08:56:36 -0000	1.137
-+++ ./gdb/ada-lang.c	21 Apr 2008 13:33:42 -0000
-@@ -3424,18 +3424,15 @@ get_selections (int *choices, int n_choi
-                 int is_all_choice, char *annotation_suffix)
- {
-   char *args;
--  const char *prompt;
-+  char *prompt;
-   int n_chosen;
-   int first_choice = is_all_choice ? 2 : 1;
- 
-   prompt = getenv ("PS2");
-   if (prompt == NULL)
--    prompt = ">";
-+    prompt = "> ";
- 
--  printf_unfiltered (("%s "), prompt);
--  gdb_flush (gdb_stdout);
--
--  args = command_line_input ((char *) NULL, 0, annotation_suffix);
-+  args = command_line_input (prompt, 0, annotation_suffix);
- 
-   if (args == NULL)
-     error_no_arg (_("one or more choice numbers"));
-
-
-
 Found on RHEL-5.s390x.
 
 --- sources/gdb/testsuite/gdb.base/dump.exp-orig	2008-08-28 11:44:40.000000000 +0200

gdb-6.8-attach-signalled-detach-stopped.patch:

Index: gdb-6.8-attach-signalled-detach-stopped.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.8-attach-signalled-detach-stopped.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.8-attach-signalled-detach-stopped.patch	28 Aug 2008 18:48:34 -0000	1.1
+++ gdb-6.8-attach-signalled-detach-stopped.patch	14 Dec 2008 14:05:17 -0000	1.2
@@ -1,7 +1,8 @@
-diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/linux-nat.c gdb-6.8/gdb/linux-nat.c
---- gdb-6.8-base/gdb/linux-nat.c	2008-08-27 18:09:35.000000000 +0200
-+++ gdb-6.8/gdb/linux-nat.c	2008-08-27 18:48:40.000000000 +0200
-@@ -117,6 +117,9 @@
+Index: gdb-6.8.50.20081128/gdb/linux-nat.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c	2008-12-06 21:48:18.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/linux-nat.c	2008-12-06 22:00:42.000000000 +0100
+@@ -199,6 +199,9 @@ blocked.  */
  static struct target_ops *linux_ops;
  static struct target_ops linux_ops_saved;
  
@@ -11,19 +12,23 @@
  /* The method to call, if any, when a new thread is attached.  */
  static void (*linux_nat_new_thread) (ptid_t);
  
-@@ -531,6 +534,11 @@ linux_child_follow_fork (struct target_o
+@@ -871,7 +874,14 @@ linux_child_follow_fork (struct target_o
+ 	  fork_save_infrun_state (fp, 0);
  	}
        else
- 	{
-+	 /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
-+	    In this point of code it cannot be 1 as we would not get FORK
-+	    executed without CONTINUE first which resets PID_WAS_STOPPED.
-+	    We would have to first TARGET_STOP and WAITPID it as with running
-+	    inferior PTRACE_DETACH, SIGSTOP will ignore the signal.  */
- 	  target_detach (NULL, 0);
- 	}
+-	target_detach (NULL, 0);
++	{
++	  /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
++	     In this point of code it cannot be 1 as we would not get FORK
++	     executed without CONTINUE first which resets PID_WAS_STOPPED.
++	     We would have to first TARGET_STOP and WAITPID it as with running
++	     inferior PTRACE_DETACH, SIGSTOP will ignore the signal.  */
++	  target_detach (NULL, 0);
++	}
  
-@@ -936,6 +944,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
+       inferior_ptid = ptid_build (child_pid, child_pid, 0);
+       add_inferior (child_pid);
+@@ -1203,6 +1213,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
        if (debug_linux_nat)
  	fprintf_unfiltered (gdb_stdlog,
  			    "LNPAW: Attaching to a stopped process\n");
@@ -31,9 +36,9 @@
  
        /* The process is definitely stopped.  It is in a job control
  	 stop, unless the kernel predates the TASK_STOPPED /
-@@ -1128,6 +1137,9 @@ get_pending_status (struct lwp_info *lp,
-   else
-     *status = lp->status;
+@@ -1535,6 +1546,9 @@ GPT: lwp %s had signal %s, but it is in 
+ 	*status = lp->status;
+     }
  
 +  if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
 +    *status = W_STOPCODE (SIGSTOP);
@@ -41,16 +46,16 @@
    return 0;
  }
  
-@@ -1207,6 +1219,8 @@ linux_nat_detach (char *args, int from_t
- 
-   trap_ptid = null_ptid;
+@@ -1631,6 +1645,8 @@ linux_nat_detach (struct target_ops *ops
+   inferior_ptid = pid_to_ptid (pid);
+   linux_ops->to_detach (ops, args, from_tty);
  
 +  pid_was_stopped = 0;
 +
-   /* Destroy LWP info; it's no longer valid.  */
-   init_lwp_list ();
- 
-@@ -1340,6 +1354,14 @@ linux_nat_resume (ptid_t ptid, int step,
+   if (target_can_async_p ())
+     drain_queued_events (pid);
+ }
+@@ -1787,6 +1803,14 @@ linux_nat_resume (ptid_t ptid, int step_
       resume_callback.  */
    lp->stopped = 0;
  
@@ -65,9 +70,19 @@
    if (resume_all)
      iterate_over_lwps (resume_callback, NULL);
  
-diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attach-into-signal.c gdb-6.8/gdb/testsuite/gdb.threads/attach-into-signal.c
---- gdb-6.8-base/gdb/testsuite/gdb.threads/attach-into-signal.c	2008-08-27 17:44:23.000000000 +0200
-+++ gdb-6.8/gdb/testsuite/gdb.threads/attach-into-signal.c	2008-08-27 18:13:41.000000000 +0200
+@@ -3281,6 +3305,8 @@ linux_nat_mourn_inferior (struct target_
+        there are other viable forks to debug.  Delete the exiting
+        one and context-switch to the first available.  */
+     linux_fork_mourn_inferior ();
++
++  pid_was_stopped = 0;
+ }
+ 
+ static LONGEST
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-into-signal.c	2008-05-01 20:50:14.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.c	2008-12-06 21:57:23.000000000 +0100
 @@ -1,19 +1,20 @@
  /* This testcase is part of GDB, the GNU debugger.
  
@@ -106,9 +121,10 @@
  
    abort ();
    /* NOTREACHED */
-diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attach-into-signal.exp gdb-6.8/gdb/testsuite/gdb.threads/attach-into-signal.exp
---- gdb-6.8-base/gdb/testsuite/gdb.threads/attach-into-signal.exp	2008-08-27 17:44:23.000000000 +0200
-+++ gdb-6.8/gdb/testsuite/gdb.threads/attach-into-signal.exp	2008-08-27 18:13:41.000000000 +0200
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.exp
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-into-signal.exp	2008-05-01 20:50:14.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.exp	2008-12-06 21:57:23.000000000 +0100
 @@ -1,27 +1,29 @@
 -# Copyright 2008
 -# Free Software Foundation, Inc.
@@ -240,9 +256,10 @@
 -gdb_test "set debug lin-lwp 1" "" ""
 -
  corefunc threaded
-diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attach-stopped.c gdb-6.8/gdb/testsuite/gdb.threads/attach-stopped.c
---- gdb-6.8-base/gdb/testsuite/gdb.threads/attach-stopped.c	2008-08-27 17:44:23.000000000 +0200
-+++ gdb-6.8/gdb/testsuite/gdb.threads/attach-stopped.c	2008-08-27 18:13:41.000000000 +0200
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-stopped.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-stopped.c	2008-05-01 20:50:14.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-stopped.c	2008-12-06 21:57:23.000000000 +0100
 @@ -1,19 +1,20 @@
  /* This testcase is part of GDB, the GNU debugger.
  
@@ -268,9 +285,10 @@
  
  /* This program is intended to be started outside of gdb, then
     manually stopped via a signal.  */
-diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attach-stopped.exp gdb-6.8/gdb/testsuite/gdb.threads/attach-stopped.exp
---- gdb-6.8-base/gdb/testsuite/gdb.threads/attach-stopped.exp	2008-08-27 17:44:23.000000000 +0200
-+++ gdb-6.8/gdb/testsuite/gdb.threads/attach-stopped.exp	2008-08-27 18:13:41.000000000 +0200
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-stopped.exp
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-stopped.exp	2008-05-01 20:50:14.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-stopped.exp	2008-12-06 21:57:23.000000000 +0100
 @@ -1,26 +1,33 @@
 -# Copyright 2008
 -# Free Software Foundation, Inc.
@@ -380,9 +398,10 @@
         
      set test "$threadtype: attach2 to stopped, after setting file"
      gdb_test_multiple "attach $testpid" "$test" {
-diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attachstop-mt.c gdb-6.8/gdb/testsuite/gdb.threads/attachstop-mt.c
---- gdb-6.8-base/gdb/testsuite/gdb.threads/attachstop-mt.c	2008-08-27 17:44:23.000000000 +0200
-+++ gdb-6.8/gdb/testsuite/gdb.threads/attachstop-mt.c	2008-08-27 18:13:41.000000000 +0200
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attachstop-mt.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attachstop-mt.c	2008-05-01 20:50:14.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attachstop-mt.c	2008-12-06 21:57:23.000000000 +0100
 @@ -1,19 +1,20 @@
  /* This testcase is part of GDB, the GNU debugger.
  
@@ -408,52 +427,11 @@
  
  /* This program is intended to be started outside of gdb, then
     manually stopped via a signal.  */
-diff -up -u -X /home/jkratoch2/.diffi.list -rup gdb-6.8-base/gdb/testsuite/gdb.threads/attachstop-mt.exp gdb-6.8/gdb/testsuite/gdb.threads/attachstop-mt.exp
---- gdb-6.8-base/gdb/testsuite/gdb.threads/attachstop-mt.exp	2008-08-27 17:44:23.000000000 +0200
-+++ gdb-6.8/gdb/testsuite/gdb.threads/attachstop-mt.exp	2008-08-27 18:13:41.000000000 +0200
-@@ -1,26 +1,33 @@
--# Copyright 2008
--# Free Software Foundation, Inc.
-+# Copyright 2006
- 
- # 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
-+# 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, see <http://www.gnu.org/licenses/>.
-+# 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 was created by modifying gdb.threads/attachstop.
- # This file was created by Jan Kratochvil <jan.kratochvil at redhat.com>.
- # Regression for: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=197584
- 
-+if $tracelevel then {
-+    strace $tracelevel
-+}
-+
-+set prms_id 0
-+set bug_id 0
-+
- # This test only works on Linux
--if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
--    continue
-+if { ![istarget "*-*-linux-gnu*"] } {
-+    return 0
- }
- 
- set testfile "attachstop-mt"
-@@ -169,12 +176,23 @@ gdb_test "bt" ".*sleep.*(func|main).*" "
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attachstop-mt.exp
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attachstop-mt.exp	2008-09-28 13:39:45.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attachstop-mt.exp	2008-12-06 21:57:23.000000000 +0100
+@@ -176,12 +176,23 @@ gdb_test "bt" ".*sleep.*(func|main).*" "
  # Exit and detach the process.
  gdb_exit
  

gdb-6.8-bz254229-gcore-prpsinfo.patch:

Index: gdb-6.8-bz254229-gcore-prpsinfo.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.8-bz254229-gcore-prpsinfo.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.8-bz254229-gcore-prpsinfo.patch	1 Aug 2008 06:36:43 -0000	1.1
+++ gdb-6.8-bz254229-gcore-prpsinfo.patch	14 Dec 2008 14:05:17 -0000	1.2
@@ -1,7 +1,8 @@
-diff -d -urpN gdb-6.8.4/bfd/elf-bfd.h gdb-6.8.7/bfd/elf-bfd.h
---- gdb-6.8.4/bfd/elf-bfd.h	2008-07-25 16:16:15.000000000 +0200
-+++ gdb-6.8.7/bfd/elf-bfd.h	2008-07-29 12:29:20.000000000 +0200
-@@ -2125,7 +2125,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
+Index: gdb-6.8.50.20081209/bfd/elf-bfd.h
+===================================================================
+--- gdb-6.8.50.20081209.orig/bfd/elf-bfd.h	2008-12-03 15:50:57.000000000 +0100
++++ gdb-6.8.50.20081209/bfd/elf-bfd.h	2008-12-10 01:35:08.000000000 +0100
+@@ -2154,7 +2154,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
  extern char *elfcore_write_note
    (bfd *, char *, int *, const char *, int, const void *, int);
  extern char *elfcore_write_prpsinfo
@@ -10,10 +11,11 @@
  extern char *elfcore_write_prstatus
    (bfd *, char *, int *, long, int, const void *);
  extern char * elfcore_write_pstatus
-diff -d -urpN gdb-6.8.4/bfd/elf.c gdb-6.8.7/bfd/elf.c
---- gdb-6.8.4/bfd/elf.c	2008-07-25 16:16:15.000000000 +0200
-+++ gdb-6.8.7/bfd/elf.c	2008-07-29 12:45:52.000000000 +0200
-@@ -8256,6 +8256,7 @@ char *
+Index: gdb-6.8.50.20081209/bfd/elf.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/bfd/elf.c	2008-12-03 15:50:57.000000000 +0100
++++ gdb-6.8.50.20081209/bfd/elf.c	2008-12-10 01:35:08.000000000 +0100
+@@ -8345,6 +8345,7 @@ char *
  elfcore_write_prpsinfo (bfd  *abfd,
  			char *buf,
  			int  *bufsiz,
@@ -21,7 +23,7 @@
  			const char *fname,
  			const char *psargs)
  {
-@@ -8282,9 +8283,15 @@ elfcore_write_prpsinfo (bfd  *abfd,
+@@ -8371,9 +8372,15 @@ elfcore_write_prpsinfo (bfd  *abfd,
        int note_type = NT_PRPSINFO;
  #endif
  
@@ -40,7 +42,7 @@
        return elfcore_write_note (abfd, buf, bufsiz,
  				 note_name, note_type, &data, sizeof (data));
      }
-@@ -8299,9 +8306,15 @@ elfcore_write_prpsinfo (bfd  *abfd,
+@@ -8388,9 +8395,15 @@ elfcore_write_prpsinfo (bfd  *abfd,
        int note_type = NT_PRPSINFO;
  #endif
  
@@ -59,9 +61,10 @@
        return elfcore_write_note (abfd, buf, bufsiz,
  				 note_name, note_type, &data, sizeof (data));
      }
-diff -d -urpN gdb-6.8.4/gdb/amd64-linux-nat.c gdb-6.8.7/gdb/amd64-linux-nat.c
---- gdb-6.8.4/gdb/amd64-linux-nat.c	2008-07-25 16:16:15.000000000 +0200
-+++ gdb-6.8.7/gdb/amd64-linux-nat.c	2008-07-29 12:46:02.000000000 +0200
+Index: gdb-6.8.50.20081209/gdb/amd64-linux-nat.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/amd64-linux-nat.c	2008-12-10 01:28:28.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/amd64-linux-nat.c	2008-12-10 01:35:08.000000000 +0100
 @@ -139,6 +139,7 @@ static int amd64_linux_gregset32_reg_off
  
  static char *
@@ -95,10 +98,11 @@
  }
  
  static void
-diff -d -urpN gdb-6.8.4/gdb/fbsd-nat.c gdb-6.8.7/gdb/fbsd-nat.c
---- gdb-6.8.4/gdb/fbsd-nat.c	2008-07-25 16:16:15.000000000 +0200
-+++ gdb-6.8.7/gdb/fbsd-nat.c	2008-07-29 12:29:20.000000000 +0200
-@@ -184,6 +184,7 @@ fbsd_make_corefile_notes (bfd *obfd, int
+Index: gdb-6.8.50.20081209/gdb/fbsd-nat.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/fbsd-nat.c	2008-10-28 16:22:12.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/fbsd-nat.c	2008-12-10 01:35:08.000000000 +0100
+@@ -210,6 +210,7 @@ fbsd_make_corefile_notes (bfd *obfd, int
  	psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL);
  
        note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
@@ -106,18 +110,19 @@
  					  fname, psargs);
      }
  
-diff -d -urpN gdb-6.8.4/gdb/linux-nat.c gdb-6.8.7/gdb/linux-nat.c
---- gdb-6.8.4/gdb/linux-nat.c	2008-07-25 16:16:15.000000000 +0200
-+++ gdb-6.8.7/gdb/linux-nat.c	2008-07-29 13:50:52.000000000 +0200
-@@ -47,6 +47,7 @@
- #include "gdbthread.h"		/* for struct thread_info etc. */
- #include "gdb_stat.h"		/* for struct stat */
- #include <fcntl.h>		/* for O_RDONLY */
+Index: gdb-6.8.50.20081209/gdb/linux-nat.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c	2008-12-10 01:28:14.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/linux-nat.c	2008-12-10 01:35:25.000000000 +0100
+@@ -53,6 +53,7 @@
+ #include <sys/types.h>
+ #include "gdb_dirent.h"
+ #include "xml-support.h"
 +#include "gdb_procfs32.h"	/* for struct elf_prpsinfo32 */
  
- #ifndef O_LARGEFILE
- #define O_LARGEFILE 0
-@@ -108,7 +109,7 @@ static LONGEST (*super_xfer_partial) (st
+ #ifdef HAVE_PERSONALITY
+ # include <sys/personality.h>
+@@ -216,7 +217,7 @@ static LONGEST (*super_xfer_partial) (st
  /* This functions make elfcore note sections.
     They may get overriden by code adjusting data for multi-target builds.  */
  char *(*linux_elfcore_write_prpsinfo)
@@ -126,8 +131,8 @@
  char *(*linux_elfcore_write_prstatus)
    (bfd *, char *, int *, long, int, const void *) = elfcore_write_prstatus;
  static char *
-@@ -2812,6 +2813,159 @@ linux_nat_do_registers (bfd *obfd, ptid_
- 					note_data, note_size);
+@@ -3614,6 +3615,159 @@ linux_nat_corefile_thread_callback (stru
+   return 0;
  }
  
 +/* Should be always true for Linux */
@@ -286,7 +291,7 @@
  /* Fills the "to_make_corefile_note" target vector.  Builds the note
     section for a corefile, and returns it in a malloc buffer.  */
  
-@@ -2831,8 +2985,14 @@ linux_nat_make_corefile_notes (bfd *obfd
+@@ -3633,8 +3787,14 @@ linux_nat_make_corefile_notes (bfd *obfd
  
    if (get_exec_file (0))
      {
@@ -301,7 +306,7 @@
        if (get_inferior_args ())
  	{
  	  char *string_end;
-@@ -2848,9 +3008,15 @@ linux_nat_make_corefile_notes (bfd *obfd
+@@ -3650,9 +3810,15 @@ linux_nat_make_corefile_notes (bfd *obfd
  		       psargs_end - string_end);
  	    }
  	}
@@ -319,10 +324,11 @@
      }
  
    /* Dump information for threads.  */
-diff -d -urpN gdb-6.8.4/gdb/linux-nat.h gdb-6.8.7/gdb/linux-nat.h
---- gdb-6.8.4/gdb/linux-nat.h	2008-07-25 16:16:15.000000000 +0200
-+++ gdb-6.8.7/gdb/linux-nat.h	2008-07-29 12:29:20.000000000 +0200
-@@ -133,7 +133,7 @@ struct siginfo *linux_nat_get_siginfo (p
+Index: gdb-6.8.50.20081209/gdb/linux-nat.h
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/linux-nat.h	2008-12-10 01:27:33.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/linux-nat.h	2008-12-10 01:35:08.000000000 +0100
+@@ -138,7 +138,7 @@ struct siginfo *linux_nat_get_siginfo (p
  /* These functions make elfcore note sections.
     They may get overriden by code adjusting data for multi-target builds.  */
  extern char *(*linux_elfcore_write_prpsinfo)
@@ -331,10 +337,11 @@
  extern char *(*linux_elfcore_write_prstatus)
    (bfd *, char *, int *, long, int, const void *);
  extern char *(*linux_elfcore_write_prfpreg)
-diff -d -urpN gdb-6.8.4/gdb/procfs.c gdb-6.8.7/gdb/procfs.c
---- gdb-6.8.4/gdb/procfs.c	2008-07-25 16:16:15.000000000 +0200
-+++ gdb-6.8.7/gdb/procfs.c	2008-07-29 12:29:20.000000000 +0200
-@@ -6118,6 +6118,7 @@ procfs_make_note_section (bfd *obfd, int
+Index: gdb-6.8.50.20081209/gdb/procfs.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/procfs.c	2008-11-09 12:27:17.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/procfs.c	2008-12-10 01:35:08.000000000 +0100
+@@ -6181,6 +6181,7 @@ procfs_make_note_section (bfd *obfd, int
    note_data = (char *) elfcore_write_prpsinfo (obfd,
  					       note_data,
  					       note_size,

gdb-6.8-bz377541-vla.patch:

Index: gdb-6.8-bz377541-vla.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.8-bz377541-vla.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.8-bz377541-vla.patch	9 Nov 2008 14:39:26 -0000	1.3
+++ gdb-6.8-bz377541-vla.patch	14 Dec 2008 14:05:17 -0000	1.4
@@ -1,10 +1,8 @@
-Based on:
-http://people.redhat.com/jkratoch/vla/
-fortran-dynamic-arrays-HEAD-l.patch
-
---- ./gdb/c-typeprint.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/c-typeprint.c	2008-11-08 22:39:57.000000000 +0100
-@@ -541,7 +541,12 @@ c_type_print_varspec_suffix (struct type
+diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
+index b18e437..7095e46 100644
+--- a/gdb/c-typeprint.c
++++ b/gdb/c-typeprint.c
+@@ -559,7 +559,12 @@ c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
  	fprintf_filtered (stream, ")");
  
        fprintf_filtered (stream, "[");
@@ -18,9 +16,11 @@
  	&& !TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
  	fprintf_filtered (stream, "%d",
  			  (TYPE_LENGTH (type)
---- ./gdb/dwarf2expr.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/dwarf2expr.c	2008-11-08 22:39:57.000000000 +0100
-@@ -750,6 +750,13 @@ execute_stack_op (struct dwarf_expr_cont
+diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
+index 707c0de..9b4c726 100644
+--- a/gdb/dwarf2expr.c
++++ b/gdb/dwarf2expr.c
+@@ -738,6 +738,13 @@ execute_stack_op (struct dwarf_expr_context *ctx,
  	  ctx->initialized = 0;
  	  goto no_push;
  
@@ -34,9 +34,11 @@
  	default:
  	  error (_("Unhandled dwarf expression opcode 0x%x"), op);
  	}
---- ./gdb/dwarf2expr.h	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/dwarf2expr.h	2008-11-08 22:39:57.000000000 +0100
-@@ -61,10 +61,10 @@ struct dwarf_expr_context
+diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h
+index 5d9581c..b79f811 100644
+--- a/gdb/dwarf2expr.h
++++ b/gdb/dwarf2expr.h
+@@ -67,10 +67,10 @@ struct dwarf_expr_context
       The result must be live until the current expression evaluation
       is complete.  */
    unsigned char *(*get_subr) (void *baton, off_t offset, size_t *length);
@@ -48,9 +50,11 @@
  
    /* The current depth of dwarf expression recursion, via DW_OP_call*,
       DW_OP_fbreg, DW_OP_push_object_address, etc., and the maximum
---- ./gdb/dwarf2loc.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/dwarf2loc.c	2008-11-08 22:39:57.000000000 +0100
-@@ -105,6 +105,9 @@ struct dwarf_expr_baton
+diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
+index 080cd06..a70b2fc 100644
+--- a/gdb/dwarf2loc.c
++++ b/gdb/dwarf2loc.c
+@@ -107,6 +107,9 @@ struct dwarf_expr_baton
  {
    struct frame_info *frame;
    struct objfile *objfile;
@@ -60,7 +64,7 @@
  };
  
  /* Helper functions for dwarf2_evaluate_loc_desc.  */
-@@ -160,22 +163,32 @@ dwarf_expr_frame_base (void *baton, gdb_
+@@ -163,22 +166,32 @@ dwarf_expr_frame_base (void *baton, gdb_byte **start, size_t * length)
        *start = find_location_expression (symbaton, length,
  					 get_frame_address_in_block (frame));
      }
@@ -80,7 +84,7 @@
 +      gdb_assert (symbaton != NULL);
 +      *start = symbaton->data;
 +      *length = symbaton->size;
-     }
++    }
 +  else if (SYMBOL_OPS (framefunc) == &dwarf2_missing_funcs)
 +    {
 +      struct dwarf2_locexpr_baton *symbaton;
@@ -89,7 +93,7 @@
 +      gdb_assert (symbaton == NULL);
 +      *start = NULL;
 +      *length = 0;	/* unused */
-+    }
+     }
 +  else
 +    internal_error (__FILE__, __LINE__,
 +		    _("Unsupported SYMBOL_OPS %p for \"%s\""),
@@ -102,7 +106,7 @@
  }
  
  /* Using the objfile specified in BATON, find the address for the
-@@ -188,6 +201,117 @@ dwarf_expr_tls_address (void *baton, COR
+@@ -191,6 +204,119 @@ dwarf_expr_tls_address (void *baton, CORE_ADDR offset)
    return target_translate_tls_address (debaton->objfile, offset);
  }
  
@@ -163,7 +167,7 @@
 +
 +static struct dwarf_expr_context *
 +dwarf_expr_prep_ctx (struct frame_info *frame, gdb_byte *data,
-+		     unsigned short size, struct objfile *objfile)
++		     unsigned short size, struct dwarf2_per_cu_data *per_cu)
 +{
 +  struct dwarf_expr_context *ctx;
 +  struct dwarf_expr_baton baton;
@@ -172,10 +176,12 @@
 +    frame = get_selected_frame (NULL);
 +
 +  baton.frame = frame;
-+  baton.objfile = objfile;
++  baton.objfile = dwarf2_per_cu_objfile (per_cu);
 +  baton.object_address = object_address;
 +
 +  ctx = new_dwarf_expr_context ();
++  ctx->gdbarch = get_objfile_arch (baton.objfile);
++  ctx->addr_size = dwarf2_per_cu_addr_size (per_cu);
 +  ctx->baton = &baton;
 +  ctx->read_reg = dwarf_expr_read_reg;
 +  ctx->read_mem = dwarf_expr_read_mem;
@@ -204,7 +210,7 @@
 +  struct cleanup *back_to = make_cleanup (null_cleanup, 0);
 +
 +  ctx = dwarf_expr_prep_ctx (NULL, dlbaton->data, dlbaton->size,
-+			     dlbaton->objfile);
++			     dlbaton->per_cu);
 +  if (ctx->num_pieces > 0)
 +    error (_("DW_OP_*piece is unsupported for DW_FORM_block"));
 +  else if (ctx->in_reg)
@@ -220,7 +226,7 @@
  /* Evaluate a location description, starting at DATA and with length
     SIZE, to find the current location of variable VAR in the context
     of FRAME.  */
-@@ -198,8 +322,8 @@ dwarf2_evaluate_loc_desc (struct symbol 
+@@ -201,8 +327,8 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
  {
    struct gdbarch *arch = get_frame_arch (frame);
    struct value *retval;
@@ -230,15 +236,17 @@
  
    if (size == 0)
      {
-@@ -209,17 +333,8 @@ dwarf2_evaluate_loc_desc (struct symbol 
+@@ -212,19 +338,8 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
        return retval;
      }
  
 -  baton.frame = frame;
--  baton.objfile = objfile;
-+  ctx = dwarf_expr_prep_ctx (frame, data, size, objfile);
+-  baton.objfile = dwarf2_per_cu_objfile (per_cu);
++  ctx = dwarf_expr_prep_ctx (frame, data, size, per_cu);
  
 -  ctx = new_dwarf_expr_context ();
+-  ctx->gdbarch = get_objfile_arch (baton.objfile);
+-  ctx->addr_size = dwarf2_per_cu_addr_size (per_cu);
 -  ctx->baton = &baton;
 -  ctx->read_reg = dwarf_expr_read_reg;
 -  ctx->read_mem = dwarf_expr_read_mem;
@@ -249,7 +257,7 @@
    if (ctx->num_pieces > 0)
      {
        int i;
-@@ -257,6 +372,10 @@ dwarf2_evaluate_loc_desc (struct symbol 
+@@ -262,6 +377,10 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
      {
        CORE_ADDR address = dwarf_expr_fetch (ctx, 0);
  
@@ -260,7 +268,7 @@
        retval = allocate_value (SYMBOL_TYPE (var));
        VALUE_LVAL (retval) = lval_memory;
        set_value_lazy (retval, 1);
-@@ -265,7 +384,7 @@ dwarf2_evaluate_loc_desc (struct symbol 
+@@ -270,7 +389,7 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
  
    set_value_initialized (retval, ctx->initialized);
  
@@ -269,7 +277,7 @@
  
    return retval;
  }
-@@ -574,7 +693,7 @@ static int
+@@ -588,7 +707,7 @@ static int
  loclist_describe_location (struct symbol *symbol, struct ui_file *stream)
  {
    /* FIXME: Could print the entire list of locations.  */
@@ -278,7 +286,7 @@
    return 1;
  }
  
-@@ -590,16 +709,56 @@ loclist_tracepoint_var_ref (struct symbo
+@@ -604,16 +723,56 @@ loclist_tracepoint_var_ref (struct symbol * symbol, struct agent_expr * ax,
  
    data = find_location_expression (dlbaton, &size, ax->scope);
    if (data == NULL)
@@ -338,9 +346,11 @@
 +  missing_describe_location,
 +  missing_tracepoint_var_ref
 +};
---- ./gdb/dwarf2loc.h	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/dwarf2loc.h	2008-11-08 22:39:57.000000000 +0100
-@@ -65,5 +65,11 @@ struct dwarf2_loclist_baton
+diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h
+index 632568e..a2e5abf 100644
+--- a/gdb/dwarf2loc.h
++++ b/gdb/dwarf2loc.h
+@@ -71,5 +71,11 @@ struct dwarf2_loclist_baton
  
  extern const struct symbol_ops dwarf2_locexpr_funcs;
  extern const struct symbol_ops dwarf2_loclist_funcs;
@@ -352,11 +362,13 @@
 +  (struct dwarf2_locexpr_baton *dlbaton);
  
  #endif /* dwarf2loc.h */
---- ./gdb/dwarf2read.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/dwarf2read.c	2008-11-08 22:47:45.000000000 +0100
-@@ -1004,7 +1004,14 @@ static void store_in_ref_table (unsigned
- static unsigned int dwarf2_get_ref_die_offset (struct attribute *,
- 					       struct dwarf2_cu *);
+diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
+index a6584c4..829fa4e 100644
+--- a/gdb/dwarf2read.c
++++ b/gdb/dwarf2read.c
+@@ -1023,7 +1023,14 @@ static void store_in_ref_table (struct die_info *,
+ 
+ static unsigned int dwarf2_get_ref_die_offset (struct attribute *);
  
 -static int dwarf2_get_attr_constant_value (struct attribute *, int);
 +enum dwarf2_get_attr_constant_value
@@ -370,19 +382,19 @@
  
  static struct die_info *follow_die_ref (struct die_info *,
  					struct attribute *,
-@@ -1059,6 +1066,9 @@ static void age_cached_comp_units (void)
+@@ -1078,6 +1085,9 @@ static void age_cached_comp_units (void);
  
  static void free_one_cached_comp_unit (void *);
  
 +static void fetch_die_type_attrs (struct die_info *die, struct type *type,
 +				  struct dwarf2_cu *cu);
 +
- static void set_die_type (struct die_info *, struct type *,
- 			  struct dwarf2_cu *);
+ static struct type *set_die_type (struct die_info *, struct type *,
+ 				  struct dwarf2_cu *);
  
-@@ -1082,6 +1092,9 @@ static void dwarf2_clear_marks (struct d
- static void read_set_type (struct die_info *, struct dwarf2_cu *);
+@@ -1097,6 +1107,9 @@ static void dwarf2_clear_marks (struct dwarf2_per_cu_data *);
  
+ static struct type *get_die_type (struct die_info *die, struct dwarf2_cu *cu);
  
 +static struct dwarf2_locexpr_baton *dwarf2_attr_to_locexpr_baton
 +  (struct attribute *attr, struct dwarf2_cu *cu);
@@ -390,8 +402,8 @@
  /* Try to locate the sections we need for DWARF 2 debugging
     information and return true if we have enough to do something.  */
  
-@@ -4387,6 +4400,26 @@ process_enumeration_scope (struct die_in
-   new_symbol (die, die->type, cu);
+@@ -4466,6 +4479,26 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu)
+   new_symbol (die, this_type, cu);
  }
  
 +/* Create a new array dimension referencing its target type TYPE.
@@ -417,7 +429,7 @@
  /* Extract all information from a DW_TAG_array_type DIE and put it in
     the DIE's type field.  For now, this only handles one dimensional
     arrays.  */
-@@ -4400,7 +4433,7 @@ read_array_type (struct die_info *die, s
+@@ -4479,7 +4512,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
    struct type *element_type, *range_type, *index_type;
    struct type **range_types = NULL;
    struct attribute *attr;
@@ -426,7 +438,7 @@
    struct cleanup *back_to;
    char *name;
  
-@@ -4455,16 +4488,11 @@ read_array_type (struct die_info *die, s
+@@ -4526,16 +4559,11 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
    type = element_type;
  
    if (read_array_order (die, cu) == DW_ORD_col_major)
@@ -448,35 +460,31 @@
  
    /* Understand Dwarf2 support for vector types (like they occur on
       the PowerPC w/ AltiVec).  Gcc just adds another attribute to the
-@@ -4826,34 +4854,98 @@ read_tag_string_type (struct die_info *d
+@@ -4891,29 +4919,93 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
    struct objfile *objfile = cu->objfile;
    struct type *type, *range_type, *index_type, *char_type;
    struct attribute *attr;
 -  unsigned int length;
 +  int length;
- 
-   if (die->type)
-     {
-       return;
-     }
- 
++
 +  index_type = builtin_type_int32;
 +  range_type = create_range_type_nfields (NULL, index_type, 2);
-+  TYPE_FLAGS (range_type) |= TYPE_FLAG_UNSIGNED;
++  TYPE_UNSIGNED (range_type) = 1;
 +
 +  /* C/C++ should probably have the low bound 0 but C/C++ does not use
 +     DW_TAG_string_type.  */
 +  TYPE_LOW_BOUND (range_type) = 1;
-+
+ 
    attr = dwarf2_attr (die, DW_AT_string_length, cu);
 -  if (attr)
 -    {
 -      length = DW_UNSND (attr);
 -    }
 -  else
-+  switch (dwarf2_get_attr_constant_value (attr, &length))
-     {
+-    {
 -      /* check for the DW_AT_byte_size attribute */
++  switch (dwarf2_get_attr_constant_value (attr, &length))
++    {
 +    case dwarf2_attr_const:
 +      /* We currently do not support a constant address where the location
 +	 should be read from - DWARF2_ATTR_BLOCK is expected instead.  See
@@ -504,7 +512,7 @@
 +	  TYPE_RANGE_BOUND_SET_DWARF_BLOCK (range_type, 1);
 +	  TYPE_FIELD_DWARF_BLOCK (range_type, 1) =
 +					dwarf2_attr_to_locexpr_baton (attr, cu);
-+	  TYPE_FLAGS (range_type) |= TYPE_FLAG_DYNAMIC;
++	  TYPE_DYNAMIC (range_type) = 1;
 +	  break;
 +	}
 +      break;
@@ -524,7 +532,7 @@
 +
 +	length_baton = obstack_alloc (&cu->comp_unit_obstack,
 +				      sizeof (*length_baton));
-+	length_baton->objfile = cu->objfile;
++	length_baton->per_cu = cu->per_cu;
 +	length_baton->data = obstack_alloc (&cu->comp_unit_obstack,
 +					    DW_BLOCK (attr)->size + 2);
 +	memcpy (length_baton->data, DW_BLOCK (attr)->data,
@@ -554,7 +562,7 @@
 +
 +	TYPE_RANGE_BOUND_SET_DWARF_BLOCK (range_type, 1);
 +	TYPE_FIELD_DWARF_BLOCK (range_type, 1) = length_baton;
-+	TYPE_FLAGS (range_type) |= TYPE_FLAG_DYNAMIC;
++	TYPE_DYNAMIC (range_type) = 1;
 +      }
 +      break;
      }
@@ -563,17 +571,17 @@
 -  range_type = create_range_type (NULL, index_type, 1, length);
    type = create_string_type (NULL, range_type);
  
-   set_die_type (die, type, cu);
-@@ -4946,7 +5038,6 @@ static void
+   return set_die_type (die, type, cu);
+@@ -5007,7 +5099,6 @@ static struct type *
  read_typedef (struct die_info *die, struct dwarf2_cu *cu)
  {
    struct objfile *objfile = cu->objfile;
 -  struct attribute *attr;
-   char *name = NULL;
+   const char *name = NULL;
+   struct type *this_type;
  
-   if (!die->type)
-@@ -5052,9 +5143,9 @@ read_subrange_type (struct die_info *die
- {
+@@ -5112,9 +5203,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+   struct gdbarch *gdbarch = get_objfile_arch (cu->objfile);
    struct type *base_type;
    struct type *range_type;
 -  struct attribute *attr;
@@ -584,8 +592,8 @@
 +  enum dwarf2_get_attr_constant_value high_type, byte_stride_type;
    char *name;
    
-   /* If we have already decoded this die, then nothing more to do.  */
-@@ -5071,42 +5162,89 @@ read_subrange_type (struct die_info *die
+   base_type = die_type (die, cu);
+@@ -5127,42 +5218,89 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
  		     0, NULL, cu->objfile);
      }
  
@@ -626,13 +634,13 @@
 +    case dwarf2_attr_const:
 +      TYPE_LOW_BOUND (range_type) = low;
 +      if (low >= 0)
-+	TYPE_FLAGS (range_type) |= TYPE_FLAG_UNSIGNED;
++	TYPE_UNSIGNED (range_type) = 1;
 +      break;
 +    case dwarf2_attr_block:
 +      TYPE_RANGE_BOUND_SET_DWARF_BLOCK (range_type, 0);
 +      TYPE_FIELD_DWARF_BLOCK (range_type, 0) = dwarf2_attr_to_locexpr_baton
 +								     (attr, cu);
-+      TYPE_FLAGS (range_type) |= TYPE_FLAG_DYNAMIC;
++      TYPE_DYNAMIC (range_type) = 1;
 +      /* For setting a default if DW_AT_UPPER_BOUND would be missing.  */
 +      low = 0;
 +      break;
@@ -665,7 +673,7 @@
 +      high_type = dwarf2_get_attr_constant_value (attr, &high);
 +      /* It does not hurt but it is needlessly ineffective in check_typedef.  */
 +      if (high_type != dwarf2_attr_unknown)
-+	TYPE_FLAGS (range_type) |= TYPE_FLAG_RANGE_HIGH_BOUND_IS_COUNT;
++	TYPE_RANGE_HIGH_BOUND_IS_COUNT (range_type) = 1;
 +      /* Pass it now as the regular DW_AT_upper_bound.  */
 +    }
 +  switch (high_type)
@@ -681,7 +689,7 @@
 +      TYPE_RANGE_BOUND_SET_DWARF_BLOCK (range_type, 1);
 +      TYPE_FIELD_DWARF_BLOCK (range_type, 1) = dwarf2_attr_to_locexpr_baton
 +								     (attr, cu);
-+      TYPE_FLAGS (range_type) |= TYPE_FLAG_DYNAMIC;
++      TYPE_DYNAMIC (range_type) = 1;
 +      break;
      }
  
@@ -699,13 +707,13 @@
 +      TYPE_RANGE_BOUND_SET_DWARF_BLOCK (range_type, 2);
 +      TYPE_FIELD_DWARF_BLOCK (range_type, 2) = dwarf2_attr_to_locexpr_baton
 +							 (byte_stride_attr, cu);
-+      TYPE_FLAGS (range_type) |= TYPE_FLAG_DYNAMIC;
++      TYPE_DYNAMIC (range_type) = 1;
 +      break;
 +    }
  
    name = dwarf2_name (die, cu);
    if (name)
-@@ -7237,10 +7375,12 @@ var_decode_location (struct attribute *a
+@@ -7450,10 +7588,12 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
       (i.e. when the value of a register or memory location is
       referenced, or a thread-local block, etc.).  Then again, it might
       not be worthwhile.  I'm assuming that it isn't unless performance
@@ -720,7 +728,7 @@
  }
  
  /* Given a pointer to a DWARF information entry, figure out if we need
-@@ -7272,6 +7412,8 @@ new_symbol (struct die_info *die, struct
+@@ -7486,6 +7626,8 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
  					     sizeof (struct symbol));
        OBJSTAT (objfile, n_syms++);
        memset (sym, 0, sizeof (struct symbol));
@@ -729,7 +737,7 @@
  
        /* Cache this symbol's name and the name's demangled form (if any).  */
        SYMBOL_LANGUAGE (sym) = cu->language;
-@@ -9079,26 +9221,35 @@ dwarf2_get_ref_die_offset (struct attrib
+@@ -9291,26 +9433,35 @@ dwarf2_get_ref_die_offset (struct attribute *attr)
    return result;
  }
  
@@ -779,8 +787,8 @@
 +  return dwarf2_attr_unknown;
  }
  
- static struct die_info *
-@@ -9862,6 +10013,34 @@ attr_form_is_constant (struct attribute 
+ /* THIS_CU has a reference to PER_CU.  If necessary, load the new compilation
+@@ -10088,6 +10239,34 @@ attr_form_is_constant (struct attribute *attr)
      }
  }
  
@@ -795,8 +803,8 @@
 +  gdb_assert (attr_form_is_block (attr));
 +
 +  baton = obstack_alloc (&cu->objfile->objfile_obstack, sizeof (*baton));
-+  baton->objfile = cu->objfile;
-+  gdb_assert (baton->objfile);
++  baton->per_cu = cu->per_cu;
++  gdb_assert (baton->per_cu);
 +
 +  /* Note that we're just copying the block's data pointer
 +     here, not the actual data.  We're still pointing into the
@@ -815,7 +823,7 @@
  static void
  dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
  			     struct dwarf2_cu *cu)
-@@ -9897,34 +10076,24 @@ dwarf2_symbol_mark_computed (struct attr
+@@ -10117,35 +10296,24 @@ dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
        SYMBOL_OPS (sym) = &dwarf2_loclist_funcs;
        SYMBOL_LOCATION_BATON (sym) = baton;
      }
@@ -832,7 +840,8 @@
  
 -      baton = obstack_alloc (&cu->objfile->objfile_obstack,
 -			     sizeof (struct dwarf2_locexpr_baton));
--      baton->objfile = objfile;
+-      baton->per_cu = cu->per_cu;
+-      gdb_assert (baton->per_cu);
 +      /* Some methods are called without checking SYMBOL_OPS validity.  */
 +      SYMBOL_OPS (sym) = &dwarf2_missing_funcs;
 +      SYMBOL_LOCATION_BATON (sym) = NULL;
@@ -864,7 +873,7 @@
      }
  }
  
-@@ -10164,6 +10333,27 @@ offset_and_type_eq (const void *item_lhs
+@@ -10420,6 +10588,27 @@ offset_and_type_eq (const void *item_lhs, const void *item_rhs)
    return ofs_lhs->offset == ofs_rhs->offset;
  }
  
@@ -890,28 +899,30 @@
 +}
 +
  /* Set the type associated with DIE to TYPE.  Save it in CU's hash
-    table if necessary.  */
+    table if necessary.  For convenience, return TYPE.  */
  
-@@ -10174,6 +10364,8 @@ set_die_type (struct die_info *die, stru
- 
-   die->type = type;
+@@ -10428,6 +10617,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
+ {
+   struct dwarf2_offset_and_type **slot, ofs;
  
 +  fetch_die_type_attrs (die, type, cu);
 +
-   if (cu->per_cu == NULL)
-     return;
- 
---- ./gdb/eval.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/eval.c	2008-11-08 22:39:57.000000000 +0100
-@@ -38,6 +38,7 @@
- #include "ui-out.h"
- #include "exceptions.h"
+   if (cu->type_hash == NULL)
+     {
+       gdb_assert (cu->per_cu != NULL);
+diff --git a/gdb/eval.c b/gdb/eval.c
+index ccb6b74..e3221ef 100644
+--- a/gdb/eval.c
++++ b/gdb/eval.c
+@@ -40,6 +40,7 @@
  #include "regcache.h"
+ #include "user-regs.h"
+ #include "valprint.h"
 +#include "dwarf2loc.h"
  
  #include "gdb_assert.h"
  
-@@ -429,6 +430,7 @@ evaluate_subexp_standard (struct type *e
+@@ -671,6 +672,7 @@ evaluate_subexp_standard (struct type *expect_type,
    long mem_offset;
    struct type **arg_types;
    int save_pos1;
@@ -919,7 +930,7 @@
  
    pc = (*pos)++;
    op = exp->elts[pc].opcode;
-@@ -1280,7 +1282,10 @@ evaluate_subexp_standard (struct type *e
+@@ -1529,7 +1531,10 @@ evaluate_subexp_standard (struct type *expect_type,
  
        /* First determine the type code we are dealing with.  */
        arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
@@ -930,7 +941,7 @@
        code = TYPE_CODE (type);
  
        if (code == TYPE_CODE_PTR)
-@@ -1644,13 +1649,19 @@ evaluate_subexp_standard (struct type *e
+@@ -1963,13 +1968,19 @@ evaluate_subexp_standard (struct type *expect_type,
        {
  	int subscript_array[MAX_FORTRAN_DIMS];
  	int array_size_array[MAX_FORTRAN_DIMS];
@@ -950,7 +961,7 @@
  	tmp_type = check_typedef (value_type (arg1));
  	ndimensions = calc_f77_array_dims (type);
  
-@@ -1678,6 +1689,9 @@ evaluate_subexp_standard (struct type *e
+@@ -1999,6 +2010,9 @@ evaluate_subexp_standard (struct type *expect_type,
  	    upper = f77_get_upperbound (tmp_type);
  	    lower = f77_get_lowerbound (tmp_type);
  
@@ -960,7 +971,7 @@
  	    array_size_array[nargs - i - 1] = upper - lower + 1;
  
  	    /* Zero-normalize subscripts so that offsetting will work. */
-@@ -1696,17 +1710,25 @@ evaluate_subexp_standard (struct type *e
+@@ -2017,17 +2031,25 @@ evaluate_subexp_standard (struct type *expect_type,
  	      tmp_type = check_typedef (TYPE_TARGET_TYPE (tmp_type));
  	  }
  
@@ -987,40 +998,42 @@
 +	      offset_byte += subscript_array[i] * byte_stride_array[i];
 +	  }
  
--	arg2 = value_from_longest (builtin_type_f_integer, offset_item);
+-	arg2 = value_from_longest (builtin_type_int32, offset_item);
 +	element_size = TYPE_LENGTH (TYPE_TARGET_TYPE (tmp_type));
 +	offset_byte += offset_item * element_size;
  
  	/* Let us now play a dirty trick: we will take arg1 
  	   which is a value node pointing to the topmost level
-@@ -1716,7 +1738,7 @@ evaluate_subexp_standard (struct type *e
+@@ -2037,7 +2059,7 @@ evaluate_subexp_standard (struct type *expect_type,
  	   returns the correct type value */
  
  	deprecated_set_value_type (arg1, tmp_type);
--	return value_ind (value_add (value_coerce_array (arg1), arg2));
+-	return value_subscripted_rvalue (arg1, arg2, 0);
 +	return value_subscripted_rvalue (arg1, offset_byte);
        }
  
      case BINOP_LOGICAL_AND:
-@@ -2300,9 +2322,12 @@ evaluate_subexp_for_sizeof (struct expre
+@@ -2686,9 +2708,12 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos)
  
      case OP_VAR_VALUE:
        (*pos) += 4;
 -      type = check_typedef (SYMBOL_TYPE (exp->elts[pc + 2].symbol));
 -      return
--	value_from_longest (builtin_type_int, (LONGEST) TYPE_LENGTH (type));
+-	value_from_longest (size_type, (LONGEST) TYPE_LENGTH (type));
 +      /* We do not need to call read_var_value but the object evaluation may
 +	 need to have executed object_address_set which needs valid
 +	 SYMBOL_VALUE_ADDRESS of the symbol.  Still VALUE returned by
 +	 read_var_value we left as lazy.  */
 +      type = value_type (read_var_value (exp->elts[pc + 2].symbol, NULL));
-+      return value_from_longest (builtin_type_int, (LONGEST) TYPE_LENGTH (type));
++      return value_from_longest (size_type, (LONGEST) TYPE_LENGTH (type));
  
      default:
        val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
---- ./gdb/f-lang.h	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/f-lang.h	2008-11-08 22:39:57.000000000 +0100
-@@ -28,6 +28,10 @@ extern void f_error (char *);	/* Defined
+diff --git a/gdb/f-lang.h b/gdb/f-lang.h
+index 3b3487e..4707603 100644
+--- a/gdb/f-lang.h
++++ b/gdb/f-lang.h
+@@ -28,6 +28,10 @@ extern void f_error (char *);	/* Defined in f-exp.y */
  extern void f_print_type (struct type *, char *, struct ui_file *, int,
  			  int);
  
@@ -1029,10 +1042,12 @@
 +extern void f_object_address_data_valid_or_error (struct type *type);
 +
  extern int f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
- 			struct ui_file *, int, int, int,
- 			enum val_prettyprint);
---- ./gdb/f-typeprint.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/f-typeprint.c	2008-11-08 22:39:57.000000000 +0100
+ 			struct ui_file *, int,
+ 			const struct value_print_options *);
+diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
+index 081d24a..47ad0f3 100644
+--- a/gdb/f-typeprint.c
++++ b/gdb/f-typeprint.c
 @@ -31,7 +31,7 @@
  #include "gdbcore.h"
  #include "target.h"
@@ -1051,7 +1066,7 @@
  					 int, int, int);
  
  void f_type_print_varspec_prefix (struct type *, struct ui_file *,
-@@ -48,6 +48,34 @@ void f_type_print_varspec_prefix (struct
+@@ -48,6 +48,34 @@ void f_type_print_varspec_prefix (struct type *, struct ui_file *,
  void f_type_print_base (struct type *, struct ui_file *, int, int);
  
  
@@ -1086,7 +1101,7 @@
  /* LEVEL is the depth to indent lines by.  */
  
  void
-@@ -57,6 +85,9 @@ f_print_type (struct type *type, char *v
+@@ -57,6 +85,9 @@ f_print_type (struct type *type, char *varstring, struct ui_file *stream,
    enum type_code code;
    int demangled_args;
  
@@ -1096,16 +1111,16 @@
    f_type_print_base (type, stream, show, level);
    code = TYPE_CODE (type);
    if ((varstring != NULL && *varstring != '\0')
-@@ -78,7 +109,7 @@ f_print_type (struct type *type, char *v
-      so don't print an additional pair of ()'s */
+@@ -80,7 +111,7 @@ f_print_type (struct type *type, char *varstring, struct ui_file *stream,
+          so don't print an additional pair of ()'s */
  
-   demangled_args = varstring[strlen (varstring) - 1] == ')';
--  f_type_print_varspec_suffix (type, stream, show, 0, demangled_args);
-+  f_type_print_varspec_suffix (type, stream, show, 0, demangled_args, 0);
+       demangled_args = varstring[strlen (varstring) - 1] == ')'; 
+-      f_type_print_varspec_suffix (type, stream, show, 0, demangled_args);
++      f_type_print_varspec_suffix (type, stream, show, 0, demangled_args, 0);
+    }
  }
  
- /* Print any asterisks or open-parentheses needed before the
-@@ -147,11 +178,13 @@ f_type_print_varspec_prefix (struct type
+@@ -150,11 +181,13 @@ f_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
  
  static void
  f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
@@ -1121,7 +1136,7 @@
  
    if (type == 0)
      return;
-@@ -161,6 +194,9 @@ f_type_print_varspec_suffix (struct type
+@@ -164,6 +197,9 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
  
    QUIT;
  
@@ -1131,7 +1146,7 @@
    switch (TYPE_CODE (type))
      {
      case TYPE_CODE_ARRAY:
-@@ -170,7 +206,8 @@ f_type_print_varspec_suffix (struct type
+@@ -173,7 +209,8 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
  	fprintf_filtered (stream, "(");
  
        if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY)
@@ -1141,7 +1156,7 @@
  
        lower_bound = f77_get_lowerbound (type);
        if (lower_bound != 1)	/* Not the default.  */
-@@ -188,7 +225,8 @@ f_type_print_varspec_suffix (struct type
+@@ -191,7 +228,8 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
  	}
  
        if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
@@ -1151,7 +1166,7 @@
        if (arrayprint_recurse_level == 1)
  	fprintf_filtered (stream, ")");
        else
-@@ -198,13 +236,14 @@ f_type_print_varspec_suffix (struct type
+@@ -201,13 +239,14 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
  
      case TYPE_CODE_PTR:
      case TYPE_CODE_REF:
@@ -1168,9 +1183,20 @@
        if (passed_a_ptr)
  	fprintf_filtered (stream, ")");
  
---- ./gdb/f-valprint.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/f-valprint.c	2008-11-08 22:48:10.000000000 +0100
-@@ -54,15 +54,17 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIM
+@@ -362,7 +401,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
+ 	  fprintfi_filtered (level, stream, "%s",
+ 			     TYPE_FIELD_NAME (type, index));
+ 	  f_type_print_varspec_suffix (TYPE_FIELD_TYPE (type, index),
+-				       stream, 0, 0, 0);
++				       stream, 0, 0, 0, 0);
+ 	  fputs_filtered ("\n", stream);
+ 	} 
+       fprintfi_filtered (level, stream, "End Type ");
+diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
+index f893b49..3c15edb 100644
+--- a/gdb/f-valprint.c
++++ b/gdb/f-valprint.c
+@@ -54,15 +54,17 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
  /* The following macro gives us the size of the nth dimension, Where 
     n is 1 based. */
  
@@ -1200,7 +1226,7 @@
    if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
      {
        /* We have an assumed size array on our hands.  Assume that
-@@ -135,24 +139,29 @@ f77_create_arrayprint_offset_tbl (struct
+@@ -135,24 +139,29 @@ f77_create_arrayprint_offset_tbl (struct type *type, struct ui_file *stream)
        upper = f77_get_upperbound (tmp_type);
        lower = f77_get_lowerbound (tmp_type);
  
@@ -1236,12 +1262,12 @@
      }
  }
  
-@@ -172,33 +181,33 @@ f77_print_array_1 (int nss, int ndimensi
+@@ -172,34 +181,34 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type,
  
    if (nss != ndimensions)
      {
--      for (i = 0; (i < F77_DIM_SIZE (nss) && (*elts) < print_max); i++)
-+      for (i = 0; (i < F77_DIM_COUNT (nss) && (*elts) < print_max); i++)
+-      for (i = 0; (i < F77_DIM_SIZE (nss) && (*elts) < options->print_max); i++)
++      for (i = 0; (i < F77_DIM_COUNT (nss) && (*elts) < options->print_max); i++)
  	{
  	  fprintf_filtered (stream, "( ");
  	  f77_print_array_1 (nss + 1, ndimensions, TYPE_TARGET_TYPE (type),
@@ -1249,17 +1275,17 @@
 -			     address + i * F77_DIM_OFFSET (nss),
 +			     valaddr + i * F77_DIM_BYTE_STRIDE (nss),
 +			     address + i * F77_DIM_BYTE_STRIDE (nss),
- 			     stream, format, deref_ref, recurse, pretty, elts);
+ 			     stream, recurse, options, elts);
  	  fprintf_filtered (stream, ") ");
  	}
--      if (*elts >= print_max && i < F77_DIM_SIZE (nss)) 
-+      if (*elts >= print_max && i < F77_DIM_COUNT (nss)) 
+-      if (*elts >= options->print_max && i < F77_DIM_SIZE (nss)) 
++      if (*elts >= options->print_max && i < F77_DIM_COUNT (nss))
  	fprintf_filtered (stream, "...");
      }
    else
      {
--      for (i = 0; i < F77_DIM_SIZE (nss) && (*elts) < print_max; 
-+      for (i = 0; i < F77_DIM_COUNT (nss) && (*elts) < print_max; 
+-      for (i = 0; i < F77_DIM_SIZE (nss) && (*elts) < options->print_max;
++      for (i = 0; i < F77_DIM_COUNT (nss) && (*elts) < options->print_max;
  	   i++, (*elts)++)
  	{
  	  val_print (TYPE_TARGET_TYPE (type),
@@ -1268,18 +1294,19 @@
  		     0,
 -		     address + i * F77_DIM_OFFSET (ndimensions),
 +		     address + i * F77_DIM_BYTE_STRIDE (ndimensions),
- 		     stream, format, deref_ref, recurse, pretty);
+ 		     stream, recurse, options, current_language);
  
 -	  if (i != (F77_DIM_SIZE (nss) - 1))
 +	  if (i != (F77_DIM_COUNT (nss) - 1))
  	    fprintf_filtered (stream, ", ");
  
--	  if ((*elts == print_max - 1) && (i != (F77_DIM_SIZE (nss) - 1)))
-+	  if ((*elts == print_max - 1) && (i != (F77_DIM_COUNT (nss) - 1)))
+ 	  if ((*elts == options->print_max - 1)
+-	      && (i != (F77_DIM_SIZE (nss) - 1)))
++	      && (i != (F77_DIM_COUNT (nss) - 1)))
  	    fprintf_filtered (stream, "...");
  	}
      }
-@@ -257,6 +266,9 @@ f_val_print (struct type *type, const gd
+@@ -251,6 +260,9 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
    CORE_ADDR addr;
    int index;
  
@@ -1289,27 +1316,29 @@
    CHECK_TYPEDEF (type);
    switch (TYPE_CODE (type))
      {
-@@ -599,8 +611,7 @@ info_common_command (char *comname, int 
+@@ -567,8 +579,7 @@ info_common_command (char *comname, int from_tty)
        while (entry != NULL)
  	{
- 	  printf_filtered ("%s = ", DEPRECATED_SYMBOL_NAME (entry->symbol));
+ 	  printf_filtered ("%s = ", SYMBOL_PRINT_NAME (entry->symbol));
 -	  print_variable_value (entry->symbol, fi, gdb_stdout);
 -	  printf_filtered ("\n");
 +	  print_variable_value_nl (entry->symbol, fi, gdb_stdout);
  	  entry = entry->next;
  	}
      }
---- ./gdb/findvar.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/findvar.c	2008-11-08 22:39:57.000000000 +0100
-@@ -34,6 +34,7 @@
- #include "regcache.h"
+diff --git a/gdb/findvar.c b/gdb/findvar.c
+index f7b6e63..3989957 100644
+--- a/gdb/findvar.c
++++ b/gdb/findvar.c
+@@ -35,6 +35,7 @@
  #include "user-regs.h"
  #include "block.h"
+ #include "objfiles.h"
 +#include "dwarf2loc.h"
  
  /* Basic byte-swapping routines.  GDB has needed these for a long time...
     All extract a target-format integer at ADDR which is LEN bytes long.  */
-@@ -365,29 +366,16 @@ symbol_read_needs_frame (struct symbol *
+@@ -383,27 +384,16 @@ symbol_read_needs_frame (struct symbol *sym)
     and a stack frame id, read the value of the variable
     and return a (pointer to a) struct value containing the value. 
     If the variable cannot be found, return a zero pointer.
@@ -1328,9 +1357,7 @@
 -  int len;
 -
 -  if (SYMBOL_CLASS (var) == LOC_COMPUTED
--      || SYMBOL_CLASS (var) == LOC_COMPUTED_ARG
--      || SYMBOL_CLASS (var) == LOC_REGISTER
--      || SYMBOL_CLASS (var) == LOC_REGPARM)
+-      || SYMBOL_CLASS (var) == LOC_REGISTER)
 -    /* These cases do not use V.  */
 -    v = NULL;
 -  else
@@ -1343,7 +1370,7 @@
  
    /* FIXME drow/2003-09-06: this call to the selected frame should be
       pushed upwards to the callers.  */
-@@ -397,31 +385,39 @@ read_var_value (struct symbol *var, stru
+@@ -413,31 +403,39 @@ read_var_value (struct symbol *var, struct frame_info *frame)
    switch (SYMBOL_CLASS (var))
      {
      case LOC_CONST:
@@ -1367,7 +1394,7 @@
 -	{
 -	  CORE_ADDR addr
 -	    = symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (var),
--					SYMBOL_BFD_SECTION (var));
+-					SYMBOL_OBJ_SECTION (var));
 -	  store_typed_address (value_contents_raw (v), type, addr);
 -	}
 -      else
@@ -1383,7 +1410,7 @@
 +	  {
 +	    CORE_ADDR addr
 +	      = symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (var),
-+					  SYMBOL_BFD_SECTION (var));
++					  SYMBOL_OBJ_SECTION (var));
 +	    store_typed_address (value_contents_raw (v), type, addr);
 +	  }
 +	else
@@ -1402,13 +1429,13 @@
  	return v;
        }
  
-@@ -503,12 +499,23 @@ addresses have not been bound by the dyn
+@@ -485,12 +483,23 @@ read_var_value (struct symbol *var, struct frame_info *frame)
        break;
  
      case LOC_BLOCK:
 -      if (overlay_debugging)
 -	VALUE_ADDRESS (v) = symbol_overlayed_address
--	  (BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_BFD_SECTION (var));
+-	  (BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_OBJ_SECTION (var));
 -      else
 -	VALUE_ADDRESS (v) = BLOCK_START (SYMBOL_BLOCK_VALUE (var));
 -      return v;
@@ -1418,7 +1445,7 @@
 +
 +	if (overlay_debugging)
 +	  addr = symbol_overlayed_address
-+	    (BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_BFD_SECTION (var));
++	    (BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_OBJ_SECTION (var));
 +	else
 +	  addr = BLOCK_START (SYMBOL_BLOCK_VALUE (var));
 +	/* ADDR is set here for ALLOCATE_VALUE's CHECK_TYPEDEF for
@@ -1431,8 +1458,8 @@
 +      }
  
      case LOC_REGISTER:
-     case LOC_REGPARM:
-@@ -532,7 +539,6 @@ addresses have not been bound by the dyn
+     case LOC_REGPARM_ADDR:
+@@ -511,7 +520,6 @@ read_var_value (struct symbol *var, struct frame_info *frame)
  	      error (_("Value of register variable not available."));
  
  	    addr = value_as_address (regval);
@@ -1440,7 +1467,7 @@
  	  }
  	else
  	  {
-@@ -572,18 +578,33 @@ addresses have not been bound by the dyn
+@@ -556,18 +564,33 @@ read_var_value (struct symbol *var, struct frame_info *frame)
        break;
  
      case LOC_OPTIMIZED_OUT:
@@ -1480,7 +1507,7 @@
  }
  
  /* Install default attributes for register values.  */
-@@ -620,10 +641,11 @@ struct value *
+@@ -604,10 +627,11 @@ struct value *
  value_from_register (struct type *type, int regnum, struct frame_info *frame)
  {
    struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -1494,7 +1521,7 @@
      {
        /* The ISA/ABI need to something weird when obtaining the
           specified value from this register.  It might need to
-@@ -637,7 +659,7 @@ value_from_register (struct type *type, 
+@@ -621,7 +645,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
        VALUE_FRAME_ID (v) = get_frame_id (frame);
        VALUE_REGNUM (v) = regnum;
        gdbarch_register_to_value (gdbarch,
@@ -1503,8 +1530,10 @@
      }
    else
      {
---- ./gdb/gdbtypes.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/gdbtypes.c	2008-11-08 22:46:45.000000000 +0100
+diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
+index 5b9d0e8..f814ce3 100644
+--- a/gdb/gdbtypes.c
++++ b/gdb/gdbtypes.c
 @@ -38,6 +38,8 @@
  #include "cp-abi.h"
  #include "gdb_assert.h"
@@ -1514,7 +1543,7 @@
  
  /* These variables point to the objects
     representing the predefined C data types.  */
-@@ -471,11 +473,13 @@ make_qualified_type (struct type *type, 
+@@ -478,11 +480,13 @@ make_qualified_type (struct type *type, int new_flags,
    struct type *ntype;
  
    ntype = type;
@@ -1533,7 +1562,7 @@
  
    /* Create a new type instance.  */
    if (storage == NULL)
-@@ -682,16 +686,21 @@ allocate_stub_method (struct type *type)
+@@ -690,16 +694,21 @@ allocate_stub_method (struct type *type)
     RESULT_TYPE, or creating a new type, inheriting the objfile from
     INDEX_TYPE.
  
@@ -1559,8 +1588,8 @@
    if (result_type == NULL)
      {
        result_type = alloc_type (TYPE_OBJFILE (index_type));
-@@ -702,17 +711,33 @@ create_range_type (struct type *result_t
-     TYPE_FLAGS (result_type) |= TYPE_FLAG_TARGET_STUB;
+@@ -710,17 +719,33 @@ create_range_type (struct type *result_type, struct type *index_type,
+     TYPE_TARGET_STUB (result_type) = 1;
    else
      TYPE_LENGTH (result_type) = TYPE_LENGTH (check_typedef (index_type));
 -  TYPE_NFIELDS (result_type) = 2;
@@ -1592,14 +1621,14 @@
 +  TYPE_HIGH_BOUND (result_type) = high_bound;
  
    if (low_bound >= 0)
-     TYPE_FLAGS (result_type) |= TYPE_FLAG_UNSIGNED;
+     TYPE_UNSIGNED (result_type) = 1;
  
 -  return (result_type);
 +  return result_type;
  }
  
  /* Set *LOWP and *HIGHP to the lower and upper bounds of discrete type
-@@ -726,6 +751,9 @@ get_discrete_bounds (struct type *type, 
+@@ -734,6 +759,9 @@ get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
    switch (TYPE_CODE (type))
      {
      case TYPE_CODE_RANGE:
@@ -1609,7 +1638,7 @@
        *lowp = TYPE_LOW_BOUND (type);
        *highp = TYPE_HIGH_BOUND (type);
        return 1;
-@@ -808,17 +836,6 @@ create_array_type (struct type *result_t
+@@ -816,17 +844,6 @@ create_array_type (struct type *result_type,
      }
    TYPE_CODE (result_type) = TYPE_CODE_ARRAY;
    TYPE_TARGET_TYPE (result_type) = element_type;
@@ -1627,7 +1656,7 @@
    TYPE_NFIELDS (result_type) = 1;
    TYPE_FIELDS (result_type) =
      (struct field *) TYPE_ALLOC (result_type, sizeof (struct field));
-@@ -826,9 +843,48 @@ create_array_type (struct type *result_t
+@@ -834,9 +851,48 @@ create_array_type (struct type *result_type,
    TYPE_FIELD_TYPE (result_type, 0) = range_type;
    TYPE_VPTR_FIELDNO (result_type) = -1;
  
@@ -1660,25 +1689,25 @@
 +    }
 +
 +  if (TYPE_DYNAMIC (range_type))
-+    TYPE_FLAGS (result_type) |= TYPE_FLAG_DYNAMIC;
++    TYPE_DYNAMIC (result_type) = 1;
 +
 +  /* Multidimensional dynamic arrays need to have all the outer dimensions
 +     dynamic to update the outer TYPE_TARGET_TYPE pointer with the new type
 +     with statically evaluated dimensions.  */
 +  if (TYPE_DYNAMIC (element_type))
-+    TYPE_FLAGS (result_type) |= TYPE_FLAG_DYNAMIC;
++    TYPE_DYNAMIC (result_type) = 1;
 +
    if (TYPE_LENGTH (result_type) == 0)
--    TYPE_FLAGS (result_type) |= TYPE_FLAG_TARGET_STUB;
+-    TYPE_TARGET_STUB (result_type) = 1;
 +    {
 +      /* The real size will be computed for specific instances by
 +	 CHECK_TYPEDEF.  */
-+      TYPE_FLAGS (result_type) |= TYPE_FLAG_TARGET_STUB;
++      TYPE_TARGET_STUB (result_type) = 1;
 +    }
  
    return (result_type);
  }
-@@ -1377,6 +1433,65 @@ stub_noname_complaint (void)
+@@ -1380,6 +1436,65 @@ stub_noname_complaint (void)
    complaint (&symfile_complaints, _("stub type has NULL name"));
  }
  
@@ -1744,7 +1773,7 @@
  /* Added by Bryan Boreham, Kewill, Sun Sep 17 18:07:17 1989.
  
     If this is a stubbed struct (i.e. declared as struct foo *), see if
-@@ -1393,7 +1508,8 @@ stub_noname_complaint (void)
+@@ -1396,7 +1511,8 @@ stub_noname_complaint (void)
  /* Find the real type of TYPE.  This function returns the real type,
     after removing all layers of typedefs and completing opaque or stub
     types.  Completion changes the TYPE argument, but stripping of
@@ -1754,7 +1783,7 @@
  
  struct type *
  check_typedef (struct type *type)
-@@ -1505,34 +1621,87 @@ check_typedef (struct type *type)
+@@ -1506,34 +1622,87 @@ check_typedef (struct type *type)
          }
      }
  
@@ -1816,7 +1845,7 @@
 +	     meanint the count (not the high bound) into a regular bound.  */
 +	  if (TYPE_RANGE_HIGH_BOUND_IS_COUNT (type))
 +	    {
-+	      TYPE_FLAGS (type) &= ~TYPE_FLAG_RANGE_HIGH_BOUND_IS_COUNT;
++	      TYPE_RANGE_HIGH_BOUND_IS_COUNT (type) = 0;
 +	      TYPE_HIGH_BOUND (type) = TYPE_LOW_BOUND (type)
 +				       + TYPE_HIGH_BOUND (type) - 1;
 +	    }
@@ -1857,14 +1886,14 @@
 -	  TYPE_LENGTH (type) = nb_elements * TYPE_LENGTH (target_type);
 +	     number of elements and the target type's length.  */
 +	  TYPE_LENGTH (type) = type_length_get (type, target_type, 0);
- 	  TYPE_FLAGS (type) &= ~TYPE_FLAG_TARGET_STUB;
+ 	  TYPE_TARGET_STUB (type) = 0;
  	}
        else if (TYPE_CODE (type) == TYPE_CODE_RANGE)
-@@ -1540,9 +1709,12 @@ check_typedef (struct type *type)
+@@ -1541,9 +1710,12 @@ check_typedef (struct type *type)
  	  TYPE_LENGTH (type) = TYPE_LENGTH (target_type);
- 	  TYPE_FLAGS (type) &= ~TYPE_FLAG_TARGET_STUB;
+ 	  TYPE_TARGET_STUB (type) = 0;
  	}
-+      TYPE_FLAGS (type) &= ~TYPE_FLAG_DYNAMIC;
++      TYPE_DYNAMIC (type) = 0;
      }
 +
    /* Cache TYPE_LENGTH for future use.  */
@@ -1873,28 +1902,34 @@
    return type;
  }
  
---- ./gdb/gdbtypes.h	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/gdbtypes.h	2008-11-08 22:39:57.000000000 +0100
-@@ -295,6 +295,16 @@ enum type_code
- #define TYPE_FLAG_NOTTEXT	(1 << 17)
- #define TYPE_NOTTEXT(t)		(TYPE_FLAGS (t) & TYPE_FLAG_NOTTEXT)
+diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
+index 333eb31..a925dac 100644
+--- a/gdb/gdbtypes.h
++++ b/gdb/gdbtypes.h
+@@ -209,6 +209,11 @@ enum type_instance_flag_value
+ 
+ #define TYPE_TARGET_STUB(t)	(TYPE_MAIN_TYPE (t)->flag_target_stub)
  
 +/* Type needs to be evaluated on each CHECK_TYPEDEF and its results must not be
 +   sticky.  Used for TYPE_RANGE_BOUND_IS_DWARF_BLOCK.  */
 +
-+#define TYPE_FLAG_DYNAMIC	(1 << 18)
-+#define TYPE_DYNAMIC(t)		(TYPE_FLAGS (t) & TYPE_FLAG_DYNAMIC)
-+
-+/* Is HIGH_BOUND a low-bound relative count (1) or the high bound itself (0)?  */
-+#define TYPE_FLAG_RANGE_HIGH_BOUND_IS_COUNT	(1 << 19)
-+#define TYPE_RANGE_HIGH_BOUND_IS_COUNT(t)	(TYPE_FLAGS (t) & TYPE_FLAG_RANGE_HIGH_BOUND_IS_COUNT)
++#define TYPE_DYNAMIC(t)		(TYPE_MAIN_TYPE (t)->flag_dynamic)
 +
- /* Determine which field of the union main_type.fields[x].loc is used.  */
+ /* Static type.  If this is set, the corresponding type had 
+  * a static modifier.
+  * Note: This may be unnecessary, since static data members
+@@ -352,6 +357,8 @@ struct main_type
+   unsigned int flag_stub_supported : 1;
+   unsigned int flag_nottext : 1;
+   unsigned int flag_fixed_instance : 1;
++  unsigned int flag_dynamic : 1;
++  unsigned int flag_range_high_bound_is_count : 1;
+ 
+   /* Number of fields described for this type.  This field appears at
+      this location because it packs nicely here.  */
+@@ -414,6 +421,15 @@ struct main_type
  
- enum field_loc_kind
-@@ -376,6 +386,15 @@ struct main_type
- 
-   short vptr_fieldno;
+   struct type *target_type;
  
 +  /* For DW_AT_data_location.  FIXME: Support also its constant form.  */
 +  struct dwarf2_locexpr_baton *data_location;
@@ -1908,7 +1943,7 @@
    /* For structure and union types, a description of each field.
       For set and pascal array types, there is one "field",
       whose type is the domain type of the set or array.
-@@ -763,9 +782,9 @@ extern void allocate_cplus_struct_type (
+@@ -795,9 +811,9 @@ extern void allocate_cplus_struct_type (struct type *);
  #define TYPE_POINTER_TYPE(thistype) (thistype)->pointer_type
  #define TYPE_REFERENCE_TYPE(thistype) (thistype)->reference_type
  #define TYPE_CHAIN(thistype) (thistype)->chain
@@ -1921,10 +1956,10 @@
     calls check_typedef, TYPE_LENGTH (VALUE_TYPE (X)) is safe.  */
  #define TYPE_LENGTH(thistype) (thistype)->length
  #define TYPE_OBJFILE(thistype) TYPE_MAIN_TYPE(thistype)->objfile
-@@ -777,23 +796,49 @@ extern void allocate_cplus_struct_type (
+@@ -807,23 +823,53 @@ extern void allocate_cplus_struct_type (struct type *);
+ #define TYPE_NFIELDS(thistype) TYPE_MAIN_TYPE(thistype)->nfields
  #define TYPE_FIELDS(thistype) TYPE_MAIN_TYPE(thistype)->fields
  #define TYPE_TEMPLATE_ARGS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->template_args
- #define TYPE_INSTANTIATIONS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->instantiations
 +#define TYPE_DATA_LOCATION(thistype) TYPE_MAIN_TYPE (thistype)->data_location
 +#define TYPE_ALLOCATED(thistype) TYPE_MAIN_TYPE (thistype)->allocated
 +#define TYPE_ASSOCIATED(thistype) TYPE_MAIN_TYPE (thistype)->associated
@@ -1935,13 +1970,14 @@
 +  (TYPE_FIELD_BITPOS (range_type, 2) = (n))
  #define TYPE_LOW_BOUND(range_type) TYPE_FIELD_BITPOS (range_type, 0)
  #define TYPE_HIGH_BOUND(range_type) TYPE_FIELD_BITPOS (range_type, 1)
-+#define TYPE_BYTE_STRIDE(range_type) \
-+  (TYPE_NFIELDS (range_type) < 3 ? 0 : TYPE_FIELD_BITPOS (range_type, 2))
- 
+-
 -/* Moto-specific stuff for FORTRAN arrays */
 -
 -#define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype) \
 -   (TYPE_FIELD_ARTIFICIAL((TYPE_FIELD_TYPE((arraytype),0)),1))
++#define TYPE_BYTE_STRIDE(range_type) \
++  (TYPE_NFIELDS (range_type) < 3 ? 0 : TYPE_FIELD_BITPOS (range_type, 2))
++
 +/* Whether we should use TYPE_FIELD_DWARF_BLOCK (and not TYPE_FIELD_BITPOS).  */
 +#define TYPE_RANGE_BOUND_IS_DWARF_BLOCK(range_type, fieldno) \
 +  (TYPE_FIELD_LOC_KIND (range_type, fieldno) == FIELD_LOC_KIND_DWARF_BLOCK)
@@ -1952,6 +1988,10 @@
 +#define TYPE_ARRAY_BOUND_IS_DWARF_BLOCK(array_type, fieldno) \
 +  TYPE_RANGE_BOUND_IS_DWARF_BLOCK (TYPE_INDEX_TYPE (array_type), fieldno)
 +
++/* Is HIGH_BOUND a low-bound relative count (1) or the high bound itself (0)?  */
++#define TYPE_RANGE_HIGH_BOUND_IS_COUNT(range_type) \
++  (TYPE_MAIN_TYPE (range_type)->flag_range_high_bound_is_count)
++
 +/* Unbound arrays, such as GCC array[]; at end of struct.  */
 +#define TYPE_RANGE_LOWER_BOUND_IS_UNDEFINED(rangetype) \
 +   TYPE_FIELD_ARTIFICIAL((rangetype),0)
@@ -1980,7 +2020,7 @@
  
  /* C++ */
  
-@@ -1256,12 +1301,26 @@ extern struct type *make_function_type (
+@@ -1162,12 +1208,26 @@ extern struct type *make_function_type (struct type *, struct type **);
  
  extern struct type *lookup_function_type (struct type *);
  
@@ -2007,17 +2047,19 @@
  extern struct type *create_string_type (struct type *, struct type *);
  
  extern struct type *create_set_type (struct type *, struct type *);
---- ./gdb/printcmd.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/printcmd.c	2008-11-08 22:49:51.000000000 +0100
-@@ -42,6 +42,7 @@
- #include "block.h"
+diff --git a/gdb/printcmd.c b/gdb/printcmd.c
+index 6d6b915..2ab5a56 100644
+--- a/gdb/printcmd.c
++++ b/gdb/printcmd.c
+@@ -43,6 +43,7 @@
  #include "disasm.h"
  #include "dfp.h"
+ #include "valprint.h"
 +#include "exceptions.h"
  
  #ifdef TUI
  #include "tui/tui.h"		/* For tui_active et.al.   */
-@@ -888,6 +889,11 @@ print_command_1 (char *exp, int inspect,
+@@ -876,6 +877,11 @@ print_command_1 (char *exp, int inspect, int voidprint)
    else
      val = access_value_history (0);
  
@@ -2029,7 +2071,7 @@
    if (voidprint || (val && value_type (val) &&
  		    TYPE_CODE (value_type (val)) != TYPE_CODE_VOID))
      {
-@@ -1716,15 +1722,26 @@ disable_display_command (char *args, int
+@@ -1731,17 +1737,30 @@ disable_display_command (char *args, int from_tty)
  
  
  /* Print the value in stack frame FRAME of a variable specified by a
@@ -2043,10 +2085,12 @@
 +			 struct ui_file *stream)
  {
 -  struct value *val = read_var_value (var, frame);
+-  struct value_print_options opts;
 +  struct value *val = NULL;	/* A false GCC warning.  */
 +  struct gdb_exception e;
  
--  value_print (val, stream, 0, Val_pretty_default);
+-  get_user_print_options (&opts);
+-  value_print (val, stream, &opts);
 +  TRY_CATCH (e, RETURN_MASK_ERROR)
 +    {
 +      val = read_var_value (var, frame);
@@ -2055,15 +2099,21 @@
 +    exception_print (stream, e);
 +  else
 +    {
-+      value_print (val, stream, 0, Val_pretty_default);
++      struct value_print_options opts;
++
++      get_user_print_options (&opts);
++      value_print (val, stream, &opts);
++
 +      fputc_filtered ('\n', stream);
 +    }
  }
  
  static void
---- ./gdb/stack.c	2008-03-17 16:06:24.000000000 +0100
-+++ ./gdb/stack.c	2008-11-08 22:48:28.000000000 +0100
-@@ -1381,8 +1381,7 @@ print_block_frame_locals (struct block *
+diff --git a/gdb/stack.c b/gdb/stack.c
+index 3c1019b..79afba4 100644
+--- a/gdb/stack.c
++++ b/gdb/stack.c
+@@ -1378,8 +1378,7 @@ print_block_frame_locals (struct block *b, struct frame_info *frame,
  	    fputs_filtered ("\t", stream);
  	  fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
  	  fputs_filtered (" = ", stream);
@@ -2073,18 +2123,21 @@
  	  break;
  
  	default:
-@@ -1598,8 +1597,7 @@ print_frame_arg_vars (struct frame_info 
+@@ -1591,8 +1590,7 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
  
- 	  sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
- 				b, VAR_DOMAIN, NULL, NULL);
+ 	  sym2 = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
+ 				b, VAR_DOMAIN, NULL);
 -	  print_variable_value (sym2, frame, stream);
 -	  fprintf_filtered (stream, "\n");
 +	  print_variable_value_nl (sym2, frame, stream);
- 	  break;
+ 	}
+     }
  
- 	default:
---- ./gdb/testsuite/gdb.base/vla-overflow.c	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.base/vla-overflow.c	2008-11-08 22:39:57.000000000 +0100
+diff --git a/gdb/testsuite/gdb.base/vla-overflow.c b/gdb/testsuite/gdb.base/vla-overflow.c
+new file mode 100644
+index 0000000..c5d5ee0
+--- /dev/null
++++ b/gdb/testsuite/gdb.base/vla-overflow.c
 @@ -0,0 +1,30 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -2116,8 +2169,11 @@
 +
 +  return 0;
 +}
---- ./gdb/testsuite/gdb.base/vla-overflow.exp	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.base/vla-overflow.exp	2008-11-08 22:39:57.000000000 +0100
+diff --git a/gdb/testsuite/gdb.base/vla-overflow.exp b/gdb/testsuite/gdb.base/vla-overflow.exp
+new file mode 100644
+index 0000000..7203a48
+--- /dev/null
++++ b/gdb/testsuite/gdb.base/vla-overflow.exp
 @@ -0,0 +1,108 @@
 +# Copyright 2008 Free Software Foundation, Inc.
 +
@@ -2227,8 +2283,11 @@
 +gdb_test "bt" "in \[^ \]*abort \\(.* in main \\(.*" "Backtrace after abort()"
 +
 +verbose -log "kb_found in bt after abort() = [expr [memory_v_pages_get] * $pagesize / 1024]"
---- ./gdb/testsuite/gdb.base/vla.c	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.base/vla.c	2008-11-08 22:39:57.000000000 +0100
+diff --git a/gdb/testsuite/gdb.base/vla.c b/gdb/testsuite/gdb.base/vla.c
+new file mode 100644
+index 0000000..e1f3ed1
+--- /dev/null
++++ b/gdb/testsuite/gdb.base/vla.c
 @@ -0,0 +1,55 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -2285,8 +2344,11 @@
 +  foo (78);
 +  return 0;
 +}
---- ./gdb/testsuite/gdb.base/vla.exp	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.base/vla.exp	2008-11-08 22:39:57.000000000 +0100
+diff --git a/gdb/testsuite/gdb.base/vla.exp b/gdb/testsuite/gdb.base/vla.exp
+new file mode 100644
+index 0000000..5da7378
+--- /dev/null
++++ b/gdb/testsuite/gdb.base/vla.exp
 @@ -0,0 +1,62 @@
 +# Copyright 2008 Free Software Foundation, Inc.
 +
@@ -2350,8 +2412,11 @@
 +gdb_test "p temp1" " = '1' <repeats 78 times>" "second: print temp1"
 +gdb_test "p temp2" " = '2' <repeats 78 times>" "second: print temp2"
 +gdb_test "p temp3" " = '3' <repeats 48 times>" "second: print temp3"
---- ./gdb/testsuite/gdb.dwarf2/dw2-framebase-missing-func.S	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.dwarf2/dw2-framebase-missing-func.S	2008-11-08 22:46:45.000000000 +0100
+diff --git a/gdb/testsuite/gdb.dwarf2/dw2-framebase-missing-func.S b/gdb/testsuite/gdb.dwarf2/dw2-framebase-missing-func.S
+new file mode 100644
+index 0000000..aae5b56
+--- /dev/null
++++ b/gdb/testsuite/gdb.dwarf2/dw2-framebase-missing-func.S
 @@ -0,0 +1,336 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -2689,8 +2754,11 @@
 +	.string	"short int"
 +	.ident	"GCC: (GNU) 4.3.2 20081007 (Red Hat 4.3.2-6)"
 +	.section	.note.GNU-stack,"", at progbits
---- ./gdb/testsuite/gdb.dwarf2/dw2-framebase-missing-main.c	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.dwarf2/dw2-framebase-missing-main.c	2008-11-08 22:46:45.000000000 +0100
+diff --git a/gdb/testsuite/gdb.dwarf2/dw2-framebase-missing-main.c b/gdb/testsuite/gdb.dwarf2/dw2-framebase-missing-main.c
+new file mode 100644
+index 0000000..d4ad8eb
+--- /dev/null
++++ b/gdb/testsuite/gdb.dwarf2/dw2-framebase-missing-main.c
 @@ -0,0 +1,26 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -2718,8 +2786,11 @@
 +  func ();
 +  return 0;
 +}
---- ./gdb/testsuite/gdb.dwarf2/dw2-framebase-missing.exp	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.dwarf2/dw2-framebase-missing.exp	2008-11-08 22:46:45.000000000 +0100
+diff --git a/gdb/testsuite/gdb.dwarf2/dw2-framebase-missing.exp b/gdb/testsuite/gdb.dwarf2/dw2-framebase-missing.exp
+new file mode 100644
+index 0000000..8d047bb
+--- /dev/null
++++ b/gdb/testsuite/gdb.dwarf2/dw2-framebase-missing.exp
 @@ -0,0 +1,83 @@
 +# Copyright 2008 Free Software Foundation, Inc.
 +
@@ -2804,8 +2875,11 @@
 +
 +# `abort' can get expressed as `*__GI_abort'.
 +gdb_test "bt full" "in \[^ \]*abort \\(.*in func \\(.*\ti = Could not find the frame base for \"func\".\r\n.*in main \\(.*" "Backtrace after abort()"
---- ./gdb/testsuite/gdb.dwarf2/dw2-stripped.c	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.dwarf2/dw2-stripped.c	2008-11-08 22:39:57.000000000 +0100
+diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stripped.c b/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
+new file mode 100644
+index 0000000..1f02d90
+--- /dev/null
++++ b/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
 @@ -0,0 +1,42 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -2849,8 +2923,11 @@
 +  func1 (1, 2);
 +  return 0;
 +}
---- ./gdb/testsuite/gdb.dwarf2/dw2-stripped.exp	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.dwarf2/dw2-stripped.exp	2008-11-08 22:39:57.000000000 +0100
+diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp b/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
+new file mode 100644
+index 0000000..1c6e84a
+--- /dev/null
++++ b/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
 @@ -0,0 +1,79 @@
 +# Copyright 2006 Free Software Foundation, Inc.
 +
@@ -2931,8 +3008,11 @@
 +gdb_test "step" \
 +         "func.* \\(.*\\) at .*" \
 +         "step"
---- ./gdb/testsuite/gdb.fortran/dynamic.exp	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.fortran/dynamic.exp	2008-11-08 22:39:57.000000000 +0100
+diff --git a/gdb/testsuite/gdb.fortran/dynamic.exp b/gdb/testsuite/gdb.fortran/dynamic.exp
+new file mode 100644
+index 0000000..91f47d7
+--- /dev/null
++++ b/gdb/testsuite/gdb.fortran/dynamic.exp
 @@ -0,0 +1,141 @@
 +# Copyright 2007 Free Software Foundation, Inc.
 +
@@ -3075,8 +3155,11 @@
 +gdb_test "p vart(3,8)" "\\$\[0-9\]* = 9"
 +# maps to foo::vary(1,3)
 +gdb_test "p vart(2,9)" "\\$\[0-9\]* = 10"
---- ./gdb/testsuite/gdb.fortran/dynamic.f90	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.fortran/dynamic.f90	2008-11-08 22:39:57.000000000 +0100
+diff --git a/gdb/testsuite/gdb.fortran/dynamic.f90 b/gdb/testsuite/gdb.fortran/dynamic.f90
+new file mode 100644
+index 0000000..9dd7ce0
+--- /dev/null
++++ b/gdb/testsuite/gdb.fortran/dynamic.f90
 @@ -0,0 +1,97 @@
 +! Copyright 2007 Free Software Foundation, Inc.
 +!
@@ -3175,8 +3258,11 @@
 +  if (x (1, 1) .ne. 8 .or. x (2, 2) .ne. 9 .or. x (1, 2) .ne. 4) call abort
 +  if (x (3, 1) .ne. 10) call abort
 +end
---- ./gdb/testsuite/gdb.fortran/string.exp	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.fortran/string.exp	2008-11-08 22:39:57.000000000 +0100
+diff --git a/gdb/testsuite/gdb.fortran/string.exp b/gdb/testsuite/gdb.fortran/string.exp
+new file mode 100644
+index 0000000..b1120c3
+--- /dev/null
++++ b/gdb/testsuite/gdb.fortran/string.exp
 @@ -0,0 +1,59 @@
 +# Copyright 2008 Free Software Foundation, Inc.
 +
@@ -3237,8 +3323,11 @@
 +gdb_continue_to_breakpoint "var-finish"
 +gdb_test "p e" "\\$\[0-9\]* = 'e   '" "p e re-set"
 +gdb_test "p f" "\\$\[0-9\]* = \\(\\( 'f   ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   '\\) \\( 'f2  ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   '\\) \\( 'f   ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   ', 'f   '\\) \\)" "p *f re-set"
---- ./gdb/testsuite/gdb.fortran/string.f90	1970-01-01 01:00:00.000000000 +0100
-+++ ./gdb/testsuite/gdb.fortran/string.f90	2008-11-08 22:39:57.000000000 +0100
+diff --git a/gdb/testsuite/gdb.fortran/string.f90 b/gdb/testsuite/gdb.fortran/string.f90
+new file mode 100644
+index 0000000..66cd98f
+--- /dev/null
++++ b/gdb/testsuite/gdb.fortran/string.f90
 @@ -0,0 +1,37 @@
 +! Copyright 2008 Free Software Foundation, Inc.
 +!
@@ -3277,17 +3366,19 @@
 +  h = 'h'
 +  call foo (g, h)
 +end
---- ./gdb/typeprint.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/typeprint.c	2008-11-08 22:39:57.000000000 +0100
-@@ -33,6 +33,7 @@
- #include "cp-abi.h"
+diff --git a/gdb/typeprint.c b/gdb/typeprint.c
+index edf87cd..174fb58 100644
+--- a/gdb/typeprint.c
++++ b/gdb/typeprint.c
+@@ -34,6 +34,7 @@
  #include "typeprint.h"
  #include "gdb_string.h"
+ #include "valprint.h"
 +#include "dwarf2loc.h"
  #include <errno.h>
  
- /* For real-type printing in whatis_exp() */
-@@ -102,6 +103,9 @@ void
+ extern void _initialize_typeprint (void);
+@@ -75,6 +76,9 @@ void
  type_print (struct type *type, char *varstring, struct ui_file *stream,
  	    int show)
  {
@@ -3297,7 +3388,7 @@
    LA_PRINT_TYPE (type, varstring, stream, show, 0);
  }
  
-@@ -113,7 +117,8 @@ whatis_exp (char *exp, int show)
+@@ -86,7 +90,8 @@ whatis_exp (char *exp, int show)
  {
    struct expression *expr;
    struct value *val;
@@ -3307,7 +3398,7 @@
    struct type *real_type = NULL;
    struct type *type;
    int full = 0;
-@@ -123,12 +128,13 @@ whatis_exp (char *exp, int show)
+@@ -97,12 +102,13 @@ whatis_exp (char *exp, int show)
    if (exp)
      {
        expr = parse_expression (exp);
@@ -3321,8 +3412,8 @@
 +  object_address_set (VALUE_ADDRESS (val));
    type = value_type (val);
  
-   if (objectprint)
-@@ -164,8 +170,7 @@ whatis_exp (char *exp, int show)
+   get_user_print_options (&opts);
+@@ -139,8 +145,7 @@ whatis_exp (char *exp, int show)
    type_print (type, "", gdb_stdout, show);
    printf_filtered ("\n");
  
@@ -3332,17 +3423,11 @@
  }
  
  static void
---- ./gdb/valarith.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/valarith.c	2008-11-08 22:39:57.000000000 +0100
-@@ -39,7 +39,6 @@
- #define TRUNCATION_TOWARDS_ZERO ((-5 / 2) == -2)
- #endif
- 
--static struct value *value_subscripted_rvalue (struct value *, struct value *, int);
- static struct type *unop_result_type (enum exp_opcode op, struct type *type1);
- static struct type *binop_result_type (enum exp_opcode op, struct type *type1,
- 				       struct type *type2);
-@@ -180,9 +179,9 @@ an integer nor a pointer of the same typ
+diff --git a/gdb/valarith.c b/gdb/valarith.c
+index 59f67d3..f5517ae 100644
+--- a/gdb/valarith.c
++++ b/gdb/valarith.c
+@@ -164,9 +164,9 @@ an integer nor a pointer of the same type."));
  struct value *
  value_subscript (struct value *array, struct value *idx)
  {
@@ -3353,7 +3438,7 @@
  
    array = coerce_ref (array);
    tarray = check_typedef (value_type (array));
-@@ -195,13 +194,26 @@ value_subscript (struct value *array, st
+@@ -179,13 +179,26 @@ value_subscript (struct value *array, struct value *idx)
        get_discrete_bounds (range_type, &lowerbound, &upperbound);
  
        if (VALUE_LVAL (array) != lval_memory)
@@ -3383,30 +3468,27 @@
  	  /* Emit warning unless we have an array of unknown size.
  	     An array of unknown size has lowerbound 0 and upperbound -1.  */
  	  if (upperbound > -1)
-@@ -210,12 +222,7 @@ value_subscript (struct value *array, st
+@@ -194,53 +207,62 @@ value_subscript (struct value *array, struct value *idx)
  	  c_style = 1;
  	}
  
 -      if (lowerbound != 0)
 -	{
--	  bound = value_from_longest (builtin_type_int, (LONGEST) lowerbound);
--	  idx = value_sub (idx, bound);
+-	  bound = value_from_longest (value_type (idx), (LONGEST) lowerbound);
+-	  idx = value_binop (idx, bound, BINOP_SUB);
 -	}
 -
 +      index -= lowerbound;
        array = value_coerce_array (array);
      }
  
-@@ -248,43 +255,57 @@ value_subscript (struct value *array, st
-     }
- 
    if (c_style)
--    return value_ind (value_add (array, idx));
+-    return value_ind (value_ptradd (array, idx));
 +    {
 +      struct value *idx;
 +
 +      idx = value_from_longest (builtin_type_int32, index);
-+      return value_ind (value_add (array, idx));
++      return value_ind (value_ptradd (array, idx));
 +    }
    else
      error (_("not an array or string"));
@@ -3421,9 +3503,8 @@
 +   element, it must be expressed in bytes (therefore multiplied by
 +   check_typedef (TYPE_TARGET_TYPE (array_type)).  */
  
--static struct value *
+ struct value *
 -value_subscripted_rvalue (struct value *array, struct value *idx, int lowerbound)
-+struct value *
 +value_subscripted_rvalue (struct value *array, CORE_ADDR offset)
  {
    struct type *array_type = check_typedef (value_type (array));
@@ -3440,7 +3521,7 @@
 +     is shorter than the possibly accessed element offset.  */
  
    v = allocate_value (elt_type);
-   if (value_lazy (array))
+   if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
      set_value_lazy (v, 1);
    else
 -    memcpy (value_contents_writeable (v),
@@ -3468,18 +3549,20 @@
 +  set_value_offset (v, value_offset (array) + offset);
    return v;
  }
- 
---- ./gdb/valops.c	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/valops.c	2008-11-08 22:39:57.000000000 +0100
-@@ -37,6 +37,7 @@
- #include "dictionary.h"
+ 
+diff --git a/gdb/valops.c b/gdb/valops.c
+index 05e5351..83f15a8 100644
+--- a/gdb/valops.c
++++ b/gdb/valops.c
+@@ -38,6 +38,7 @@
  #include "cp-support.h"
  #include "dfp.h"
+ #include "user-regs.h"
 +#include "dwarf2loc.h"
  
  #include <errno.h>
  #include "gdb_string.h"
-@@ -504,6 +505,49 @@ value_one (struct type *type, enum lval_
+@@ -568,6 +569,49 @@ value_one (struct type *type, enum lval_type lv)
    return val;
  }
  
@@ -3529,39 +3612,41 @@
  /* Return a value with type TYPE located at ADDR.
  
     Call value_at only if the data needs to be fetched immediately;
-@@ -570,12 +614,21 @@ value_at_lazy (struct type *type, CORE_A
- int
- value_fetch_lazy (struct value *val)
- {
--  CORE_ADDR addr = VALUE_ADDRESS (val) + value_offset (val);
--  int length = TYPE_LENGTH (value_enclosing_type (val));
-+  CORE_ADDR addr;
-+  int length;
- 
--  struct type *type = value_type (val);
--  if (length)
--    read_memory (addr, value_contents_all_raw (val), length);
-+  addr = VALUE_ADDRESS (val);
-+  if (object_address_get_data (value_type (val), &addr))
-+    {
-+      struct type *type = value_enclosing_type (val);
-+      int length = TYPE_LENGTH (check_typedef (type));
-+
-+      if (length)
+@@ -637,11 +681,21 @@ value_fetch_lazy (struct value *val)
+   allocate_value_contents (val);
+   if (VALUE_LVAL (val) == lval_memory)
+     {
+-      CORE_ADDR addr = VALUE_ADDRESS (val) + value_offset (val);
+-      int length = TYPE_LENGTH (check_typedef (value_enclosing_type (val)));
++      CORE_ADDR addr;
++      int length;
+ 
+-      if (length)
+-	read_memory (addr, value_contents_all_raw (val), length);
++      addr = VALUE_ADDRESS (val);
++      if (object_address_get_data (value_type (val), &addr))
 +	{
-+	  addr += value_offset (val);
-+	  read_memory (addr, value_contents_all_raw (val), length);
++	  struct type *type = value_enclosing_type (val);
++	  int length = TYPE_LENGTH (check_typedef (type));
++
++	  if (length)
++	    {
++	      addr += value_offset (val);
++	      read_memory (addr, value_contents_all_raw (val), length);
++	    }
 +	}
-+    }
- 
-   set_value_lazy (val, 0);
-   return 0;
-@@ -887,12 +940,17 @@ struct value *
+     }
+   else if (VALUE_LVAL (val) == lval_register)
+     {
+@@ -1085,6 +1139,7 @@ struct value *
  value_coerce_array (struct value *arg1)
  {
    struct type *type = check_typedef (value_type (arg1));
 +  CORE_ADDR address;
  
+   /* If the user tries to do something requiring a pointer with an
+      array that has not yet been pushed to the target, then this would
+@@ -1094,8 +1149,12 @@ value_coerce_array (struct value *arg1)
    if (VALUE_LVAL (arg1) != lval_memory)
      error (_("Attempt to take address of value not located in memory."));
  
@@ -3575,9 +3660,11 @@
  }
  
  /* Given a value which is a function, return a value which is a pointer
---- ./gdb/value.h	2008-11-08 22:46:06.000000000 +0100
-+++ ./gdb/value.h	2008-11-08 22:46:45.000000000 +0100
-@@ -284,6 +284,10 @@ extern struct value *value_from_decfloat
+diff --git a/gdb/value.h b/gdb/value.h
+index a882004..f6aece1 100644
+--- a/gdb/value.h
++++ b/gdb/value.h
+@@ -286,6 +286,10 @@ extern struct value *value_from_decfloat (struct type *type,
  					  const gdb_byte *decbytes);
  extern struct value *value_from_string (char *string);
  
@@ -3588,9 +3675,9 @@
  extern struct value *value_at (struct type *type, CORE_ADDR addr);
  extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr);
  
-@@ -522,9 +526,9 @@ extern int common_val_print (struct valu
- extern int val_print_string (CORE_ADDR addr, int len, int width,
- 			     struct ui_file *stream);
+@@ -557,9 +561,9 @@ extern int val_print_string (CORE_ADDR addr, int len, int width,
+ 			     struct ui_file *stream,
+ 			     const struct value_print_options *options);
  
 -extern void print_variable_value (struct symbol *var,
 -				  struct frame_info *frame,
@@ -3599,12 +3686,13 @@
 +				     struct frame_info *frame,
 +				     struct ui_file *stream);
  
- extern int check_field (struct value *, const char *);
+ extern int check_field (struct type *, const char *);
  
-@@ -554,4 +558,7 @@ extern struct value *value_allocate_spac
+@@ -590,5 +594,7 @@ extern struct value *value_allocate_space_in_inferior (int);
  
  extern struct value *value_of_local (const char *name, int complain);
  
+-extern struct value * value_subscripted_rvalue (struct value *array, struct value *idx, int lowerbound);
 +extern struct value *value_subscripted_rvalue (struct value *array,
 +					       CORE_ADDR offset);
 +

gdb-6.8-bz466901-backtrace-full-prelinked.patch:

Index: gdb-6.8-bz466901-backtrace-full-prelinked.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.8-bz466901-backtrace-full-prelinked.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.8-bz466901-backtrace-full-prelinked.patch	9 Nov 2008 14:39:26 -0000	1.2
+++ gdb-6.8-bz466901-backtrace-full-prelinked.patch	14 Dec 2008 14:05:18 -0000	1.3
@@ -1,24 +1,24 @@
 Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
 
---- ./gdb/dwarf2loc.c-orig	2008-11-06 22:17:45.000000000 +0100
-+++ ./gdb/dwarf2loc.c	2008-11-06 22:18:01.000000000 +0100
-@@ -57,9 +57,12 @@ find_location_expression (struct dwarf2_
+Index: gdb-6.8.50.20081128/gdb/dwarf2loc.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/dwarf2loc.c	2008-12-08 11:00:45.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/dwarf2loc.c	2008-12-08 18:02:49.000000000 +0100
+@@ -55,7 +55,9 @@ find_location_expression (struct dwarf2_
+   CORE_ADDR low, high;
+   gdb_byte *loc_ptr, *buf_end;
    int length;
-   unsigned int addr_size = gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT;
+-  struct objfile *objfile = dwarf2_per_cu_objfile (baton->per_cu);
++  struct objfile *objfile1 = dwarf2_per_cu_objfile (baton->per_cu);
++  struct objfile *objfile = objfile1->separate_debug_objfile
++			    ? objfile1->separate_debug_objfile : objfile1;
+   struct gdbarch *gdbarch = get_objfile_arch (objfile);
+   unsigned int addr_size = dwarf2_per_cu_addr_size (baton->per_cu);
    CORE_ADDR base_mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1));
-+  struct objfile *objfile = (baton->objfile->separate_debug_objfile
-+                             ? baton->objfile->separate_debug_objfile
-+			     : baton->objfile);
-   /* Adjust base_address for relocatable objects.  */
--  CORE_ADDR base_offset = ANOFFSET (baton->objfile->section_offsets,
--				    SECT_OFF_TEXT (baton->objfile));
-+  CORE_ADDR base_offset = ANOFFSET (objfile->section_offsets,
-+				    SECT_OFF_TEXT (objfile));
-   CORE_ADDR base_address = baton->base_address + base_offset;
- 
-   loc_ptr = baton->data;
---- /dev/null	2008-11-06 15:02:28.406299691 +0100
-+++ gdb-6.8/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp	2008-11-06 23:11:02.000000000 +0100
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp	2008-12-08 18:00:43.000000000 +0100
 @@ -0,0 +1,102 @@
 +# Copyright 2008 Free Software Foundation, Inc.
 +
@@ -122,8 +122,10 @@
 +
 +# `abort' can get expressed as `*__GI_abort'.
 +gdb_test "bt full" "in \[^ \]*abort \\(.*in func \\(.*\ti = -?\[0-9\].*in main \\(.*" "Backtrace after abort()"
---- /dev/null	2008-11-06 15:02:28.406299691 +0100
-+++ gdb-6.8/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c	2008-11-06 22:59:05.000000000 +0100
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c	2008-12-08 18:00:43.000000000 +0100
 @@ -0,0 +1,26 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -151,8 +153,10 @@
 +  func ();
 +  return 0;
 +}
---- /dev/null	2008-11-06 15:02:28.406299691 +0100
-+++ gdb-6.8/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S	2008-11-06 22:49:50.000000000 +0100
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S	2008-12-08 18:00:43.000000000 +0100
 @@ -0,0 +1,328 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +

gdb-6.8-constant-watchpoints.patch:

Index: gdb-6.8-constant-watchpoints.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.8-constant-watchpoints.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.8-constant-watchpoints.patch	14 Jul 2008 09:09:04 -0000	1.3
+++ gdb-6.8-constant-watchpoints.patch	14 Dec 2008 14:05:18 -0000	1.4
@@ -18,11 +18,11 @@
 	gdb.base/watchpoint.c (global_ptr_ptr): New variable.
 	(func4): New testing code for GLOBAL_PTR_PTR.
 
-Index: gdb-6.8/gdb/breakpoint.c
+Index: gdb-6.8.50.20081128/gdb/breakpoint.c
 ===================================================================
---- gdb-6.8.orig/gdb/breakpoint.c	2008-07-14 10:28:30.000000000 +0200
-+++ gdb-6.8/gdb/breakpoint.c	2008-07-14 10:28:36.000000000 +0200
-@@ -846,7 +846,15 @@ is_hardware_watchpoint (struct breakpoin
+--- gdb-6.8.50.20081128.orig/gdb/breakpoint.c	2008-12-01 16:13:12.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/breakpoint.c	2008-12-03 00:00:08.000000000 +0100
+@@ -770,7 +770,15 @@ is_hardware_watchpoint (struct breakpoin
     If VAL_CHAIN is non-NULL, *VAL_CHAIN will be released from the
     value chain.  The caller must free the values individually.  If
     VAL_CHAIN is NULL, all generated values will be left on the value
@@ -39,7 +39,7 @@
  
  static void
  fetch_watchpoint_value (struct expression *exp, struct value **valp,
-@@ -5705,7 +5713,7 @@ watch_command_1 (char *arg, int accessfl
+@@ -5824,7 +5832,7 @@ watch_command_1 (char *arg, int accessfl
    struct symtab_and_line sal;
    struct expression *exp;
    struct block *exp_valid_block;
@@ -48,7 +48,7 @@
    struct frame_info *frame;
    struct frame_info *prev_frame = NULL;
    char *exp_start = NULL;
-@@ -5791,6 +5799,27 @@ watch_command_1 (char *arg, int accessfl
+@@ -5910,6 +5918,27 @@ watch_command_1 (char *arg, int accessfl
    exp_valid_block = innermost_block;
    mark = value_mark ();
    fetch_watchpoint_value (exp, &val, NULL, NULL);
@@ -76,11 +76,11 @@
    if (val != NULL)
      release_value (val);
  
-Index: gdb-6.8/gdb/gdbtypes.h
+Index: gdb-6.8.50.20081128/gdb/gdbtypes.h
 ===================================================================
---- gdb-6.8.orig/gdb/gdbtypes.h	2008-07-14 10:28:30.000000000 +0200
-+++ gdb-6.8/gdb/gdbtypes.h	2008-07-14 10:28:36.000000000 +0200
-@@ -69,7 +69,22 @@ enum type_code
+--- gdb-6.8.50.20081128.orig/gdb/gdbtypes.h	2008-12-02 22:53:14.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/gdbtypes.h	2008-12-03 00:00:08.000000000 +0100
+@@ -70,7 +70,22 @@ enum type_code
      TYPE_CODE_UNION,		/* C union or Pascal variant part */
      TYPE_CODE_ENUM,		/* Enumeration type */
      TYPE_CODE_FLAGS,		/* Bit flags type */
@@ -104,11 +104,11 @@
      TYPE_CODE_INT,		/* Integer type */
  
      /* Floating type.  This is *NOT* a complex type.  Beware, there are parts
-Index: gdb-6.8/gdb/doc/gdb.texinfo
+Index: gdb-6.8.50.20081128/gdb/doc/gdb.texinfo
 ===================================================================
---- gdb-6.8.orig/gdb/doc/gdb.texinfo	2008-07-14 10:28:29.000000000 +0200
-+++ gdb-6.8/gdb/doc/gdb.texinfo	2008-07-14 10:28:36.000000000 +0200
-@@ -3267,6 +3267,18 @@ This command prints a list of watchpoint
+--- gdb-6.8.50.20081128.orig/gdb/doc/gdb.texinfo	2008-12-02 23:43:49.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/doc/gdb.texinfo	2008-12-03 00:00:08.000000000 +0100
+@@ -3479,6 +3479,18 @@ This command prints a list of watchpoint
  it is the same as @code{info break} (@pxref{Set Breaks}).
  @end table
  
@@ -127,10 +127,10 @@
  @value{GDBN} sets a @dfn{hardware watchpoint} if possible.  Hardware
  watchpoints execute very quickly, and the debugger reports a change in
  value at the exact instruction where the change occurs.  If @value{GDBN}
-Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.c
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/watchpoint.c
 ===================================================================
---- gdb-6.8.orig/gdb/testsuite/gdb.base/watchpoint.c	2008-07-14 10:28:30.000000000 +0200
-+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint.c	2008-07-14 10:28:36.000000000 +0200
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.base/watchpoint.c	2008-03-03 14:24:12.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/watchpoint.c	2008-12-03 00:00:08.000000000 +0100
 @@ -40,6 +40,7 @@ struct foo struct1, struct2, *ptr1, *ptr
  int doread = 0;
  
@@ -150,11 +150,11 @@
  }
  
  int main ()
-Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/watchpoint.exp
 ===================================================================
---- gdb-6.8.orig/gdb/testsuite/gdb.base/watchpoint.exp	2008-07-14 10:28:30.000000000 +0200
-+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp	2008-07-14 10:28:36.000000000 +0200
-@@ -644,7 +644,21 @@ proc test_watchpoint_and_breakpoint {} {
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.base/watchpoint.exp	2008-08-06 14:52:07.000000000 +0200
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/watchpoint.exp	2008-12-03 00:01:07.000000000 +0100
+@@ -641,7 +641,21 @@ proc test_watchpoint_and_breakpoint {} {
  	}
      }
  }
@@ -177,7 +177,7 @@
  proc test_inaccessible_watchpoint {} {
      global gdb_prompt
  
-@@ -653,7 +667,8 @@ proc test_inaccessible_watchpoint {} {
+@@ -650,7 +664,8 @@ proc test_inaccessible_watchpoint {} {
  
      if [runto func4] then {
  	gdb_test "watch *global_ptr" ".*atchpoint \[0-9\]+: \\*global_ptr"
@@ -187,7 +187,7 @@
  	gdb_test_multiple "next" "next over ptr init" {
  	    -re ".*atchpoint \[0-9\]+: \\*global_ptr\r\n\r\nOld value = .*\r\nNew value = 3 .*\r\n.*$gdb_prompt $" {
  		# We can not test for <unknown> here because NULL may be readable.
-@@ -666,6 +681,28 @@ proc test_inaccessible_watchpoint {} {
+@@ -663,6 +678,28 @@ proc test_inaccessible_watchpoint {} {
  		pass "next over buffer set"
  	    }
  	}
@@ -215,8 +215,8 @@
 +	gdb_test "delete \$global_ptr_ptr_breakpoint_number" ""
      }
  }
- 
-@@ -834,6 +871,17 @@ if [initialize] then {
+     
+@@ -830,6 +867,17 @@ if [initialize] then {
      }
  
      test_watchpoint_and_breakpoint

gdb-6.8-fortran-tag-constant.patch:

Index: gdb-6.8-fortran-tag-constant.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.8-fortran-tag-constant.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.8-fortran-tag-constant.patch	27 Aug 2008 11:07:47 -0000	1.1
+++ gdb-6.8-fortran-tag-constant.patch	14 Dec 2008 14:05:18 -0000	1.2
@@ -1,14 +1,16 @@
---- ./gdb/dwarf2read.c	21 Aug 2008 18:57:34 -0000	1.276
-+++ ./gdb/dwarf2read.c	26 Aug 2008 17:54:37 -0000
-@@ -1798,6 +1798,7 @@ scan_partial_symbols (struct partial_die
- 		}
+Index: gdb-6.8.50.20081128/gdb/dwarf2read.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/dwarf2read.c	2008-12-06 14:06:17.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/dwarf2read.c	2008-12-06 21:53:09.000000000 +0100
+@@ -1825,6 +1825,7 @@ scan_partial_symbols (struct partial_die
+ 	      add_partial_subprogram (pdi, lowpc, highpc, cu);
  	      break;
  	    case DW_TAG_variable:
 +	    case DW_TAG_constant:
  	    case DW_TAG_typedef:
  	    case DW_TAG_union_type:
  	      if (!pdi->is_declaration)
-@@ -1983,6 +1984,7 @@ add_partial_symbol (struct partial_die_i
+@@ -2010,6 +2011,7 @@ add_partial_symbol (struct partial_die_i
  	}
        break;
      case DW_TAG_variable:
@@ -16,7 +18,15 @@
        if (pdi->is_external)
  	{
  	  /* Global Variable.
-@@ -3590,7 +3593,8 @@ dwarf2_add_field (struct field_info *fip
+@@ -2864,6 +2866,7 @@ dwarf2_full_name (struct die_info *die, 
+   if (!pdi_needs_namespace (die->tag)
+       && die->tag != DW_TAG_subprogram
+       && die->tag != DW_TAG_variable
++      && die->tag != DW_TAG_constant
+       && die->tag != DW_TAG_member)
+     return name;
+ 
+@@ -3704,7 +3707,8 @@ dwarf2_add_field (struct field_info *fip
  	  fip->non_public_fields = 1;
  	}
      }
@@ -26,7 +36,7 @@
      {
        /* C++ static member.  */
  
-@@ -4069,7 +4073,8 @@ read_structure_type (struct die_info *di
+@@ -4182,7 +4186,8 @@ read_structure_type (struct die_info *di
        while (child_die && child_die->tag)
  	{
  	  if (child_die->tag == DW_TAG_member
@@ -36,7 +46,7 @@
  	    {
  	      /* NOTE: carlton/2002-11-05: A C++ static data member
  		 should be a DW_TAG_member that is a declaration, but
-@@ -4188,6 +4193,7 @@ process_structure_scope (struct die_info
+@@ -4301,6 +4306,7 @@ process_structure_scope (struct die_info
      {
        if (child_die->tag == DW_TAG_member
  	  || child_die->tag == DW_TAG_variable
@@ -44,15 +54,15 @@
  	  || child_die->tag == DW_TAG_inheritance)
  	{
  	  /* Do nothing.  */
-@@ -5565,6 +5571,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
- 	  && abbrev->tag != DW_TAG_enumerator
+@@ -5700,6 +5706,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
  	  && abbrev->tag != DW_TAG_subprogram
+ 	  && abbrev->tag != DW_TAG_lexical_block
  	  && abbrev->tag != DW_TAG_variable
 +	  && abbrev->tag != DW_TAG_constant
  	  && abbrev->tag != DW_TAG_namespace
  	  && abbrev->tag != DW_TAG_member)
  	{
-@@ -5672,6 +5679,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
+@@ -5807,6 +5814,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
        if (load_all
  	  || abbrev->tag == DW_TAG_subprogram
  	  || abbrev->tag == DW_TAG_variable
@@ -60,7 +70,7 @@
  	  || abbrev->tag == DW_TAG_namespace
  	  || part_die->is_declaration)
  	{
-@@ -7579,6 +7579,11 @@ new_symbol (struct die_info *die, struct
+@@ -7593,6 +7601,11 @@ new_symbol (struct die_info *die, struct
  	  /* Do not add the symbol to any lists.  It will be found via
  	     BLOCK_FUNCTION from the blockvector.  */
  	  break;

gdb-6.8-inlining-by-name.patch:

Index: gdb-6.8-inlining-by-name.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.8-inlining-by-name.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.8-inlining-by-name.patch	3 Jul 2008 11:05:26 -0000	1.1
+++ gdb-6.8-inlining-by-name.patch	14 Dec 2008 14:05:18 -0000	1.2
@@ -1,10 +1,11 @@
 Implement `b <funcname>' for <funcname> with concete inlined instances by
 a multiple-PC breakpoint.
 
-diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/ada-lang.c sources-inline-works3/gdb/ada-lang.c
---- sources-inline-works3-orig/gdb/ada-lang.c	2008-06-24 20:58:11.000000000 +0200
-+++ sources-inline-works3/gdb/ada-lang.c	2008-06-26 15:29:33.000000000 +0200
-@@ -4625,7 +4625,7 @@ remove_irrelevant_renamings (struct ada_
+Index: gdb-6.8.50.20081128/gdb/ada-lang.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/ada-lang.c	2008-11-25 00:21:15.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/ada-lang.c	2008-12-06 21:39:56.000000000 +0100
+@@ -4614,7 +4614,7 @@ remove_irrelevant_renamings (struct ada_
    if (current_block == NULL)
      return nsyms;
  
@@ -13,7 +14,7 @@
    if (current_function == NULL)
      return nsyms;
  
-@@ -6721,7 +6721,7 @@ ada_find_renaming_symbol (const char *na
+@@ -6625,7 +6625,7 @@ ada_find_renaming_symbol (const char *na
  static struct symbol *
  find_old_style_renaming_symbol (const char *name, struct block *block)
  {
@@ -22,10 +23,11 @@
    char *rename;
  
    if (function_sym != NULL)
-diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/block.c sources-inline-works3/gdb/block.c
---- sources-inline-works3-orig/gdb/block.c	2008-06-24 20:58:11.000000000 +0200
-+++ sources-inline-works3/gdb/block.c	2008-06-26 15:29:09.000000000 +0200
-@@ -73,6 +73,19 @@ block_linkage_function (const struct blo
+Index: gdb-6.8.50.20081128/gdb/block.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/block.c	2008-12-06 14:06:16.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/block.c	2008-12-06 21:40:29.000000000 +0100
+@@ -75,6 +75,19 @@ block_linkage_function (const struct blo
    return BLOCK_FUNCTION (bl);
  }
  
@@ -42,13 +44,14 @@
 +  return BLOCK_FUNCTION (bl);
 +}
 +
- /* Return one if BLOCK represents an inlined function.  */
+ /* Return one if BL represents an inlined function.  */
  
  int
-diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/block.h sources-inline-works3/gdb/block.h
---- sources-inline-works3-orig/gdb/block.h	2008-06-24 20:58:11.000000000 +0200
-+++ sources-inline-works3/gdb/block.h	2008-06-26 15:29:20.000000000 +0200
-@@ -137,6 +137,7 @@ struct blockvector
+Index: gdb-6.8.50.20081128/gdb/block.h
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/block.h	2008-12-06 14:06:16.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/block.h	2008-12-06 21:39:56.000000000 +0100
+@@ -133,6 +133,7 @@ struct blockvector
  enum { GLOBAL_BLOCK = 0, STATIC_BLOCK = 1, FIRST_LOCAL_BLOCK = 2 };
  
  extern struct symbol *block_linkage_function (const struct block *);
@@ -56,10 +59,11 @@
  
  extern int block_inlined_p (const struct block *block);
  
-diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/blockframe.c sources-inline-works3/gdb/blockframe.c
---- sources-inline-works3-orig/gdb/blockframe.c	2008-06-24 20:58:25.000000000 +0200
-+++ sources-inline-works3/gdb/blockframe.c	2008-06-26 15:34:44.000000000 +0200
-@@ -157,7 +157,7 @@ find_pc_sect_function (CORE_ADDR pc, str
+Index: gdb-6.8.50.20081128/gdb/blockframe.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/blockframe.c	2008-12-06 14:06:16.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/blockframe.c	2008-12-06 21:39:56.000000000 +0100
+@@ -143,7 +143,7 @@ find_pc_sect_function (CORE_ADDR pc, str
    struct block *b = block_for_pc_sect (pc, section);
    if (b == 0)
      return 0;
@@ -68,10 +72,11 @@
  }
  
  /* Return the function containing pc value PC.
-diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/breakpoint.c sources-inline-works3/gdb/breakpoint.c
---- sources-inline-works3-orig/gdb/breakpoint.c	2008-06-24 20:58:25.000000000 +0200
-+++ sources-inline-works3/gdb/breakpoint.c	2008-06-26 15:28:35.000000000 +0200
-@@ -5692,7 +5692,7 @@ resolve_sal_pc (struct symtab_and_line *
+Index: gdb-6.8.50.20081128/gdb/breakpoint.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/breakpoint.c	2008-12-06 14:06:17.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/breakpoint.c	2008-12-06 21:39:56.000000000 +0100
+@@ -5712,7 +5712,7 @@ resolve_sal_pc (struct symtab_and_line *
        bv = blockvector_for_pc_sect (sal->pc, 0, &b, sal->symtab);
        if (bv != NULL)
  	{
@@ -80,19 +85,20 @@
  	  if (sym != NULL)
  	    {
  	      fixup_symbol_section (sym, sal->symtab->objfile);
-diff -up -u -X /home/jkratoch/.diffi.list -rup sources-inline-works3-orig/gdb/testsuite/gdb.opt/inline-cmds.exp sources-inline-works3/gdb/testsuite/gdb.opt/inline-cmds.exp
---- sources-inline-works3-orig/gdb/testsuite/gdb.opt/inline-cmds.exp	2008-06-24 20:58:25.000000000 +0200
-+++ sources-inline-works3/gdb/testsuite/gdb.opt/inline-cmds.exp	2008-06-26 15:49:12.000000000 +0200
-@@ -42,8 +42,10 @@ if { [skip_inline_frame_tests] } {
+Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.exp
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.opt/inline-cmds.exp	2008-12-06 21:37:27.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/testsuite/gdb.opt/inline-cmds.exp	2008-12-06 21:41:37.000000000 +0100
+@@ -45,8 +45,10 @@ if { [skip_inline_frame_tests] } {
  
  # First, check that the things we expected to be inlined really were,
  # and those that shouldn't be weren't.
--set line1 [gdb_get_line_number "set breakpoint 1 here"]
--gdb_breakpoint $line1
+-set line1 [gdb_get_line_number "set breakpoint 1 here" ${srcfile2}]
+-gdb_breakpoint $srcfile2:$line1
 +# We test also inlining by the function name, otherwise we would use:
-+#   set line1 [gdb_get_line_number "set breakpoint 1 here"]
-+#   gdb_breakpoint $line1
++#   set line1 [gdb_get_line_number "set breakpoint 1 here" ${srcfile2}]
++#   gdb_breakpoint $srcfile2:$line1
 +gdb_breakpoint "bar"
- set line2 [gdb_get_line_number "set breakpoint 2 here"]
- gdb_breakpoint $line2
+ set line2 [gdb_get_line_number "set breakpoint 2 here" ${srcfile2}]
+ gdb_breakpoint $srcfile2:$line2
  

gdb-6.8-inlining.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.4 -r 1.5 gdb-6.8-inlining.patch
Index: gdb-6.8-inlining.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.8-inlining.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- gdb-6.8-inlining.patch	6 Nov 2008 20:52:35 -0000	1.4
+++ gdb-6.8-inlining.patch	14 Dec 2008 14:05:19 -0000	1.5
@@ -1,81 +1,35 @@
-http://sourceware.org/ml/gdb-patches/2008-06/msg00239.html
-+
-http://sourceware.org/ml/gdb-patches/2008-06/msg00379.html
+http://sourceware.org/ml/gdb-patches/2008-07/msg00442.html
+with pre-applied and post-unapplied (the patch is currently 2008-12-06 not
+applied upstream)
+http://sourceware.org/ml/gdb-patches/2008-07/msg00317.html
 
-[ Backported for gdb-6.8fedora.  ]
+Removed dwarf_expr_frame_base NULL check duplicity with *-vla.patch.
 
-Index: gdb-6.8/gdb/Makefile.in
-===================================================================
---- gdb-6.8.orig/gdb/Makefile.in	2008-07-14 10:28:30.000000000 +0200
-+++ gdb-6.8/gdb/Makefile.in	2008-07-14 10:29:07.000000000 +0200
-@@ -607,6 +607,7 @@ SFILES = ada-exp.y ada-lang.c ada-typepr
- 	inf-loop.c \
- 	infcall.c \
- 	infcmd.c inflow.c infrun.c \
-+	inline-frame.c \
- 	interps.c \
- 	jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
- 	language.c linespec.c \
-@@ -1068,6 +1069,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $
- 	user-regs.o \
- 	frame.o frame-unwind.o doublest.o \
- 	frame-base.o \
-+	inline-frame.o \
- 	gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o \
- 	cp-namespace.o \
- 	reggroups.o regset.o \
-Index: gdb-6.8/gdb/ada-lang.c
+Index: gdb-6.8.50.20081209/gdb/NEWS
 ===================================================================
---- gdb-6.8.orig/gdb/ada-lang.c	2008-07-14 10:28:30.000000000 +0200
-+++ gdb-6.8/gdb/ada-lang.c	2008-07-14 10:29:07.000000000 +0200
-@@ -4624,7 +4624,7 @@ remove_irrelevant_renamings (struct ada_
-   if (current_block == NULL)
-     return nsyms;
- 
--  current_function = block_function (current_block);
-+  current_function = block_linkage_function (current_block);
-   if (current_function == NULL)
-     return nsyms;
- 
-@@ -6778,7 +6778,7 @@ ada_find_renaming_symbol (const char *na
- static struct symbol *
- find_old_style_renaming_symbol (const char *name, struct block *block)
- {
--  const struct symbol *function_sym = block_function (block);
-+  const struct symbol *function_sym = block_linkage_function (block);
-   char *rename;
- 
-   if (function_sym != NULL)
-@@ -9946,7 +9946,7 @@ ada_unhandled_exception_name_addr_from_r
-      the frame corresponding to RAISE_SYM_NAME.  This frame is
-      at least 3 levels up, so we simply skip the first 3 frames
-      without checking the name of their associated function.  */
--  fi = get_current_frame ();
-+  fi = get_current_user_frame ();
-   for (frame_level = 0; frame_level < 3; frame_level += 1)
-     if (fi != NULL)
-       fi = get_prev_frame (fi); 
-@@ -10041,7 +10041,7 @@ print_it_exception (enum exception_catch
-       exception_name [sizeof (exception_name) - 1] = '\0';
-     }
+--- gdb-6.8.50.20081209.orig/gdb/NEWS	2008-12-02 08:57:36.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/NEWS	2008-12-10 01:28:37.000000000 +0100
+@@ -26,6 +26,9 @@ completions will be "f1" and "f2".
+ operators when expanding macros.  It also supports variable-arity
+ macros.
  
--  ada_find_printable_frame (get_current_frame ());
-+  ada_find_printable_frame (get_current_user_frame ());
++* Inlined functions are now supported.  They show up in backtraces, and
++the "step", "next", and "finish" commands handle them automatically.
++
+ * New remote packets
  
-   annotate_catchpoint (b->number);
-   switch (ex)
-Index: gdb-6.8/gdb/block.c
-===================================================================
---- gdb-6.8.orig/gdb/block.c	2008-01-01 23:53:09.000000000 +0100
-+++ gdb-6.8/gdb/block.c	2008-07-14 10:29:07.000000000 +0200
-@@ -47,23 +47,40 @@ contained_in (const struct block *a, con
+ qSearch:memory:
+Index: gdb-6.8.50.20081209/gdb/block.c
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/block.c	2008-09-05 13:37:16.000000000 +0200
++++ gdb-6.8.50.20081209/gdb/block.c	2008-12-10 01:28:37.000000000 +0100
+@@ -47,8 +47,16 @@ contained_in (const struct block *a, con
  {
    if (!a || !b)
      return 0;
 -  return BLOCK_START (a) >= BLOCK_START (b)
 -    && BLOCK_END (a) <= BLOCK_END (b);
--}
- 
++
 +  do
 +    {
 +      if (a == b)
@@ -85,16 +39,12 @@
 +  while (a != NULL);
 +
 +  return 0;
-+}
+ }
  
- /* Return the symbol for the function which contains a specified
--   lexical block, described by a struct block BL.  */
-+   lexical block, described by a struct block BL.  Inlined functions
-+   are never returned.  */
  
+@@ -60,12 +68,21 @@ contained_in (const struct block *a, con
  struct symbol *
--block_function (const struct block *bl)
-+block_linkage_function (const struct block *bl)
+ block_linkage_function (const struct block *bl)
  {
 -  while (BLOCK_FUNCTION (bl) == 0 && BLOCK_SUPERBLOCK (bl) != 0)
 +  while ((BLOCK_FUNCTION (bl) == NULL || block_inlined_p (bl))
@@ -104,29 +54,21 @@
    return BLOCK_FUNCTION (bl);
  }
  
-+/* Return one if BLOCK represents an inlined function.  */
++/* Return one if BL represents an inlined function.  */
 +
 +int
-+block_inlined_p (const struct block *block)
++block_inlined_p (const struct block *bl)
 +{
-+  return BLOCK_INLINED (block);
++  return BLOCK_FUNCTION (bl) != NULL && SYMBOL_INLINED (BLOCK_FUNCTION (bl));
 +}
 +
  /* Return the blockvector immediately containing the innermost lexical
     block containing the specified pc value and section, or 0 if there
     is none.  PBLOCK is a pointer to the block.  If PBLOCK is NULL, we
-@@ -304,6 +321,7 @@ allocate_block (struct obstack *obstack)
-   BLOCK_SUPERBLOCK (bl) = NULL;
-   BLOCK_DICT (bl) = NULL;
-   BLOCK_NAMESPACE (bl) = NULL;
-+  BLOCK_INLINED (bl) = 0;
- 
-   return bl;
- }
-Index: gdb-6.8/gdb/block.h
+Index: gdb-6.8.50.20081209/gdb/block.h
 ===================================================================
---- gdb-6.8.orig/gdb/block.h	2008-01-01 23:53:09.000000000 +0100
-+++ gdb-6.8/gdb/block.h	2008-07-14 10:29:07.000000000 +0200
+--- gdb-6.8.50.20081209.orig/gdb/block.h	2008-09-05 13:37:16.000000000 +0200
++++ gdb-6.8.50.20081209/gdb/block.h	2008-12-10 01:28:37.000000000 +0100
 @@ -65,7 +65,7 @@ struct block
    CORE_ADDR endaddr;
  
@@ -136,45 +78,33 @@
  
    struct symbol *function;
  
-@@ -96,6 +96,9 @@ struct block
-     cplus_specific;
-   }
-   language_specific;
-+
-+  /* Set if this block corresponds to an inlined function.  */
-+  unsigned char inlined;
- };
- 
- #define BLOCK_START(bl)		(bl)->startaddr
-@@ -104,6 +107,7 @@ struct block
- #define BLOCK_SUPERBLOCK(bl)	(bl)->superblock
- #define BLOCK_DICT(bl)		(bl)->dict
- #define BLOCK_NAMESPACE(bl)   (bl)->language_specific.cplus_specific.namespace
-+#define BLOCK_INLINED(bl)	(bl)->inlined
- 
- /* Macro to loop through all symbols in a block BL, in no particular
-    order.  ITER helps keep track of the iteration, and should be a
-@@ -132,7 +136,9 @@ struct blockvector
+@@ -134,6 +134,8 @@ enum { GLOBAL_BLOCK = 0, STATIC_BLOCK = 
  
- enum { GLOBAL_BLOCK = 0, STATIC_BLOCK = 1, FIRST_LOCAL_BLOCK = 2 };
+ extern struct symbol *block_linkage_function (const struct block *);
  
--extern struct symbol *block_function (const struct block *);
-+extern struct symbol *block_linkage_function (const struct block *);
-+
 +extern int block_inlined_p (const struct block *block);
[...3574 lines suppressed...]
++	-re "arg1 = <value optimized out>\r\n$gdb_prompt $" {
++	    # GCC 4.3 loses location information for arg1.  GCC 4.2 is OK.
++	    if { [test_compiler_info "gcc-4-3-*"] } {
++		setup_xfail *-*-*
++	    }
++	    fail $msg
++	}
++    }
 +} else {
 +    gdb_test "up" "#1  .*main .* at .*" "up from bar (2)"
 +    gdb_test "info locals" ".*arg1 = 0.*" "info locals above bar (2)"
@@ -3437,9 +3271,6 @@
 +
 +# Make sure that locals on the stack are found.  This is an array to
 +# prevent it from living in a register.
-+if [test_compiler_info "gcc-4-3-*"] {
-+    setup_kfail *-*-* "gcc/debug.optimization"
-+}
 +gdb_test "print array\[0\]" "\\\$$decimal = 0" "print local (2)"
 +
 +if { ! $no_frames } {
@@ -3458,22 +3289,73 @@
 +    gdb_test "up" "#1  .*func1 .* at .*" "up from bar (3)"
 +    gdb_test "info frame" ".*inlined into frame.*" "func1 inlined (3)"
 +    gdb_test "info locals" "array = {.*}" "info locals above bar (3)"
-+    gdb_test "info args" "arg1 = .*" "info args above bar (3)"
++
++    set msg "info args above bar (3)"
++    gdb_test_multiple "info args" $msg {
++	-re "arg1 = $decimal\r\n$gdb_prompt $" {
++	    pass $msg
++	}
++	-re "arg1 = <value optimized out>\r\n$gdb_prompt $" {
++	    # GCC 4.3 loses location information for arg1.  GCC 4.2 is OK.
++	    if { [test_compiler_info "gcc-4-3-*"] } {
++		setup_xfail *-*-*
++	    }
++	    fail $msg
++	}
++    }
 +} else {
 +    gdb_test "up" "#1  .*main .* at .*" "up from bar (3)"
 +    gdb_test "info locals" ".*arg1 = 1.*" "info locals above bar (3a)"
 +    gdb_test "info locals" ".*arg2 = 184.*" "info locals above bar (3b)"
 +}
 +
-+if [test_compiler_info "gcc-4-3-*"] {
-+    setup_kfail *-*-* "gcc/debug.optimization"
-+}
 +gdb_test "print array\[0\]" "\\\$$decimal = 184" "print local (3)"
-Index: gdb-6.8/gdb/testsuite/lib/gdb.exp
+Index: gdb-6.8.50.20081209/gdb/testsuite/gdb.opt/inline-markers.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.8.50.20081209/gdb/testsuite/gdb.opt/inline-markers.c	2008-12-10 01:28:37.000000000 +0100
+@@ -0,0 +1,36 @@
++/* Copyright (C) 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 <http://www.gnu.org/licenses/>.  */
++
++extern int x, y;
++
++void bar(void)
++{
++  x += y; /* set breakpoint 1 here */
++}
++
++void marker(void)
++{
++  x += y; /* set breakpoint 2 here */
++}
++
++inline void inlined_fn(void)
++{
++  x += y;
++}
++
++void noinline(void)
++{
++  inlined_fn (); /* inlined */
++}
+Index: gdb-6.8.50.20081209/gdb/testsuite/lib/gdb.exp
 ===================================================================
---- gdb-6.8.orig/gdb/testsuite/lib/gdb.exp	2008-07-14 10:28:15.000000000 +0200
-+++ gdb-6.8/gdb/testsuite/lib/gdb.exp	2008-07-14 10:29:07.000000000 +0200
-@@ -1357,6 +1357,37 @@ proc skip_hp_tests {} {
+--- gdb-6.8.50.20081209.orig/gdb/testsuite/lib/gdb.exp	2008-12-10 01:28:27.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/testsuite/lib/gdb.exp	2008-12-10 01:28:37.000000000 +0100
+@@ -1471,6 +1471,37 @@ proc skip_hp_tests {} {
      return $skip_hp
  }
  
@@ -3489,7 +3371,7 @@
 +    # GCC before 4.1 does not emit DW_AT_call_file / DW_AT_call_line.
 +    if { ([test_compiler_info "gcc-2-*"]
 +	  || [test_compiler_info "gcc-3-*"]
-+	  || [test_compiler_info "gcc-4-0"]) } {
++	  || [test_compiler_info "gcc-4-0-*"]) } {
 +	return 1
 +    }
 +
@@ -3511,46 +3393,11 @@
  set compiler_info		"unknown"
  set gcc_compiled		0
  set hp_cc_compiler		0
-Index: gdb-6.8/gdb/thread.c
+Index: gdb-6.8.50.20081209/gdb/valops.c
 ===================================================================
---- gdb-6.8.orig/gdb/thread.c	2008-07-14 10:24:32.000000000 +0200
-+++ gdb-6.8/gdb/thread.c	2008-07-14 10:29:07.000000000 +0200
-@@ -582,7 +582,7 @@ thread_apply_all_command (char *cmd, int
-   do_cleanups (old_chain);
-   /* Print stack frame only if we changed thread.  */
-   if (thread_has_changed)
--    print_stack_frame (get_current_frame (), 1, SRC_LINE);
-+    print_stack_frame (get_selected_frame (NULL), 1, SRC_LINE);
- 
- }
- 
-@@ -667,7 +667,7 @@ thread_apply_command (char *tidlist, int
-   do_cleanups (old_chain);
-   /* Print stack frame only if we changed thread.  */
-   if (thread_has_changed)
--    print_stack_frame (get_current_frame (), 1, SRC_LINE);
-+    print_stack_frame (get_selected_frame (NULL), 1, SRC_LINE);
- }
- 
- /* Switch to the specified thread.  Will dispatch off to thread_apply_command
-Index: gdb-6.8/gdb/tracepoint.c
-===================================================================
---- gdb-6.8.orig/gdb/tracepoint.c	2008-02-05 17:05:56.000000000 +0100
-+++ gdb-6.8/gdb/tracepoint.c	2008-07-14 10:29:07.000000000 +0200
-@@ -2165,7 +2165,7 @@ trace_find_line_command (char *args, int
-     {
-       if (args == 0 || *args == 0)
- 	{
--	  sal = find_pc_line (get_frame_pc (get_current_frame ()), 0);
-+	  sal = find_pc_line (get_frame_pc (get_selected_frame (NULL)), 0);
- 	  sals.nelts = 1;
- 	  sals.sals = (struct symtab_and_line *)
- 	    xmalloc (sizeof (struct symtab_and_line));
-Index: gdb-6.8/gdb/valops.c
-===================================================================
---- gdb-6.8.orig/gdb/valops.c	2008-07-14 10:28:30.000000000 +0200
-+++ gdb-6.8/gdb/valops.c	2008-07-14 10:29:07.000000000 +0200
-@@ -845,7 +845,7 @@ value_of_variable (struct symbol *var, s
+--- gdb-6.8.50.20081209.orig/gdb/valops.c	2008-12-10 01:25:43.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/valops.c	2008-12-10 01:28:37.000000000 +0100
+@@ -1051,7 +1051,7 @@ value_of_variable (struct symbol *var, s
        frame = block_innermost_frame (b);
        if (!frame)
  	{
@@ -3559,3 +3406,36 @@
  	      && SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)))
  	    error (_("No frame is currently executing in block %s."),
  		   SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)));
+Index: gdb-6.8.50.20081209/gdb/Makefile.in
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/Makefile.in	2008-12-10 01:28:27.000000000 +0100
++++ gdb-6.8.50.20081209/gdb/Makefile.in	2008-12-10 01:28:37.000000000 +0100
+@@ -630,6 +630,7 @@ SFILES = ada-exp.y ada-lang.c ada-typepr
+ 	inf-loop.c \
+ 	infcall.c \
+ 	infcmd.c inflow.c infrun.c \
++	inline-frame.c \
+ 	interps.c \
+ 	jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
+ 	language.c linespec.c \
+@@ -800,6 +801,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $
+ 	user-regs.o \
+ 	frame.o frame-unwind.o doublest.o \
+ 	frame-base.o \
++	inline-frame.o \
+ 	gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o \
+ 	cp-namespace.o \
+ 	reggroups.o regset.o \
+Index: gdb-6.8.50.20081209/gdb/testsuite/gdb.opt/Makefile.in
+===================================================================
+--- gdb-6.8.50.20081209.orig/gdb/testsuite/gdb.opt/Makefile.in	2008-04-18 01:06:54.000000000 +0200
++++ gdb-6.8.50.20081209/gdb/testsuite/gdb.opt/Makefile.in	2008-12-10 01:28:37.000000000 +0100
+@@ -1,7 +1,7 @@
+ VPATH = @srcdir@
+ srcdir = @srcdir@
+ 
+-EXECUTABLES = hello/hello
++EXECUTABLES = clobbered-registers-O2 inline-bt inline-cmds inline-locals
+ 
+ MISCELLANEOUS =
+ 

gdb-6.8-quit-never-aborts.patch:

Index: gdb-6.8-quit-never-aborts.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.8-quit-never-aborts.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.8-quit-never-aborts.patch	27 Aug 2008 11:07:47 -0000	1.1
+++ gdb-6.8-quit-never-aborts.patch	14 Dec 2008 14:05:19 -0000	1.2
@@ -5,9 +5,11 @@
 should have been detached with SIGSTOP (as they are accidentally left running
 on the debugger termination).
 
---- ./gdb/defs.h	26 Jun 2008 15:51:28 -0000	1.227
-+++ ./gdb/defs.h	10 Jul 2008 10:37:32 -0000
-@@ -141,6 +141,7 @@ extern char *gdb_sysroot;
+Index: gdb-6.8.50.20081128/gdb/defs.h
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/defs.h	2008-11-27 10:23:01.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/defs.h	2008-12-06 21:49:32.000000000 +0100
+@@ -155,6 +155,7 @@ extern char *gdb_sysroot;
  extern char *debug_file_directory;
  
  extern int quit_flag;
@@ -15,18 +17,20 @@
  extern int immediate_quit;
  extern int sevenbit_strings;
  
-@@ -159,7 +159,7 @@ extern void quit (void);
- #define QUIT_FIXME "ignoring redefinition of QUIT"
- #else
+@@ -168,7 +169,7 @@ extern void quit (void);
+    needed. */
+ 
  #define QUIT { \
 -  if (quit_flag) quit (); \
 +  if (quit_flag && !quit_flag_cleanup) quit (); \
    if (deprecated_interactive_hook) deprecated_interactive_hook (); \
  }
- #endif
---- ./gdb/event-top.c	9 Jul 2008 22:16:14 -0000	1.61
-+++ ./gdb/event-top.c	10 Jul 2008 10:37:33 -0000
-@@ -941,7 +941,7 @@ async_request_quit (gdb_client_data arg)
+ 
+Index: gdb-6.8.50.20081128/gdb/event-top.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/event-top.c	2008-12-04 10:34:31.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/event-top.c	2008-12-06 21:49:07.000000000 +0100
+@@ -939,7 +939,7 @@ async_request_quit (gdb_client_data arg)
       is no reason to call quit again here, unless immediate_quit is
       set.*/
  
@@ -35,9 +39,11 @@
      quit ();
  }
  
---- ./gdb/top.c	9 Jul 2008 22:30:46 -0000	1.145
-+++ ./gdb/top.c	10 Jul 2008 10:37:37 -0000
-@@ -1263,7 +1263,9 @@ quit_force (char *args, int from_tty)
+Index: gdb-6.8.50.20081128/gdb/top.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/top.c	2008-12-04 10:23:12.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/top.c	2008-12-06 21:49:07.000000000 +0100
+@@ -1299,7 +1299,9 @@ quit_force (char *args, int from_tty)
    qt.args = args;
    qt.from_tty = from_tty;
  
@@ -48,9 +54,11 @@
    catch_errors (quit_target, &qt,
  	        "Quitting: ", RETURN_MASK_ALL);
  
---- ./gdb/utils.c	10 Jun 2008 09:29:15 -0000	1.189
-+++ ./gdb/utils.c	10 Jul 2008 10:37:38 -0000
-@@ -120,6 +120,11 @@ int job_control;
+Index: gdb-6.8.50.20081128/gdb/utils.c
+===================================================================
+--- gdb-6.8.50.20081128.orig/gdb/utils.c	2008-12-04 10:31:00.000000000 +0100
++++ gdb-6.8.50.20081128/gdb/utils.c	2008-12-06 21:49:07.000000000 +0100
+@@ -114,6 +114,11 @@ int job_control;
  
  int quit_flag;
  


Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.316
retrieving revision 1.317
diff -u -r1.316 -r1.317
--- gdb.spec	1 Dec 2008 18:07:19 -0000	1.316
+++ gdb.spec	14 Dec 2008 14:05:19 -0000	1.317
@@ -9,11 +9,11 @@
 # Set version to contents of gdb/version.in.
 # NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3 
 # and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
-Version: 6.8
+Version: 6.8.50.20081209
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 33%{?_with_upstream:.upstream}%{?dist}
+Release: 1%{?_with_upstream:.upstream}%{?dist}
 
 License: GPLv3+
 Group: Development/Debuggers
@@ -63,10 +63,6 @@
 Patch3: gdb-6.3-rh-testlibunwind-20041202.patch
 Patch4: gdb-6.3-rh-testlibunwind1fix-20041202.patch
 
-# Recognize i386 signal trampolines before CFI.  Ensures that signal
-# frames are identified as signal frames.
-Patch101: gdb-6.3-sigx86-20040621.patch
-
 # Use convert_from_func_ptr_addr on the solib breakpoint address;
 # simplifies and makes more consistent the logic.
 Patch104: gdb-6.3-ppcdotsolib-20041022.patch
@@ -96,9 +92,6 @@
 # --readnever option.
 Patch118: gdb-6.3-gstack-20050411.patch
 
-# Fix to ensure types are visible
-Patch120: gdb-6.3-type-fix-20041213.patch
-
 # VSYSCALL and PIE
 Patch122: gdb-6.3-test-pie-20050107.patch
 Patch124: gdb-6.3-pie-20050110.patch
@@ -119,9 +112,6 @@
 # Fix to support unwinding syscalls in ia64 corefiles
 # Patch138: gdb-6.3-ia64-corefile-fix-20050127.patch
 
-# Tolerate DW_AT_type referencing <0>.
-Patch139: gdb-6.3-dwattype0-20050201.patch
-
 # Fix gcore for threads
 Patch140: gdb-6.3-gcore-thread-20050204.patch
 
@@ -185,13 +175,6 @@
 # corrupted or missing PATH.
 Patch177: gdb-6.3-gstack-without-path-20060414.patch
 
-# Do not let errors related with debug registers break thread debugging.
-Patch178: gdb-6.3-catch-debug-registers-error-20060527.patch
-
-# Cope with waitpid modifying status even when returning zero, as on
-# ia32el.
-Patch179: gdb-6.3-ia32el-fix-waitpid-20060615.patch
-
 # Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661).
 Patch188: gdb-6.5-bz203661-emit-relocs.patch
 
@@ -211,7 +194,7 @@
 
 # Suggest fixing your target architecture for gdbserver(1) (BZ 190810).
 # FIXME: It could be autodetected.
-Patch199: gdb-6.5-bz190810-gdbserver-arch-advice.patch 
+Patch199: gdb-6.5-bz190810-gdbserver-arch-advice.patch
 
 # Fix dereferencing registers for 32bit inferiors on 64bit hosts (BZ 181390).
 Patch200: gdb-6.5-bz181390-memory-address-width.patch
@@ -234,7 +217,7 @@
 
 # Try to reduce sideeffects of skipping ppc .so libs trampolines (BZ 218379).
 Patch215: gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch
-Patch216: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch 
+Patch216: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
 
 # Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
 Patch217: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
@@ -249,7 +232,7 @@
 Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
 
 # Backported post gdb-6.8 release fixups.
-Patch232: gdb-6.8-upstream.patch
+###Patch232: gdb-6.8-upstream.patch
 
 # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
 Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch
@@ -294,9 +277,6 @@
 # New locating of the matching binaries from the pure core file (build-id).
 Patch274: gdb-6.6-buildid-locate.patch
 
-# Fixed the kernel i386-on-x86_64 VDSO loading (producing `Lowest section in').
-Patch277: gdb-6.6-vdso-i386-on-amd64-warning.patch
-
 # Fix hardware watchpoints after inferior forks-off some process.
 # Threaded `set follow-fork-mode child' still not fixed there, glibc fixes reqd.
 # `set detach-on-fork off' not fixed there in general - it already assert-fails.
@@ -305,9 +285,6 @@
 # Fix displaying of numeric char arrays as strings (BZ 224128).
 Patch282: gdb-6.7-charsign-test.patch
 
-# Fix rereading of the main executable on its change.
-Patch283: gdb-6.7-reread-exec_bfd.patch
-
 # Test PPC hiding of call-volatile parameter register.
 Patch284: gdb-6.7-ppc-clobbered-registers-O2-test.patch
 
@@ -339,13 +316,8 @@
 
 # Fix/implement the Fortran dynamic arrays support (BZ 377541).
 # Fix the variable-length-arrays support (BZ 468266, feature BZ 377541).
-Patch345: gdb-6.8-bz377541-vla-bound-undefined.patch
-Patch346: gdb-6.8-bz377541-vla-loc-kind.patch
 Patch305: gdb-6.8-bz377541-vla.patch
 
-# Backport fix of a segfault + PIE regression since 6.7.1 on PIE executables.
-Patch306: gdb-6.8-watchpoint-inaccessible-memory.patch
-
 # Test GCORE for shmid 0 shared memory mappings.
 Patch309: gdb-6.3-mapping-zero-inode-test.patch
 
@@ -358,9 +330,6 @@
 # Test various forms of threads tracking across exec() (BZ 442765).
 Patch315: gdb-6.8-bz442765-threaded-exec-test.patch
 
-# Enable program counter for processing PTID to PC (sparc/sparc64)
-Patch316: gdb-6.8-sparc-fix.patch
-
 # Silence memcpy check which returns false positive (sparc64)
 Patch317: gdb-6.8-sparc64-silence-memcpy-check.patch
 
@@ -370,25 +339,18 @@
 # Test a crash on libraries missing the .text section.
 Patch320: gdb-6.5-section-num-fixup-test.patch
 
-# Protect development in the build tree by automatic Makefile dependencies.
-Patch321: gdb-6.8-auto-dependencies.patch
-
 # Refuse creating watchpoints of an address value, suggested by Martin Stransky.
 Patch322: gdb-6.8-constant-watchpoints.patch
 
-# Disable randomization (such as by setarch -R), suggested by Jakub Jelinek.
-Patch323: gdb-6.8-disable-randomization.patch
-
 # Fix compatibility with recent glibc headers.
 Patch324: gdb-6.8-glibc-headers-compat.patch
 
-# Force build failure for missing libraries for --enable-tui.
 # Create a single binary `gdb' autodetecting --tui by its argv[0].
-Patch325: gdb-6.8-forced-enable-tui.patch
 Patch326: gdb-6.8-tui-singlebinary.patch
 
 # Support transparent debugging of inlined functions for an optimized code.
 Patch327: gdb-6.8-inlining.patch
+Patch350: gdb-6.8-inlining-addon.patch
 Patch328: gdb-6.8-inlining-by-name.patch
 
 # Fix PRPSINFO in the core files dumped by gcore (BZ 254229).
@@ -403,30 +365,23 @@
 # Support DW_TAG_constant for Fortran in recent Fedora/RH GCCs.
 Patch332: gdb-6.8-fortran-tag-constant.patch
 
-# Fix crash on DW_TAG_module for Fortran in recent Fedora/RH GCCs.
-Patch333: gdb-6.8-fortran-module-ignore.patch
-
 # bare names of constructors and destructors should be unique for GDB-6.8+.
 Patch334: gdb-6.8-ctors-dtors-unique.patch
 
 # Fix attaching to stopped processes and/or pending signals.
-Patch336: gdb-6.8-attach-signalled-upstream.patch
 Patch337: gdb-6.8-attach-signalled-detach-stopped.patch
 
-# Fix occasional crash on a removed watchpoint.
-Patch338: gdb-6.8-breakpoint-gone.patch
-
-# Fix occasional stepping lockup on many threads, seen on ia64.
-Patch342: gdb-6.8-ia64-breakpoint-restoration.patch
-
 # Test the watchpoints conditionals works.
 Patch343: gdb-6.8-watchpoint-conditionals-test.patch
 
 # Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
 Patch348: gdb-6.8-bz466901-backtrace-full-prelinked.patch
 
-# Enable ia64 hardware watchpoints if created before starting inferior.
-Patch349: gdb-6.8-ia64-exec-hw-watchpoint.patch
+# Enable hardware watchpoints if created before starting inferior.
+Patch349: gdb-watchpoint-hw-without-inferior.patch
+
+# Fix upstream testsuite regression + make Fortran tests gfortran compatible.
+Patch351: gdb-fortran-testsuite-gfortran.patch
 
 BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
 Requires: readline
@@ -504,12 +459,12 @@
 
 %if 0%{!?_with_upstream:1}
 
-%patch232 -p1
+###patch232 -p1
+%patch305 -p1
 %patch1 -p1
 %patch3 -p1
 %patch4 -p1
 
-%patch101 -p1
 %patch104 -p1
 %patch105 -p1
 %patch106 -p1
@@ -518,14 +473,12 @@
 %patch116 -p1
 %patch117 -p1
 %patch118 -p1
-%patch120 -p1
 %patch122 -p1
 %patch125 -p1
 %patch128 -p1
 %patch133 -p1
 %patch134 -p1
 %patch136 -p1
-%patch139 -p1
 %patch140 -p1
 %patch141 -p1
 %patch259 -p1
@@ -548,8 +501,6 @@
 %patch170 -p1
 %patch176 -p1
 %patch177 -p1
-%patch178 -p1
-%patch179 -p1
 %patch188 -p1
 %patch190 -p1
 %patch194 -p1
@@ -585,10 +536,8 @@
 %patch266 -p1
 %patch271 -p1
 %patch274 -p1
-%patch277 -p1
 %patch280 -p1
 %patch282 -p1
-%patch283 -p1
 %patch284 -p1
 %patch287 -p1
 %patch289 -p1
@@ -599,39 +548,29 @@
 %patch298 -p1
 %patch301 -p1
 %patch304 -p1
-%patch345 -p1
-%patch346 -p1
-%patch305 -p1
-%patch306 -p1
 %patch309 -p1
 %patch311 -p1
 %patch314 -p1
 %patch315 -p1
-%patch316 -p1
 %patch317 -p1
 %patch318 -p1
 %patch320 -p1
-%patch321 -p1
 %patch322 -p1
-%patch323 -p1
 %patch324 -p1
-%patch325 -p1
 %patch326 -p1
 %patch327 -p1
+%patch350 -p1
 %patch328 -p1
 %patch329 -p1
 %patch330 -p1
 %patch331 -p1
 %patch332 -p1
-%patch333 -p1
 %patch334 -p1
-%patch336 -p1
 %patch337 -p1
-%patch338 -p1
-%patch342 -p1
 %patch343 -p1
 %patch348 -p1
 %patch349 -p1
+%patch351 -p1
 %patch124 -p1
 
 find -name "*.orig" | xargs rm -f
@@ -895,6 +834,9 @@
 %endif
 
 %changelog
+* Sun Dec 14 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20081209-1
+- Upgrade to the upstream gdb-6.8.50 snapshot.
+
 * Mon Dec  1 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8-33
 - Make `--with testsuite' BuildRequires properly conditional.
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/sources,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- sources	28 Mar 2008 09:32:36 -0000	1.25
+++ sources	14 Dec 2008 14:05:20 -0000	1.26
@@ -1 +1 @@
-c9da266b884fb8fa54df786dfaadbc7a  gdb-6.8.tar.bz2
+508fc616b9481c29f4d4eb44d518deb6  gdb-6.8.50.20081209.tar.bz2


--- gdb-6.3-catch-debug-registers-error-20060527.patch DELETED ---


--- gdb-6.3-dwattype0-20050201.patch DELETED ---


--- gdb-6.3-ia32el-fix-waitpid-20060615.patch DELETED ---


--- gdb-6.3-sigx86-20040621.patch DELETED ---


--- gdb-6.3-type-fix-20041213.patch DELETED ---


--- gdb-6.6-vdso-i386-on-amd64-warning.patch DELETED ---


--- gdb-6.7-reread-exec_bfd.patch DELETED ---


--- gdb-6.8-attach-signalled-upstream.patch DELETED ---


--- gdb-6.8-auto-dependencies.patch DELETED ---


--- gdb-6.8-breakpoint-gone.patch DELETED ---


--- gdb-6.8-bz377541-vla-bound-undefined.patch DELETED ---


--- gdb-6.8-bz377541-vla-loc-kind.patch DELETED ---


--- gdb-6.8-disable-randomization.patch DELETED ---


--- gdb-6.8-forced-enable-tui.patch DELETED ---


--- gdb-6.8-fortran-module-ignore.patch DELETED ---


--- gdb-6.8-ia64-breakpoint-restoration.patch DELETED ---


--- gdb-6.8-ia64-exec-hw-watchpoint.patch DELETED ---


--- gdb-6.8-sparc-fix.patch DELETED ---


--- gdb-6.8-upstream.patch DELETED ---


--- gdb-6.8-watchpoint-inaccessible-memory.patch DELETED ---




More information about the fedora-extras-commits mailing list