[gdb] - Rebase to FSF GDB 7.2.50.20110117 (which is a 7.3 pre-release). - Fix callback-mode readline-6.0 r

Jan Kratochvil jankratochvil at fedoraproject.org
Mon Jan 17 15:31:59 UTC 2011


commit b0e03f562dbfdebbb156e840e5aa7c32f4a09c7e
Author: Jan Kratochvil <jan.kratochvil at redhat.com>
Date:   Mon Jan 17 16:31:43 2011 +0100

    - Rebase to FSF GDB 7.2.50.20110117 (which is a 7.3 pre-release).
    - Fix callback-mode readline-6.0 regression for CTRL-C (for RHEL-6.0).
      - Fix occasional NULL dereference of the readline-6.0 workaround (BZ 575516).

 .gitignore                                         |    2 +-
 gdb-6.3-ppc64syscall-20040622.patch                |   16 +-
 gdb-6.3-readnever-20050907.patch                   |   38 +-
 gdb-6.3-test-pie-20050107.patch                    |   56 +-
 ...bz218379-solib-trampoline-lookup-lock-fix.patch |   12 +-
 gdb-6.6-buildid-locate.patch                       |   54 +-
 ....6-scheduler_locking-step-sw-watchpoints2.patch |   46 +-
 gdb-6.8-quit-never-aborts.patch                    |   28 +-
 gdb-archer-pie-addons.patch                        |   50 +-
 gdb-archer.patch                                   | 2223 ++++++++------------
 gdb-bz541866-rwatch-before-run.patch               |   26 +-
 gdb-bz592031-siginfo-lost-4of5.patch               |   44 +-
 gdb-fortran-common-reduce.patch                    |   52 +-
 gdb-fortran-common.patch                           |   72 +-
 gdb-readline-6.0-signal.patch                      |  266 +++
 gdb-test-pp-hint-error.patch                       |   20 +-
 gdb.spec                                           |   18 +-
 sources                                            |    2 +-
 18 files changed, 1396 insertions(+), 1629 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8222652..66c692b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-/gdb-7.2.50.20110107.tar.bz2
 /libstdc++-v3-python-r155978.tar.bz2
+/gdb-7.2.50.20110117.tar.bz2
diff --git a/gdb-6.3-ppc64syscall-20040622.patch b/gdb-6.3-ppc64syscall-20040622.patch
index 8e6c391..a237cc1 100644
--- a/gdb-6.3-ppc64syscall-20040622.patch
+++ b/gdb-6.3-ppc64syscall-20040622.patch
@@ -6,10 +6,10 @@
 	use to skip over first half of a GNU/Linux syscall and update
 	"func_start".
 
-Index: gdb-6.8.50.20090802/gdb/rs6000-tdep.c
+Index: gdb-7.2.50.20110117/gdb/rs6000-tdep.c
 ===================================================================
---- gdb-6.8.50.20090802.orig/gdb/rs6000-tdep.c	2009-07-31 17:23:20.000000000 +0200
-+++ gdb-6.8.50.20090802/gdb/rs6000-tdep.c	2009-08-03 09:52:39.000000000 +0200
+--- gdb-7.2.50.20110117.orig/gdb/rs6000-tdep.c	2011-01-11 20:23:02.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/rs6000-tdep.c	2011-01-17 15:48:19.000000000 +0100
 @@ -126,6 +126,7 @@ static const char *powerpc_vector_abi_st
  
  struct rs6000_framedata
@@ -18,7 +18,7 @@ Index: gdb-6.8.50.20090802/gdb/rs6000-tdep.c
      int offset;			/* total size of frame --- the distance
  				   by which we decrement sp to allocate
  				   the frame */
-@@ -1488,7 +1489,6 @@ static CORE_ADDR
+@@ -1496,7 +1497,6 @@ static CORE_ADDR
  skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
  	       struct rs6000_framedata *fdata)
  {
@@ -26,7 +26,7 @@ Index: gdb-6.8.50.20090802/gdb/rs6000-tdep.c
    CORE_ADDR last_prologue_pc = pc;
    CORE_ADDR li_found_pc = 0;
    gdb_byte buf[4];
-@@ -1506,12 +1506,14 @@ skip_prologue (struct gdbarch *gdbarch, 
+@@ -1514,12 +1514,14 @@ skip_prologue (struct gdbarch *gdbarch, 
    int minimal_toc_loaded = 0;
    int prev_insn_was_prologue_insn = 1;
    int num_skip_non_prologue_insns = 0;
@@ -41,7 +41,7 @@ Index: gdb-6.8.50.20090802/gdb/rs6000-tdep.c
    fdata->saved_gpr = -1;
    fdata->saved_fpr = -1;
    fdata->saved_vr = -1;
-@@ -1545,6 +1547,55 @@ skip_prologue (struct gdbarch *gdbarch, 
+@@ -1553,6 +1555,55 @@ skip_prologue (struct gdbarch *gdbarch, 
  	break;
        op = extract_unsigned_integer (buf, 4, byte_order);
  
@@ -97,7 +97,7 @@ Index: gdb-6.8.50.20090802/gdb/rs6000-tdep.c
        if ((op & 0xfc1fffff) == 0x7c0802a6)
  	{			/* mflr Rx */
  	  /* Since shared library / PIC code, which needs to get its
-@@ -1726,9 +1777,9 @@ skip_prologue (struct gdbarch *gdbarch, 
+@@ -1734,9 +1785,9 @@ skip_prologue (struct gdbarch *gdbarch, 
  	     we have no line table information or the line info tells
  	     us that the subroutine call is not part of the line
  	     associated with the prologue.  */
@@ -108,4 +108,4 @@ Index: gdb-6.8.50.20090802/gdb/rs6000-tdep.c
 +	      struct symtab_and_line prologue_sal = find_pc_line (fdata->func_start, 0);
  	      struct symtab_and_line this_sal = find_pc_line (pc, 0);
  
- 	      if ((prologue_sal.line == 0) || (prologue_sal.line != this_sal.line))
+ 	      if ((prologue_sal.line == 0)
diff --git a/gdb-6.3-readnever-20050907.patch b/gdb-6.3-readnever-20050907.patch
index 86c31bf..d73cd86 100644
--- a/gdb-6.3-readnever-20050907.patch
+++ b/gdb-6.3-readnever-20050907.patch
@@ -11,10 +11,10 @@
 
         * gdb.texinfo (File Options): Document --readnever.
 
-Index: gdb-7.2.50.20110107/gdb/doc/gdb.texinfo
+Index: gdb-7.2.50.20110117/gdb/doc/gdb.texinfo
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/doc/gdb.texinfo	2011-01-07 09:03:38.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/doc/gdb.texinfo	2011-01-07 09:04:48.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/doc/gdb.texinfo	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/doc/gdb.texinfo	2011-01-17 15:50:41.000000000 +0100
 @@ -1007,6 +1007,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,10 +28,10 @@ Index: gdb-7.2.50.20110107/gdb/doc/gdb.texinfo
  @end table
  
  @node Mode Options
-Index: gdb-7.2.50.20110107/gdb/main.c
+Index: gdb-7.2.50.20110117/gdb/main.c
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/main.c	2011-01-07 09:04:39.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/main.c	2011-01-07 09:05:02.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/main.c	2011-01-17 15:50:21.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/main.c	2011-01-17 15:50:41.000000000 +0100
 @@ -395,6 +395,7 @@ captured_main (void *data)
        {"xdb", no_argument, &xdb_commands, 1},
        {"dbx", no_argument, &dbx_commands, 1},
@@ -40,7 +40,7 @@ Index: gdb-7.2.50.20110107/gdb/main.c
        {"r", no_argument, &readnow_symbol_files, 1},
        {"quiet", no_argument, &quiet, 1},
        {"q", no_argument, &quiet, 1},
-@@ -1060,6 +1061,7 @@ Options:\n\n\
+@@ -1061,6 +1062,7 @@ Options:\n\n\
    fputs_unfiltered (_("\
    --quiet            Do not print version number on startup.\n\
    --readnow          Fully read symbol files on first access.\n\
@@ -48,22 +48,22 @@ Index: gdb-7.2.50.20110107/gdb/main.c
  "), stream);
    fputs_unfiltered (_("\
    --se=FILE          Use FILE as symbol file and executable file.\n\
-Index: gdb-7.2.50.20110107/gdb/symfile.c
+Index: gdb-7.2.50.20110117/gdb/symfile.c
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/symfile.c	2011-01-05 23:22:50.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/symfile.c	2011-01-07 09:04:48.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/symfile.c	2011-01-11 22:53:24.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/symfile.c	2011-01-17 15:50:53.000000000 +0100
 @@ -81,6 +81,7 @@ static void clear_symtab_users_cleanup (
  
- /* Global variables owned by this file */
- int readnow_symbol_files;	/* Read full symbols immediately */
+ /* Global variables owned by this file.  */
+ int readnow_symbol_files;	/* Read full symbols immediately.  */
 +int readnever_symbol_files;	/* Never read full symbols.  */
  
- /* External variables and functions referenced. */
+ /* External variables and functions referenced.  */
  
-Index: gdb-7.2.50.20110107/gdb/dwarf2read.c
+Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/dwarf2read.c	2011-01-07 09:03:38.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/dwarf2read.c	2011-01-07 09:04:48.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/dwarf2read.c	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/dwarf2read.c	2011-01-17 15:50:41.000000000 +0100
 @@ -57,6 +57,7 @@
  #include "vec.h"
  #include "c-lang.h"
@@ -84,10 +84,10 @@ Index: gdb-7.2.50.20110107/gdb/dwarf2read.c
  }
  
  /* When loading sections, we can either look for ".<name>", or for
-Index: gdb-7.2.50.20110107/gdb/top.h
+Index: gdb-7.2.50.20110117/gdb/top.h
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/top.h	2011-01-01 16:33:18.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/top.h	2011-01-07 09:04:48.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/top.h	2011-01-01 16:33:18.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/top.h	2011-01-17 15:50:41.000000000 +0100
 @@ -61,6 +61,7 @@ extern void set_prompt (char *);
  
  /* From random places.  */
diff --git a/gdb-6.3-test-pie-20050107.patch b/gdb-6.3-test-pie-20050107.patch
index 824554e..97a1140 100644
--- a/gdb-6.3-test-pie-20050107.patch
+++ b/gdb-6.3-test-pie-20050107.patch
@@ -1,7 +1,7 @@
-Index: gdb-7.2.50.20101116/gdb/testsuite/configure.ac
+Index: gdb-7.2.50.20110117/gdb/testsuite/configure.ac
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/testsuite/configure.ac	2010-11-05 15:31:29.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/testsuite/configure.ac	2010-11-16 07:56:53.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/testsuite/configure.ac	2011-01-05 06:09:55.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/configure.ac	2011-01-17 15:50:03.000000000 +0100
 @@ -144,6 +144,6 @@ AC_OUTPUT([Makefile \
    gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
    gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile \
@@ -10,31 +10,31 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/configure.ac
 +  gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
    gdb.python/Makefile gdb.reverse/Makefile \
    gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
-Index: gdb-7.2.50.20101116/gdb/testsuite/configure
+Index: gdb-7.2.50.20110117/gdb/testsuite/configure
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/testsuite/configure	2010-11-05 15:31:29.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/testsuite/configure	2010-11-16 07:57:59.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/testsuite/configure	2011-01-07 03:51:09.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/configure	2011-01-17 15:50:09.000000000 +0100
 @@ -3515,7 +3515,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.multi/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile gdb.opencl/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.multi/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile gdb.opencl/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.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/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.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/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
-@@ -4232,6 +4232,7 @@ do
-     "gdb.objc/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.objc/Makefile" ;;
+@@ -4233,6 +4233,7 @@ do
+     "gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/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.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
      "gdb.threads/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach.c
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/attach.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach.c	2010-11-16 07:56:34.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/attach.c	2011-01-17 15:50: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
@@ -56,10 +56,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach.c
 +    }
 +  return 0;
 +}
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach2.c
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/attach2.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach2.c	2010-11-16 07:56:34.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/attach2.c	2011-01-17 15:50: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
@@ -85,10 +85,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach2.c
 +    }
 +  return (0);
 +}
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break.c
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/break.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break.c	2010-11-16 07:56:34.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/break.c	2011-01-17 15:50:03.000000000 +0100
 @@ -0,0 +1,146 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -236,10 +236,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break.c
 +    }
 +  return 0;
 +}
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break1.c
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/break1.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break1.c	2010-11-16 07:56:34.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/break1.c	2011-01-17 15:50:03.000000000 +0100
 @@ -0,0 +1,44 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -285,10 +285,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break1.c
 +void marker3 (a, b) char *a, *b; {}	/* set breakpoint 18 here */
 +void marker4 (d) long d; {}		/* set breakpoint 13 here */
 +#endif
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/coremaker.c
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/coremaker.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/coremaker.c	2010-11-16 07:56:34.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/coremaker.c	2011-01-17 15:50:03.000000000 +0100
 @@ -0,0 +1,142 @@
 +/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
 +   Free Software Foundation, Inc.
@@ -432,10 +432,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/coremaker.c
 +  return 0;
 +}
 +
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach.exp
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/attach.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach.exp	2010-11-16 07:56:34.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/attach.exp	2011-01-17 15:50:03.000000000 +0100
 @@ -0,0 +1,423 @@
 +#   Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
 +
@@ -860,10 +860,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/attach.exp
 +do_call_attach_tests
 +
 +return 0
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break.exp
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/break.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break.exp	2010-11-16 07:56:34.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/break.exp	2011-01-17 15:50:03.000000000 +0100
 @@ -0,0 +1,966 @@
 +#   Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
 +#   2000, 2002, 2003, 2004
@@ -1831,10 +1831,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/break.exp
 +    send_gdb "set args main\n"
 +    gdb_expect -re ".*$gdb_prompt $" {}
 +}
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/corefile.exp
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/corefile.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/corefile.exp	2010-11-16 07:56:34.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/corefile.exp	2011-01-17 15:50:03.000000000 +0100
 @@ -0,0 +1,233 @@
 +# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 +# Free Software Foundation, Inc.
@@ -2069,10 +2069,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/corefile.exp
 +gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
 +
 +gdb_test "core" "No core file now."
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/Makefile.in
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/Makefile.in
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.pie/Makefile.in	2010-11-16 07:56:34.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/Makefile.in	2011-01-17 15:50:03.000000000 +0100
 @@ -0,0 +1,19 @@
 +VPATH = @srcdir@
 +srcdir = @srcdir@
diff --git a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
index 2e78a3e..082b9a0 100644
--- a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
+++ b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
@@ -1,13 +1,13 @@
 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
 
 
-Index: gdb-7.2.50.20110107/gdb/symtab.c
+Index: gdb-7.2.50.20110117/gdb/symtab.c
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/symtab.c	2011-01-07 09:03:38.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/symtab.c	2011-01-07 09:06:32.000000000 +0100
-@@ -2014,6 +2014,13 @@ find_pc_sect_line (CORE_ADDR pc, struct 
- 	  /* warning ("In stub for %s; unable to find real function/line info",
- 	     SYMBOL_LINKAGE_NAME (msymbol)) */ ;
+--- gdb-7.2.50.20110117.orig/gdb/symtab.c	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/symtab.c	2011-01-17 15:51:48.000000000 +0100
+@@ -2015,6 +2015,13 @@ find_pc_sect_line (CORE_ADDR pc, struct 
+ 	     SYMBOL_LINKAGE_NAME (msymbol)); */
+ 	  ;
  	/* fall through */
 +	/* `msymbol' trampoline may be located before its .text symbol
 +	   but this text symbol may be the address we were looking for.
diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch
index e35447c..3d8e5de 100644
--- a/gdb-6.6-buildid-locate.patch
+++ b/gdb-6.6-buildid-locate.patch
@@ -1,7 +1,7 @@
-Index: gdb-7.2.50.20110107/gdb/corelow.c
+Index: gdb-7.2.50.20110117/gdb/corelow.c
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/corelow.c	2011-01-05 23:22:47.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/corelow.c	2011-01-07 09:07:01.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/corelow.c	2011-01-05 23:22:47.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/corelow.c	2011-01-17 15:52:06.000000000 +0100
 @@ -47,6 +47,9 @@
  #include "filenames.h"
  #include "progspace.h"
@@ -90,11 +90,11 @@ Index: gdb-7.2.50.20110107/gdb/corelow.c
 +			   NULL, NULL, NULL,
 +			   &setlist, &showlist);
  }
-Index: gdb-7.2.50.20110107/gdb/doc/gdb.texinfo
+Index: gdb-7.2.50.20110117/gdb/doc/gdb.texinfo
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/doc/gdb.texinfo	2011-01-07 09:04:48.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/doc/gdb.texinfo	2011-01-07 09:07:01.000000000 +0100
-@@ -15277,6 +15277,27 @@ information files.
+--- gdb-7.2.50.20110117.orig/gdb/doc/gdb.texinfo	2011-01-17 15:50:41.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/doc/gdb.texinfo	2011-01-17 15:52:06.000000000 +0100
+@@ -15220,6 +15220,27 @@ information files.
  
  @end table
  
@@ -122,10 +122,10 @@ Index: gdb-7.2.50.20110107/gdb/doc/gdb.texinfo
  @cindex @code{.gnu_debuglink} sections
  @cindex debug link sections
  A debug link is a special section of the executable file named
-Index: gdb-7.2.50.20110107/gdb/solib-svr4.c
+Index: gdb-7.2.50.20110117/gdb/solib-svr4.c
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/solib-svr4.c	2011-01-07 09:03:38.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/solib-svr4.c	2011-01-07 09:07:01.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/solib-svr4.c	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/solib-svr4.c	2011-01-17 15:52:06.000000000 +0100
 @@ -1179,9 +1179,49 @@ svr4_current_sos (void)
  		     safe_strerror (errcode));
  	  else
@@ -179,10 +179,10 @@ Index: gdb-7.2.50.20110107/gdb/solib-svr4.c
  	    }
  	  xfree (buffer);
  
-Index: gdb-7.2.50.20110107/gdb/elfread.c
+Index: gdb-7.2.50.20110117/gdb/elfread.c
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/elfread.c	2011-01-07 09:03:38.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/elfread.c	2011-01-07 09:07:33.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/elfread.c	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/elfread.c	2011-01-17 15:52:06.000000000 +0100
 @@ -38,6 +38,10 @@
  #include "demangle.h"
  #include "psympriv.h"
@@ -911,10 +911,10 @@ Index: gdb-7.2.50.20110107/gdb/elfread.c
 +
 +  observer_attach_executable_changed (debug_print_executable_changed);
  }
-Index: gdb-7.2.50.20110107/gdb/symfile.h
+Index: gdb-7.2.50.20110117/gdb/symfile.h
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/symfile.h	2011-01-05 23:22:53.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/symfile.h	2011-01-07 09:07:01.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/symfile.h	2011-01-11 22:53:24.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/symfile.h	2011-01-17 15:52:06.000000000 +0100
 @@ -554,6 +554,13 @@ void free_symfile_segment_data (struct s
  
  extern struct cleanup *increment_reading_symtab (void);
@@ -929,11 +929,11 @@ Index: gdb-7.2.50.20110107/gdb/symfile.h
  /* From dwarf2read.c */
  
  extern int dwarf2_has_info (struct objfile *);
-Index: gdb-7.2.50.20110107/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.2.50.20110117/gdb/testsuite/lib/gdb.exp
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/testsuite/lib/gdb.exp	2011-01-07 09:03:38.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/testsuite/lib/gdb.exp	2011-01-07 09:07:01.000000000 +0100
-@@ -1391,6 +1391,16 @@ proc default_gdb_start { } {
+--- gdb-7.2.50.20110117.orig/gdb/testsuite/lib/gdb.exp	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/lib/gdb.exp	2011-01-17 15:52:06.000000000 +0100
+@@ -1395,6 +1395,16 @@ proc default_gdb_start { } {
  	    warning "Couldn't set the width to 0."
  	}
      }
@@ -950,10 +950,10 @@ Index: gdb-7.2.50.20110107/gdb/testsuite/lib/gdb.exp
      return 0;
  }
  
-Index: gdb-7.2.50.20110107/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.2.50.20110117/gdb/testsuite/lib/mi-support.exp
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/testsuite/lib/mi-support.exp	2011-01-01 16:33:52.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/testsuite/lib/mi-support.exp	2011-01-07 09:07:01.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/testsuite/lib/mi-support.exp	2011-01-01 16:33:52.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/lib/mi-support.exp	2011-01-17 15:52:06.000000000 +0100
 @@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } {
  	    }
      	}
@@ -971,10 +971,10 @@ Index: gdb-7.2.50.20110107/gdb/testsuite/lib/mi-support.exp
  
      detect_async
  
-Index: gdb-7.2.50.20110107/gdb/objfiles.h
+Index: gdb-7.2.50.20110117/gdb/objfiles.h
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/objfiles.h	2011-01-05 23:22:49.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/objfiles.h	2011-01-07 09:07:01.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/objfiles.h	2011-01-10 21:38:49.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/objfiles.h	2011-01-17 15:52:26.000000000 +0100
 @@ -434,6 +434,10 @@ struct objfile
  
  #define OBJF_USERLOADED	(1 << 3)	/* User loaded */
@@ -984,5 +984,5 @@ Index: gdb-7.2.50.20110107/gdb/objfiles.h
 +#define OBJF_BUILD_ID_CORE_LOADED (1 << 12)
 +
  /* The object file that contains the runtime common minimal symbols
-    for SunOS4. Note that this objfile has no associated BFD.  */
+    for SunOS4.  Note that this objfile has no associated BFD.  */
  
diff --git a/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch b/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
index e894258..71f2dc1 100644
--- a/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
+++ b/gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
@@ -21,10 +21,10 @@
 
 	Port to GDB-6.8pre.
 
-Index: gdb-7.2.50.20101231/gdb/inferior.h
+Index: gdb-7.2.50.20110117/gdb/inferior.h
 ===================================================================
---- gdb-7.2.50.20101231.orig/gdb/inferior.h	2011-01-01 01:25:01.000000000 +0100
-+++ gdb-7.2.50.20101231/gdb/inferior.h	2011-01-01 01:25:16.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/inferior.h	2011-01-09 04:08:56.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/inferior.h	2011-01-17 15:48:39.000000000 +0100
 @@ -186,7 +186,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,10 +42,10 @@ Index: gdb-7.2.50.20101231/gdb/inferior.h
  
  /* From misc files */
  
-Index: gdb-7.2.50.20101231/gdb/infrun.c
+Index: gdb-7.2.50.20110117/gdb/infrun.c
 ===================================================================
---- gdb-7.2.50.20101231.orig/gdb/infrun.c	2011-01-01 01:25:01.000000000 +0100
-+++ gdb-7.2.50.20101231/gdb/infrun.c	2011-01-01 01:25:29.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/infrun.c	2011-01-09 04:08:56.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/infrun.c	2011-01-17 15:49:40.000000000 +0100
 @@ -76,7 +76,7 @@ static int follow_fork (void);
  static void set_schedlock_func (char *args, int from_tty,
  				struct cmd_list_element *c);
@@ -55,7 +55,7 @@ Index: gdb-7.2.50.20101231/gdb/infrun.c
  
  static int currently_stepping_or_nexting_callback (struct thread_info *tp,
  						   void *data);
-@@ -1570,7 +1570,7 @@ maybe_software_singlestep (struct gdbarc
+@@ -1577,7 +1577,7 @@ maybe_software_singlestep (struct gdbarc
     STEP nonzero if we should step (zero to continue instead).
     SIG is the signal to give the inferior (zero for none).  */
  void
@@ -64,7 +64,7 @@ Index: gdb-7.2.50.20101231/gdb/infrun.c
  {
    int should_resume = 1;
    struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
-@@ -1602,10 +1602,12 @@ resume (int step, enum target_signal sig
+@@ -1609,10 +1609,12 @@ resume (int step, enum target_signal sig
      }
  
    if (debug_infrun)
@@ -81,7 +81,7 @@ Index: gdb-7.2.50.20101231/gdb/infrun.c
  
    /* Normally, by the time we reach `resume', the breakpoints are either
       removed or inserted, as appropriate.  The exception is if we're sitting
-@@ -1723,9 +1725,10 @@ a command like `return' or `jump' to con
+@@ -1730,9 +1732,10 @@ a command like `return' or `jump' to con
  	     individually.  */
  	  resume_ptid = inferior_ptid;
  	}
@@ -92,9 +92,9 @@ Index: gdb-7.2.50.20101231/gdb/infrun.c
 +		   && (step == RESUME_STEP_USER
 +		       || singlestep_breakpoints_inserted_p)))
  	{
- 	  /* User-settable 'scheduler' mode requires solo thread resume. */
+ 	  /* User-settable 'scheduler' mode requires solo thread resume.  */
  	  resume_ptid = inferior_ptid;
-@@ -1934,7 +1937,7 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -1941,7 +1944,7 @@ proceed (CORE_ADDR addr, enum target_sig
    struct thread_info *tp;
    CORE_ADDR pc;
    struct address_space *aspace;
@@ -103,7 +103,7 @@ Index: gdb-7.2.50.20101231/gdb/infrun.c
  
    /* If we're stopped at a fork/vfork, follow the branch set by the
       "set follow-fork-mode" command; otherwise, we'll just proceed
-@@ -1969,13 +1972,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -1976,13 +1979,13 @@ proceed (CORE_ADDR addr, enum target_sig
  	   actually be executing the breakpoint insn anyway.
  	   We'll be (un-)executing the previous instruction.  */
  
@@ -119,9 +119,9 @@ Index: gdb-7.2.50.20101231/gdb/infrun.c
      }
    else
      {
-@@ -2016,13 +2019,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -2023,13 +2026,13 @@ proceed (CORE_ADDR addr, enum target_sig
  	 is required it returns TRUE and sets the current thread to
- 	 the old thread. */
+ 	 the old thread.  */
        if (prepare_to_proceed (step))
 -	oneproc = 1;
 +	resume_step = RESUME_STEP_USER;
@@ -135,7 +135,7 @@ Index: gdb-7.2.50.20101231/gdb/infrun.c
      {
        tp->control.trap_expected = 1;
        /* If displaced stepping is enabled, we can step over the
-@@ -2109,8 +2112,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -2116,8 +2119,13 @@ proceed (CORE_ADDR addr, enum target_sig
    /* Reset to normal state.  */
    init_infwait_state ();
  
@@ -150,7 +150,7 @@ Index: gdb-7.2.50.20101231/gdb/infrun.c
  
    /* Wait for it to stop (if not standalone)
       and in any case decode why it stopped, and act accordingly.  */
-@@ -4933,14 +4941,19 @@ infrun: not switching back to stepped th
+@@ -4957,14 +4965,19 @@ process_event_stop_test:
  
  /* Is thread TP in the middle of single-stepping?  */
  
@@ -176,11 +176,11 @@ Index: gdb-7.2.50.20101231/gdb/infrun.c
  }
  
  /* Returns true if any thread *but* the one passed in "data" is in the
-Index: gdb-7.2.50.20101231/gdb/linux-nat.c
+Index: gdb-7.2.50.20110117/gdb/linux-nat.c
 ===================================================================
---- gdb-7.2.50.20101231.orig/gdb/linux-nat.c	2011-01-01 01:25:16.000000000 +0100
-+++ gdb-7.2.50.20101231/gdb/linux-nat.c	2011-01-01 01:25:16.000000000 +0100
-@@ -2908,7 +2908,10 @@ count_events_callback (struct lwp_info *
+--- gdb-7.2.50.20110117.orig/gdb/linux-nat.c	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/linux-nat.c	2011-01-17 15:48:39.000000000 +0100
+@@ -2928,7 +2928,10 @@ count_events_callback (struct lwp_info *
  static int
  select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
  {
@@ -192,10 +192,10 @@ Index: gdb-7.2.50.20101231/gdb/linux-nat.c
      return 1;
    else
      return 0;
-Index: gdb-7.2.50.20101231/gdb/linux-nat.h
+Index: gdb-7.2.50.20110117/gdb/linux-nat.h
 ===================================================================
---- gdb-7.2.50.20101231.orig/gdb/linux-nat.h	2011-01-01 01:25:16.000000000 +0100
-+++ gdb-7.2.50.20101231/gdb/linux-nat.h	2011-01-01 01:25:16.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/linux-nat.h	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/linux-nat.h	2011-01-17 15:48:39.000000000 +0100
 @@ -55,8 +55,8 @@ struct lwp_info
    /* If non-zero, a pending wait status.  */
    int status;
diff --git a/gdb-6.8-quit-never-aborts.patch b/gdb-6.8-quit-never-aborts.patch
index 79a2f47..d71557f 100644
--- a/gdb-6.8-quit-never-aborts.patch
+++ b/gdb-6.8-quit-never-aborts.patch
@@ -5,10 +5,10 @@ Some of the threads may not be properly PTRACE_DETACHed which hurts if they
 should have been detached with SIGSTOP (as they are accidentally left running
 on the debugger termination).
 
-Index: gdb-7.2.50.20101231/gdb/defs.h
+Index: gdb-7.2.50.20110117/gdb/defs.h
 ===================================================================
---- gdb-7.2.50.20101231.orig/gdb/defs.h	2011-01-01 01:00:29.000000000 +0100
-+++ gdb-7.2.50.20101231/gdb/defs.h	2011-01-01 01:09:17.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/defs.h	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/defs.h	2011-01-17 15:53:05.000000000 +0100
 @@ -165,6 +165,7 @@ extern char *python_libdir;
  extern char *debug_file_directory;
  
@@ -18,7 +18,7 @@ Index: gdb-7.2.50.20101231/gdb/defs.h
  extern int sevenbit_strings;
  
 @@ -178,7 +179,7 @@ extern void quit (void);
-    needed. */
+    needed.  */
  
  #define QUIT { \
 -  if (quit_flag) quit (); \
@@ -26,10 +26,10 @@ Index: gdb-7.2.50.20101231/gdb/defs.h
    if (deprecated_interactive_hook) deprecated_interactive_hook (); \
  }
  
-Index: gdb-7.2.50.20101231/gdb/event-top.c
+Index: gdb-7.2.50.20110117/gdb/event-top.c
 ===================================================================
---- gdb-7.2.50.20101231.orig/gdb/event-top.c	2011-01-01 01:07:37.000000000 +0100
-+++ gdb-7.2.50.20101231/gdb/event-top.c	2011-01-01 01:09:39.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/event-top.c	2011-01-17 15:52:39.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/event-top.c	2011-01-17 15:52:49.000000000 +0100
 @@ -904,7 +904,7 @@ async_request_quit (gdb_client_data arg)
       is no reason to call quit again here, unless immediate_quit is
       set.  */
@@ -39,11 +39,11 @@ Index: gdb-7.2.50.20101231/gdb/event-top.c
      quit ();
  }
  
-Index: gdb-7.2.50.20101231/gdb/top.c
+Index: gdb-7.2.50.20110117/gdb/top.c
 ===================================================================
---- gdb-7.2.50.20101231.orig/gdb/top.c	2011-01-01 01:00:29.000000000 +0100
-+++ gdb-7.2.50.20101231/gdb/top.c	2011-01-01 01:09:17.000000000 +0100
-@@ -1254,7 +1254,9 @@ quit_force (char *args, int from_tty)
+--- gdb-7.2.50.20110117.orig/gdb/top.c	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/top.c	2011-01-17 15:52:49.000000000 +0100
+@@ -1257,7 +1257,9 @@ quit_force (char *args, int from_tty)
    qt.args = args;
    qt.from_tty = from_tty;
  
@@ -54,10 +54,10 @@ Index: gdb-7.2.50.20101231/gdb/top.c
    catch_errors (quit_target, &qt,
  	        "Quitting: ", RETURN_MASK_ALL);
  
-Index: gdb-7.2.50.20101231/gdb/utils.c
+Index: gdb-7.2.50.20110117/gdb/utils.c
 ===================================================================
---- gdb-7.2.50.20101231.orig/gdb/utils.c	2011-01-01 01:00:29.000000000 +0100
-+++ gdb-7.2.50.20101231/gdb/utils.c	2011-01-01 01:09:17.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/utils.c	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/utils.c	2011-01-17 15:52:49.000000000 +0100
 @@ -121,6 +121,11 @@ int job_control;
  
  int quit_flag;
diff --git a/gdb-archer-pie-addons.patch b/gdb-archer-pie-addons.patch
index 67ca34a..0a47866 100644
--- a/gdb-archer-pie-addons.patch
+++ b/gdb-archer-pie-addons.patch
@@ -1,8 +1,8 @@
-Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
+Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/dwarf2read.c	2010-11-16 08:25:21.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/dwarf2read.c	2010-11-16 08:26:35.000000000 +0100
-@@ -7325,7 +7325,12 @@ read_common_block (struct die_info *die,
+--- gdb-7.2.50.20110117.orig/gdb/dwarf2read.c	2011-01-17 15:56:23.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/dwarf2read.c	2011-01-17 16:00:14.000000000 +0100
+@@ -7475,7 +7475,12 @@ read_common_block (struct die_info *die,
  {
    struct attribute *attr;
    struct symbol *sym;
@@ -16,7 +16,7 @@ Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
  
    attr = dwarf2_attr (die, DW_AT_location, cu);
    if (attr)
-@@ -7334,6 +7339,7 @@ read_common_block (struct die_info *die,
+@@ -7484,6 +7489,7 @@ read_common_block (struct die_info *die,
        if (attr_form_is_block (attr))
          {
            base = decode_locdesc (DW_BLOCK (attr), cu);
@@ -24,7 +24,7 @@ Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
          }
        else if (attr_form_is_section_offset (attr))
          {
-@@ -7395,12 +7401,15 @@ read_common_block (struct die_info *die,
+@@ -7545,12 +7551,15 @@ read_common_block (struct die_info *die,
  	      else
  		dwarf2_complex_location_expr_complaint ();
  
@@ -42,7 +42,7 @@ Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
  	  else
  	    SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
  	  FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
-@@ -7414,7 +7423,7 @@ read_common_block (struct die_info *die,
+@@ -7564,7 +7573,7 @@ read_common_block (struct die_info *die,
  
        sym = new_symbol (die, type, cu);
        /* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static.  */
@@ -51,11 +51,11 @@ Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
  
        set_die_type (die, type, cu);
      }
-Index: gdb-7.2.50.20101116/gdb/gdbtypes.h
+Index: gdb-7.2.50.20110117/gdb/gdbtypes.h
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/gdbtypes.h	2010-11-16 08:01:33.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/gdbtypes.h	2010-11-16 08:26:35.000000000 +0100
-@@ -395,6 +395,7 @@ enum type_instance_flag_value
+--- gdb-7.2.50.20110117.orig/gdb/gdbtypes.h	2011-01-17 15:51:03.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/gdbtypes.h	2011-01-17 16:00:32.000000000 +0100
+@@ -394,6 +394,7 @@ enum type_instance_flag_value
  enum field_loc_kind
    {
      FIELD_LOC_KIND_BITPOS,	/* bitpos */
@@ -65,13 +65,13 @@ Index: gdb-7.2.50.20101116/gdb/gdbtypes.h
    };
 @@ -576,6 +577,7 @@ struct main_type
  	   is the location (in the target) of the static field.
- 	   Otherwise, physname is the mangled label of the static field. */
+ 	   Otherwise, physname is the mangled label of the static field.  */
  
 +	/* This address is unrelocated by the objfile's ANOFFSET.  */
  	CORE_ADDR physaddr;
  	char *physname;
        }
-@@ -1101,6 +1103,7 @@ extern void allocate_gnat_aux_type (stru
+@@ -1102,6 +1104,7 @@ extern void allocate_gnat_aux_type (stru
  #define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
  #define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
  #define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
@@ -79,7 +79,7 @@ Index: gdb-7.2.50.20101116/gdb/gdbtypes.h
  #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
  #define SET_FIELD_BITPOS(thisfld, bitpos)			\
    (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS,		\
-@@ -1108,6 +1111,7 @@ extern void allocate_gnat_aux_type (stru
+@@ -1109,6 +1112,7 @@ extern void allocate_gnat_aux_type (stru
  #define SET_FIELD_PHYSNAME(thisfld, name)			\
    (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME,		\
     FIELD_STATIC_PHYSNAME (thisfld) = (name))
@@ -87,7 +87,7 @@ Index: gdb-7.2.50.20101116/gdb/gdbtypes.h
  #define SET_FIELD_PHYSADDR(thisfld, addr)			\
    (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR,		\
     FIELD_STATIC_PHYSADDR (thisfld) = (addr))
-@@ -1120,6 +1124,7 @@ extern void allocate_gnat_aux_type (stru
+@@ -1121,6 +1125,7 @@ extern void allocate_gnat_aux_type (stru
  #define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n))
  #define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
  #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
@@ -95,21 +95,21 @@ Index: gdb-7.2.50.20101116/gdb/gdbtypes.h
  #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
  #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
  #define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
-Index: gdb-7.2.50.20101116/gdb/jv-lang.c
+Index: gdb-7.2.50.20110117/gdb/jv-lang.c
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/jv-lang.c	2010-08-09 21:42:47.000000000 +0200
-+++ gdb-7.2.50.20101116/gdb/jv-lang.c	2010-11-16 08:26:35.000000000 +0100
-@@ -409,7 +409,8 @@ java_link_class_type (struct gdbarch *gd
+--- gdb-7.2.50.20110117.orig/gdb/jv-lang.c	2011-01-09 04:08:57.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/jv-lang.c	2011-01-17 16:00:59.000000000 +0100
+@@ -414,7 +414,8 @@ java_link_class_type (struct gdbarch *gd
  
    fields = NULL;
-   nfields--;			/* First set up dummy "class" field. */
+   nfields--;			/* First set up dummy "class" field.  */
 -  SET_FIELD_PHYSADDR (TYPE_FIELD (type, nfields), value_address (clas));
 +  SET_FIELD_PHYSADDR (TYPE_FIELD (type, nfields), value_address (clas)
 +    - (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type)))));
    TYPE_FIELD_NAME (type, nfields) = "class";
    TYPE_FIELD_TYPE (type, nfields) = value_type (clas);
    SET_TYPE_FIELD_PRIVATE (type, nfields);
-@@ -457,7 +458,8 @@ java_link_class_type (struct gdbarch *gd
+@@ -462,7 +463,8 @@ java_link_class_type (struct gdbarch *gd
  	  SET_TYPE_FIELD_PROTECTED (type, i);
  	}
        if (accflags & 0x0008)	/* ACC_STATIC */
@@ -119,11 +119,11 @@ Index: gdb-7.2.50.20101116/gdb/jv-lang.c
        else
  	TYPE_FIELD_BITPOS (type, i) = 8 * boffset;
        if (accflags & 0x8000)	/* FIELD_UNRESOLVED_FLAG */
-Index: gdb-7.2.50.20101116/gdb/value.c
+Index: gdb-7.2.50.20110117/gdb/value.c
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/value.c	2010-11-16 07:54:00.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/value.c	2010-11-16 08:26:35.000000000 +0100
-@@ -1965,7 +1965,8 @@ value_static_field (struct type *type, i
+--- gdb-7.2.50.20110117.orig/gdb/value.c	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/value.c	2011-01-17 16:00:14.000000000 +0100
+@@ -1997,7 +1997,8 @@ value_static_field (struct type *type, i
      {
      case FIELD_LOC_KIND_PHYSADDR:
        retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
diff --git a/gdb-archer.patch b/gdb-archer.patch
index 63204d4..ca6deb7 100644
--- a/gdb-archer.patch
+++ b/gdb-archer.patch
@@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectArcher
 http://sourceware.org/gdb/wiki/ArcherBranchManagement
 
 GIT snapshot:
-commit f06acfde4cc6df21d4f34547e5de1a0170e7b263
+commit ce88fe365322b0f7479c43eede6d3a0d337eb786
 
 branch `archer' - the merge of branches:
 archer-jankratochvil-vla
@@ -14,19 +14,19 @@ archer-tromey-python
 
 
 diff --git a/gdb/Makefile.in b/gdb/Makefile.in
-index 9459de4..95c3b57 100644
+index 226faf6..03aaa2c 100644
 --- a/gdb/Makefile.in
 +++ b/gdb/Makefile.in
-@@ -782,7 +782,8 @@ config/rs6000/nm-rs6000.h top.h bsd-kvm.h gdb-stabs.h reggroups.h \
- annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h	\
+@@ -783,7 +783,8 @@ annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h	\
  remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
  sentinel-frame.h bcache.h symfile.h windows-tdep.h linux-tdep.h \
--gdb_usleep.h jit.h xml-syscall.h ada-operator.inc microblaze-tdep.h \
-+gdb_usleep.h jit.h python/python.h python/python-internal.h \
-+xml-syscall.h ada-operator.inc microblaze-tdep.h \
- psymtab.h psympriv.h progspace.h bfin-tdep.h
+ gdb_usleep.h jit.h xml-syscall.h ada-operator.inc microblaze-tdep.h \
+-psymtab.h psympriv.h progspace.h bfin-tdep.h ia64-hpux-tdep.h
++psymtab.h psympriv.h progspace.h bfin-tdep.h ia64-hpux-tdep.h \
++python/python.h python/python-internal.h
  
  # Header files that already have srcdir in them, or which are in objdir.
+ 
 @@ -1289,6 +1290,12 @@ stamp-h: $(srcdir)/config.in config.status
  	  CONFIG_LINKS= \
  	  $(SHELL) config.status
@@ -41,10 +41,10 @@ index 9459de4..95c3b57 100644
  	$(SHELL) config.status --recheck
  
 diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
-index 3efff2e..99097bf 100644
+index 890e091..d1e1f8f 100644
 --- a/gdb/ada-lang.c
 +++ b/gdb/ada-lang.c
-@@ -11356,6 +11356,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp,
+@@ -11372,6 +11372,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp,
  
  static int
  ada_operator_check (struct expression *exp, int pos,
@@ -52,7 +52,7 @@ index 3efff2e..99097bf 100644
  		    int (*objfile_func) (struct objfile *objfile, void *data),
  		    void *data)
  {
-@@ -11370,12 +11371,15 @@ ada_operator_check (struct expression *exp, int pos,
+@@ -11386,12 +11387,15 @@ ada_operator_check (struct expression *exp, int pos,
  	break;
  
        default:
@@ -71,7 +71,7 @@ index 3efff2e..99097bf 100644
      return 1;
  
 diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
-index 877072c..2154b73 100644
+index a869f85..c59daa0 100644
 --- a/gdb/amd64-linux-nat.c
 +++ b/gdb/amd64-linux-nat.c
 @@ -265,18 +265,11 @@ amd64_linux_store_inferior_registers (struct target_ops *ops,
@@ -392,7 +392,7 @@ index b9aaf54..e1f3242 100644
  
  /* Return the innermost stack frame executing inside of BLOCK, or NULL
 diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
-index 97efc0a..f633f57 100644
+index 8d0692b..373830f 100644
 --- a/gdb/breakpoint.c
 +++ b/gdb/breakpoint.c
 @@ -62,6 +62,7 @@
@@ -424,7 +424,7 @@ index 97efc0a..f633f57 100644
  /* Assuming we're creating a static tracepoint, does S look like a
     static tracepoint marker spec ("-m MARKER_ID")?  */
  #define is_marker_spec(s)						\
-@@ -1278,6 +1286,22 @@ watchpoint_in_thread_scope (struct breakpoint *b)
+@@ -1269,6 +1277,22 @@ watchpoint_in_thread_scope (struct breakpoint *b)
  	      && !is_executing (inferior_ptid)));
  }
  
@@ -447,7 +447,7 @@ index 97efc0a..f633f57 100644
  /* Assuming that B is a watchpoint:
     - Reparse watchpoint expression, if REPARSE is non-zero
     - Evaluate expression and store the result in B->val
-@@ -1337,12 +1361,17 @@ update_watchpoint (struct breakpoint *b, int reparse)
+@@ -1328,12 +1352,17 @@ update_watchpoint (struct breakpoint *b, int reparse)
    struct frame_id saved_frame_id;
    int frame_saved;
  
@@ -465,9 +465,9 @@ index 97efc0a..f633f57 100644
    /* We don't free locations.  They are stored in bp_location array
       and update_global_locations will eventually delete them and
       remove breakpoints if needed.  */
-@@ -1542,13 +1571,7 @@ update_watchpoint (struct breakpoint *b, int reparse)
- 			 "the program has left the block\n"
- 			 "in which its expression is valid.\n"),
+@@ -1555,13 +1584,7 @@ update_watchpoint (struct breakpoint *b, int reparse)
+ Watchpoint %d deleted because the program has left the block\n\
+ in which its expression is valid.\n"),
  		       b->number);
 -      if (b->related_breakpoint)
 -	{
@@ -480,7 +480,7 @@ index 97efc0a..f633f57 100644
      }
  
    /* Restore the selected frame.  */
-@@ -1930,6 +1953,7 @@ insert_breakpoint_locations (void)
+@@ -1952,6 +1975,7 @@ insert_breakpoint_locations (void)
    int val = 0;
    int disabled_breaks = 0;
    int hw_breakpoint_error = 0;
@@ -488,7 +488,7 @@ index 97efc0a..f633f57 100644
  
    struct ui_file *tmp_error_stream = mem_fileopen ();
    struct cleanup *cleanups = make_cleanup_ui_file_delete (tmp_error_stream);
-@@ -1957,9 +1981,13 @@ insert_breakpoint_locations (void)
+@@ -1979,9 +2003,13 @@ insert_breakpoint_locations (void)
        /* For targets that support global breakpoints, there's no need
  	 to select an inferior to insert breakpoint to.  In fact, even
  	 if we aren't attached to any process yet, we should still
@@ -504,7 +504,7 @@ index 97efc0a..f633f57 100644
  	continue;
  
        val = insert_bp_location (bl, tmp_error_stream, &disabled_breaks,
-@@ -1983,13 +2011,19 @@ insert_breakpoint_locations (void)
+@@ -2005,13 +2033,19 @@ insert_breakpoint_locations (void)
  
        if (bpt->disposition == disp_del_at_next_stop)
  	continue;
@@ -530,17 +530,7 @@ index 97efc0a..f633f57 100644
        if (some_failed)
  	{
  	  for (loc = bpt->loc; loc; loc = loc->next)
-@@ -2539,8 +2573,7 @@ remove_breakpoint_1 (struct bp_location *bl, insertion_state_t is)
-     {
-       bl->inserted = (is == mark_inserted);
-       val = target_remove_watchpoint (bl->address, bl->length,
--				      bl->watchpoint_type, 
--				      bl->owner->cond_exp);
-+				      bl->watchpoint_type, bl->owner->cond_exp);
- 
-       /* Failure to remove any of the hardware watchpoints comes here.  */
-       if ((is == mark_uninserted) && (bl->inserted))
-@@ -3436,6 +3469,8 @@ print_it_typical (bpstat bs)
+@@ -3461,6 +3495,8 @@ print_it_typical (bpstat bs)
      case bp_tracepoint:
      case bp_fast_tracepoint:
      case bp_jit_event:
@@ -549,7 +539,7 @@ index 97efc0a..f633f57 100644
      default:
        result = PRINT_UNKNOWN;
        break;
-@@ -3657,6 +3692,8 @@ watchpoint_check (void *p)
+@@ -3682,6 +3718,8 @@ watchpoint_check (void *p)
    gdb_assert (bs->breakpoint_at != NULL);
    b = bs->breakpoint_at;
  
@@ -558,7 +548,7 @@ index 97efc0a..f633f57 100644
    /* If this is a local watchpoint, we only want to check if the
       watchpoint frame is in scope if the current thread is the thread
       that was used to create the watchpoint.  */
-@@ -3766,13 +3803,7 @@ watchpoint_check (void *p)
+@@ -3791,13 +3829,7 @@ watchpoint_check (void *p)
  		   " deleted because the program has left the block in\n\
  which its expression is valid.\n");     
  
@@ -573,7 +563,7 @@ index 97efc0a..f633f57 100644
  
        return WP_DELETED;
      }
-@@ -3977,9 +4008,7 @@ bpstat_check_watchpoint (bpstat bs)
+@@ -4002,9 +4034,7 @@ bpstat_check_watchpoint (bpstat bs)
  	    case 0:
  	      /* Error from catch_errors.  */
  	      printf_filtered (_("Watchpoint %d deleted.\n"), b->number);
@@ -584,7 +574,7 @@ index 97efc0a..f633f57 100644
  	      /* We've already printed what needs to be printed.  */
  	      bs->print_it = print_it_done;
  	      break;
-@@ -4185,7 +4214,7 @@ bpstat_stop_status (struct address_space *aspace,
+@@ -4210,7 +4240,7 @@ bpstat_stop_status (struct address_space *aspace,
  	     watchpoint as triggered so that we will handle the
  	     out-of-scope event.  We'll get to the watchpoint next
  	     iteration.  */
@@ -593,7 +583,7 @@ index 97efc0a..f633f57 100644
  	    b->related_breakpoint->watchpoint_triggered = watch_triggered_yes;
  	}
      }
-@@ -4307,7 +4336,7 @@ handle_jit_event (void)
+@@ -4332,7 +4362,7 @@ handle_jit_event (void)
  /* Decide what infrun needs to do with this bpstat.  */
  
  struct bpstat_what
@@ -602,7 +592,7 @@ index 97efc0a..f633f57 100644
  {
    struct bpstat_what retval;
    /* We need to defer calling `solib_add', as adding new symbols
-@@ -4315,12 +4344,13 @@ bpstat_what (bpstat bs)
+@@ -4340,12 +4370,13 @@ bpstat_what (bpstat bs)
       and hence may clear unprocessed entries in the BS chain.  */
    int shlib_event = 0;
    int jit_event = 0;
@@ -617,7 +607,7 @@ index 97efc0a..f633f57 100644
      {
        /* Extract this BS's action.  After processing each BS, we check
  	 if its action overrides all we've seem so far.  */
-@@ -4450,6 +4480,20 @@ bpstat_what (bpstat bs)
+@@ -4475,6 +4506,20 @@ bpstat_what (bpstat bs)
  	     out already.  */
  	  internal_error (__FILE__, __LINE__,
  			  _("bpstat_what: tracepoint encountered"));
@@ -638,7 +628,7 @@ index 97efc0a..f633f57 100644
  	default:
  	  internal_error (__FILE__, __LINE__,
  			  _("bpstat_what: unhandled bptype %d"), (int) bptype);
-@@ -4487,6 +4531,21 @@ bpstat_what (bpstat bs)
+@@ -4512,6 +4557,21 @@ bpstat_what (bpstat bs)
        handle_jit_event ();
      }
  
@@ -660,7 +650,7 @@ index 97efc0a..f633f57 100644
    return retval;
  }
  
-@@ -4608,6 +4667,8 @@ bptype_string (enum bptype type)
+@@ -4633,6 +4693,8 @@ bptype_string (enum bptype type)
      {bp_fast_tracepoint, "fast tracepoint"},
      {bp_static_tracepoint, "static tracepoint"},
      {bp_jit_event, "jit events"},
@@ -669,7 +659,7 @@ index 97efc0a..f633f57 100644
    };
  
    if (((int) type >= (sizeof (bptypes) / sizeof (bptypes[0])))
-@@ -4755,6 +4816,8 @@ print_one_breakpoint_location (struct breakpoint *b,
+@@ -4780,6 +4842,8 @@ print_one_breakpoint_location (struct breakpoint *b,
        case bp_fast_tracepoint:
        case bp_static_tracepoint:
        case bp_jit_event:
@@ -678,7 +668,7 @@ index 97efc0a..f633f57 100644
  	if (opts.addressprint)
  	  {
  	    annotate_field (4);
-@@ -5036,7 +5099,8 @@ user_settable_breakpoint (const struct breakpoint *b)
+@@ -5061,7 +5125,8 @@ user_settable_breakpoint (const struct breakpoint *b)
  	  || b->type == bp_catchpoint
  	  || b->type == bp_hardware_breakpoint
  	  || is_tracepoint (b)
@@ -688,7 +678,7 @@ index 97efc0a..f633f57 100644
  }
  
  /* Print information on user settable breakpoint (watchpoint, etc)
-@@ -5518,6 +5582,8 @@ allocate_bp_location (struct breakpoint *bpt)
+@@ -5543,6 +5608,8 @@ allocate_bp_location (struct breakpoint *bpt)
      case bp_longjmp_master:
      case bp_std_terminate_master:
      case bp_exception_master:
@@ -697,7 +687,7 @@ index 97efc0a..f633f57 100644
        loc->loc_type = bp_loc_software_breakpoint;
        break;
      case bp_hardware_breakpoint:
-@@ -5607,6 +5673,7 @@ set_raw_breakpoint_without_location (struct gdbarch *gdbarch,
+@@ -5632,6 +5699,7 @@ set_raw_breakpoint_without_location (struct gdbarch *gdbarch,
    b->ops = NULL;
    b->condition_not_parsed = 0;
    b->py_bp_object = NULL;
@@ -705,7 +695,7 @@ index 97efc0a..f633f57 100644
  
    /* Add this breakpoint to the end of the chain so that a list of
       breakpoints will come out in order of increasing numbers.  */
-@@ -5625,7 +5692,7 @@ set_raw_breakpoint_without_location (struct gdbarch *gdbarch,
+@@ -5650,7 +5718,7 @@ set_raw_breakpoint_without_location (struct gdbarch *gdbarch,
  
  /* Initialize loc->function_name.  */
  static void
@@ -714,7 +704,7 @@ index 97efc0a..f633f57 100644
  {
    gdb_assert (loc->owner != NULL);
  
-@@ -5633,8 +5700,29 @@ set_breakpoint_location_function (struct bp_location *loc)
+@@ -5658,8 +5726,29 @@ set_breakpoint_location_function (struct bp_location *loc)
        || loc->owner->type == bp_hardware_breakpoint
        || is_tracepoint (loc->owner))
      {
@@ -746,7 +736,7 @@ index 97efc0a..f633f57 100644
        if (loc->function_name)
  	loc->function_name = xstrdup (loc->function_name);
      }
-@@ -5709,7 +5797,8 @@ set_raw_breakpoint (struct gdbarch *gdbarch,
+@@ -5734,7 +5823,8 @@ set_raw_breakpoint (struct gdbarch *gdbarch,
    b->loc->section = sal.section;
    b->line_number = sal.line;
  
@@ -756,7 +746,7 @@ index 97efc0a..f633f57 100644
  
    breakpoints_changed ();
  
-@@ -6799,7 +6888,7 @@ clone_momentary_breakpoint (struct breakpoint *orig)
+@@ -6838,7 +6928,7 @@ clone_momentary_breakpoint (struct breakpoint *orig)
  
    copy = set_raw_breakpoint_without_location (orig->gdbarch, orig->type);
    copy->loc = allocate_bp_location (copy);
@@ -765,7 +755,7 @@ index 97efc0a..f633f57 100644
  
    copy->loc->gdbarch = orig->loc->gdbarch;
    copy->loc->requested_address = orig->loc->requested_address;
-@@ -6899,6 +6988,7 @@ mention (struct breakpoint *b)
+@@ -6938,6 +7028,7 @@ mention (struct breakpoint *b)
  	do_cleanups (ui_out_chain);
  	break;
        case bp_breakpoint:
@@ -773,7 +763,7 @@ index 97efc0a..f633f57 100644
  	if (ui_out_is_mi_like_p (uiout))
  	  {
  	    say_where = 0;
-@@ -6909,6 +6999,8 @@ mention (struct breakpoint *b)
+@@ -6948,6 +7039,8 @@ mention (struct breakpoint *b)
  	else
  	  printf_filtered (_("Breakpoint"));
  	printf_filtered (_(" %d"), b->number);
@@ -782,7 +772,7 @@ index 97efc0a..f633f57 100644
  	say_where = 1;
  	break;
        case bp_hardware_breakpoint:
-@@ -6968,6 +7060,7 @@ mention (struct breakpoint *b)
+@@ -7007,6 +7100,7 @@ mention (struct breakpoint *b)
        case bp_longjmp_master:
        case bp_std_terminate_master:
        case bp_exception_master:
@@ -790,7 +780,7 @@ index 97efc0a..f633f57 100644
  	break;
        }
  
-@@ -7028,7 +7121,8 @@ add_location_to_breakpoint (struct breakpoint *b,
+@@ -7067,7 +7161,8 @@ add_location_to_breakpoint (struct breakpoint *b,
    gdb_assert (loc->pspace != NULL);
    loc->section = sal->section;
  
@@ -800,7 +790,7 @@ index 97efc0a..f633f57 100644
    return loc;
  }
  
-@@ -8427,6 +8521,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty,
+@@ -8513,6 +8608,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty,
    b = set_raw_breakpoint_without_location (NULL, bp_type);
    set_breakpoint_number (internal, b);
    b->thread = thread;
@@ -808,7 +798,7 @@ index 97efc0a..f633f57 100644
    b->disposition = disp_donttouch;
    b->exp = exp;
    b->exp_valid_block = exp_valid_block;
-@@ -9582,6 +9677,9 @@ update_global_location_list (int should_insert)
+@@ -9684,6 +9780,9 @@ update_global_location_list (int should_insert)
        int keep_in_target = 0;
        int removed = 0;
  
@@ -818,7 +808,7 @@ index 97efc0a..f633f57 100644
        /* Skip LOCP entries which will definitely never be needed.
  	 Stop either at or being the one matching OLD_LOC.  */
        while (locp < bp_location + bp_location_count
-@@ -9898,12 +9996,22 @@ delete_breakpoint (struct breakpoint *bpt)
+@@ -10000,12 +10099,22 @@ delete_breakpoint (struct breakpoint *bpt)
  
    /* At least avoid this stale reference until the reference counting
       of breakpoints gets resolved.  */
@@ -846,7 +836,7 @@ index 97efc0a..f633f57 100644
      }
  
    observer_notify_breakpoint_deleted (bpt->number);
-@@ -10234,6 +10342,9 @@ update_breakpoint_locations (struct breakpoint *b,
+@@ -10336,6 +10445,9 @@ update_breakpoint_locations (struct breakpoint *b,
      return;
  
    b->loc = NULL;
@@ -856,7 +846,7 @@ index 97efc0a..f633f57 100644
  
    for (i = 0; i < sals.nelts; ++i)
      {
-@@ -10261,11 +10372,7 @@ update_breakpoint_locations (struct breakpoint *b,
+@@ -10363,11 +10475,7 @@ update_breakpoint_locations (struct breakpoint *b,
  	    }
  	}
  
@@ -869,7 +859,7 @@ index 97efc0a..f633f57 100644
  	b->source_file = xstrdup (sals.sals[i].symtab->filename);
  
        if (b->line_number == 0)
-@@ -10348,6 +10455,7 @@ breakpoint_re_set_one (void *bint)
+@@ -10450,6 +10558,7 @@ breakpoint_re_set_one (void *bint)
      case bp_tracepoint:
      case bp_fast_tracepoint:
      case bp_static_tracepoint:
@@ -877,7 +867,7 @@ index 97efc0a..f633f57 100644
        /* Do not attempt to re-set breakpoints disabled during startup.  */
        if (b->enable_state == bp_startup_disabled)
  	return 0;
-@@ -10518,6 +10626,7 @@ breakpoint_re_set_one (void *bint)
+@@ -10620,6 +10729,7 @@ breakpoint_re_set_one (void *bint)
      case bp_exception:
      case bp_exception_resume:
      case bp_jit_event:
@@ -885,7 +875,7 @@ index 97efc0a..f633f57 100644
        break;
      }
  
-@@ -10692,11 +10801,25 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *,
+@@ -10794,11 +10904,25 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *,
  	  ALL_BREAKPOINTS_SAFE (b, tmp)
  	    if (b->number == num)
  	      {
@@ -915,7 +905,7 @@ index 97efc0a..f633f57 100644
  		break;
  	      }
  	  if (match == 0)
-@@ -11811,6 +11934,22 @@ all_tracepoints ()
+@@ -11913,6 +12037,22 @@ all_tracepoints ()
    return tp_vec;
  }
  
@@ -938,7 +928,7 @@ index 97efc0a..f633f57 100644
  
  /* This help string is used for the break, hbreak, tbreak and thbreak
     commands.  It is defined as a macro to prevent duplication.
-@@ -11896,6 +12035,107 @@ iterate_over_breakpoints (int (*callback) (struct breakpoint *, void *),
+@@ -11998,6 +12138,107 @@ iterate_over_breakpoints (int (*callback) (struct breakpoint *, void *),
    return NULL;
  }
  
@@ -1046,14 +1036,14 @@ index 97efc0a..f633f57 100644
  void
  _initialize_breakpoint (void)
  {
-@@ -12430,4 +12670,5 @@ inferior in all-stop mode, gdb behaves as if always-inserted mode is off."),
+@@ -12532,4 +12773,5 @@ inferior in all-stop mode, gdb behaves as if always-inserted mode is off."),
    automatic_hardware_breakpoints = 1;
  
    observer_attach_about_to_proceed (breakpoint_about_to_proceed);
 +  observer_attach_mark_used (breakpoint_types_mark_used);
  }
 diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
-index 2d815c2..66b3ece 100644
+index 69598a7..336faf7 100644
 --- a/gdb/breakpoint.h
 +++ b/gdb/breakpoint.h
 @@ -148,6 +148,9 @@ enum bptype
@@ -1067,7 +1057,7 @@ index 2d815c2..66b3ece 100644
  
  /* States of enablement of breakpoint.  */
 diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
-index c889264..3155af7 100644
+index 9909e13..30c3dfe 100644
 --- a/gdb/c-typeprint.c
 +++ b/gdb/c-typeprint.c
 @@ -609,9 +609,14 @@ c_type_print_varspec_suffix (struct type *type,
@@ -1120,7 +1110,7 @@ index 565a837..c9ff0de 100644
  FLAGS_TO_PASS = \
  	"prefix=$(prefix)" \
 diff --git a/gdb/defs.h b/gdb/defs.h
-index 6a90b08..31d55de 100644
+index 9409dde..f0fa4c7 100644
 --- a/gdb/defs.h
 +++ b/gdb/defs.h
 @@ -398,6 +398,8 @@ extern struct cleanup *make_cleanup_restore_page_info (void);
@@ -1133,7 +1123,7 @@ index 6a90b08..31d55de 100644
  extern char *xfullpath (const char *);
  
 diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
-index d47a484..c860c87 100644
+index d48d95c..4cac1ba 100644
 --- a/gdb/doc/gdb.texinfo
 +++ b/gdb/doc/gdb.texinfo
 @@ -1177,6 +1177,16 @@ for remote debugging.
@@ -1153,7 +1143,7 @@ index d47a484..c860c87 100644
  @c resolve the situation of these eventually
  @item -tui
  @cindex @code{--tui}
-@@ -20665,8 +20675,6 @@ containing @code{end}.  For example:
+@@ -20630,8 +20640,6 @@ containing @code{end}.  For example:
  
  @smallexample
  (@value{GDBP}) python
@@ -1162,7 +1152,7 @@ index d47a484..c860c87 100644
  >print 23
  >end
  23
-@@ -20679,6 +20687,14 @@ in a Python script.  This can be controlled using @code{maint set
+@@ -20644,6 +20652,14 @@ in a Python script.  This can be controlled using @code{maint set
  python print-stack}: if @code{on}, the default, then Python stack
  printing is enabled; if @code{off}, then Python stack printing is
  disabled.
@@ -1177,7 +1167,7 @@ index d47a484..c860c87 100644
  @end table
  
  It is also possible to execute a Python script from the @value{GDBN}
-@@ -20700,6 +20716,14 @@ and thus is always available.
+@@ -20665,6 +20681,14 @@ and thus is always available.
  @cindex python api
  @cindex programming in python
  
@@ -1192,36 +1182,6 @@ index d47a484..c860c87 100644
  @cindex python stdout
  @cindex python pagination
  At startup, @value{GDBN} overrides Python's @code{sys.stdout} and
-@@ -20711,7 +20735,7 @@ situation, a Python @code{KeyboardInterrupt} exception is thrown.
- @menu
- * Basic Python::                Basic Python Functions.
- * Exception Handling::
--* Values From Inferior::
-+* Values From Inferior::	Python representation of values.
- * Types In Python::             Python representation of types.
- * Pretty Printing API::         Pretty-printing values.
- * Selecting Pretty-Printers::   How GDB chooses a pretty-printer.
-@@ -20772,6 +20796,12 @@ Return a sequence holding all of @value{GDBN}'s breakpoints.
- @xref{Breakpoints In Python}, for more information.
- @end defun
- 
-+ at findex gdb.breakpoints
-+ at defun breakpoints
-+Return a sequence holding all of @value{GDBN}'s breakpoints.
-+ at xref{Breakpoints In Python}, for more information.
-+ at end defun
-+
- @findex gdb.parameter
- @defun parameter parameter
- Return the value of a @value{GDBN} parameter.  @var{parameter} is a
-@@ -20789,6 +20819,7 @@ type, and returned.
- @defun history number
- Return a value from @value{GDBN}'s value history (@pxref{Value
- History}).  @var{number} indicates which history element to return.
-+
- If @var{number} is negative, then @value{GDBN} will take its absolute value
- and count backward from the last element (i.e., the most recent element) to
- find the value to return.  If @var{number} is zero, then @value{GDBN} will
 diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
 index 8149cb9..4812558 100644
 --- a/gdb/doc/gdbint.texinfo
@@ -1368,10 +1328,10 @@ index d16c865..d8d24d9 100644
  This observer is used for internal testing.  Do not use.  
  See testsuite/gdb.gdb/observer.exp.
 diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
-index aa8c8cf..537b69b 100644
+index afe6dde..d364b14 100644
 --- a/gdb/dwarf2expr.c
 +++ b/gdb/dwarf2expr.c
-@@ -904,6 +904,13 @@ execute_stack_op (struct dwarf_expr_context *ctx,
+@@ -905,6 +905,13 @@ execute_stack_op (struct dwarf_expr_context *ctx,
  	  ctx->dwarf_call (ctx, result);
  	  goto no_push;
  
@@ -1407,7 +1367,7 @@ index 3858dc8..a172585 100644
    /* The current depth of dwarf expression recursion, via DW_OP_call*,
       DW_OP_fbreg, DW_OP_push_object_address, etc., and the maximum
 diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
-index 4ec2549..60c38e9 100644
+index d9580c6..559e0b5 100644
 --- a/gdb/dwarf2loc.c
 +++ b/gdb/dwarf2loc.c
 @@ -134,6 +134,9 @@ struct dwarf_expr_baton
@@ -1675,10 +1635,10 @@ index 4ec2549..60c38e9 100644
 +	       DW_OP_push_object_address.  */
 +	    object_address_set (address);
 +
- 	    retval = allocate_value (type);
+ 	    retval = allocate_value_lazy (type);
  	    VALUE_LVAL (retval) = lval_memory;
- 	    set_value_lazy (retval, 1);
-@@ -2822,11 +2980,51 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
+ 	    if (in_stack_memory)
+@@ -2821,11 +2979,51 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
  			 dlbaton->per_cu);
  }
  
@@ -1752,7 +1712,7 @@ index ee52506..6a77c3f 100644
  
  #endif /* dwarf2loc.h */
 diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
-index 201513d..f49a149 100644
+index 03bd331..0d4d4f9 100644
 --- a/gdb/dwarf2read.c
 +++ b/gdb/dwarf2read.c
 @@ -1211,6 +1211,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu,
@@ -1847,7 +1807,7 @@ index 201513d..f49a149 100644
  
    /* Understand Dwarf2 support for vector types (like they occur on
       the PowerPC w/ AltiVec).  Gcc just adds another attribute to the
-@@ -7835,29 +7861,114 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -7833,29 +7859,114 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
    struct gdbarch *gdbarch = get_objfile_arch (objfile);
    struct type *type, *range_type, *index_type, *char_type;
    struct attribute *attr;
@@ -1939,7 +1899,7 @@ index 201513d..f49a149 100644
      }
    else
      {
--      /* check for the DW_AT_byte_size attribute */
+-      /* Check for the DW_AT_byte_size attribute.  */
 +      if (attr && attr_form_is_constant (attr))
 +	{
 +	  /* We currently do not support a constant address where the location
@@ -1976,7 +1936,7 @@ index 201513d..f49a149 100644
    char_type = language_string_char_type (cu->language_defn, gdbarch);
    type = create_string_type (NULL, char_type, range_type);
  
-@@ -8139,8 +8250,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -8136,8 +8247,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
    struct type *base_type;
    struct type *range_type;
    struct attribute *attr;
@@ -1986,7 +1946,7 @@ index 201513d..f49a149 100644
    char *name;
    LONGEST negative_mask;
  
-@@ -8153,48 +8263,125 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -8150,53 +8260,126 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
    if (range_type)
      return range_type;
  
@@ -1997,21 +1957,25 @@ index 201513d..f49a149 100644
 -    }
 +  /* LOW_BOUND and HIGH_BOUND are set for real below.  */
 +  range_type = create_range_type (NULL, base_type, 0, -1);
-+
-+  negative_mask = 
-+    (LONGEST) -1 << (TYPE_LENGTH (base_type) * TARGET_CHAR_BIT - 1);
-+
-+  /* Exclude language_ada from any TYPE_DYNAMIC constructs below.  GDB Ada
-+     supports implements the dynamic bounds in a non-DWARF way and the
-+     existing DWARF dynamic bounds are invalid, leading to memory access
-+     errors.  */
++  TYPE_UNSIGNED (range_type) = 0;
  
 -  /* FIXME: For variable sized arrays either of these could be
 -     a variable rather than a constant value.  We'll allow it,
 -     but we don't know how to handle it.  */
-   attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
+-  attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
 -  if (attr)
 -    low = dwarf2_get_attr_constant_value (attr, 0);
++  negative_mask = 
++    (LONGEST) -1 << (TYPE_LENGTH (base_type) * TARGET_CHAR_BIT - 1);
+ 
+-  attr = dwarf2_attr (die, DW_AT_upper_bound, cu);
+-  if (attr)
++  /* Exclude language_ada from any TYPE_DYNAMIC constructs below.  GDB Ada
++     supports implements the dynamic bounds in a non-DWARF way and the
++     existing DWARF dynamic bounds are invalid, leading to memory access
++     errors.  */
++
++  attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
 +  if (attr && attr_form_is_block (attr) && cu->language != language_ada)
 +    {
 +      TYPE_RANGE_DATA (range_type)->low.kind = RANGE_BOUND_KIND_DWARF_BLOCK;
@@ -2041,10 +2005,26 @@ index 201513d..f49a149 100644
 +      low = 0;
 +    }
 +  else
-+    {
+     {
+-      if (attr->form == DW_FORM_block1 || is_ref_attr (attr))
+-        {
+-          /* GCC encodes arrays with unspecified or dynamic length
+-             with a DW_FORM_block1 attribute or a reference attribute.
+-             FIXME: GDB does not yet know how to handle dynamic
+-             arrays properly, treat them as arrays with unspecified
+-             length for now.
+-
+-             FIXME: jimb/2003-09-22: GDB does not really know
+-             how to handle arrays of unspecified length
+-             either; we just represent them as zero-length
+-             arrays.  Choose an appropriate upper bound given
+-             the lower bound we've computed above.  */
+-          high = low - 1;
+-        }
 +      if (attr && attr_form_is_constant (attr))
 +	low = dwarf2_get_attr_constant_value (attr, 0);
-+      else
+       else
+-        high = dwarf2_get_attr_constant_value (attr, 1);
 +	{
 +	  if (cu->language == language_fortran)
 +	    {
@@ -2063,37 +2043,24 @@ index 201513d..f49a149 100644
 +      TYPE_LOW_BOUND (range_type) = low;
 +      if (low >= 0)
 +	TYPE_UNSIGNED (range_type) = 1;
-+    }
- 
-   attr = dwarf2_attr (die, DW_AT_upper_bound, cu);
--  if (attr)
+     }
+-  else
++
++  attr = dwarf2_attr (die, DW_AT_upper_bound, cu);
 +  if (!attr || (!attr_form_is_block (attr) && !attr_form_is_constant (attr)
 +		&& !is_ref_attr (attr)))
      {
--      if (attr->form == DW_FORM_block1 || is_ref_attr (attr))
--        {
--          /* GCC encodes arrays with unspecified or dynamic length
--             with a DW_FORM_block1 attribute or a reference attribute.
--             FIXME: GDB does not yet know how to handle dynamic
--             arrays properly, treat them as arrays with unspecified
--             length for now.
--
--             FIXME: jimb/2003-09-22: GDB does not really know
--             how to handle arrays of unspecified length
--             either; we just represent them as zero-length
--             arrays.  Choose an appropriate upper bound given
--             the lower bound we've computed above.  */
--          high = low - 1;
--        }
--      else
--        high = dwarf2_get_attr_constant_value (attr, 1);
-+      attr = dwarf2_attr (die, DW_AT_count, cu);
+       attr = dwarf2_attr (die, DW_AT_count, cu);
+-      if (attr)
+-	{
+-	  int count = dwarf2_get_attr_constant_value (attr, 1);
+-	  high = low + count - 1;
 +      /* It does not hurt but it is needlessly ineffective in check_typedef.  */
 +      if (attr && (attr_form_is_block (attr) || attr_form_is_constant (attr)))
 +      	{
 +	  TYPE_RANGE_HIGH_BOUND_IS_COUNT (range_type) = 1;
 +	  TYPE_DYNAMIC (range_type) = 1;
-+	}
+ 	}
 +      /* Pass it now as the regular DW_AT_upper_bound.  */
 +    }
 +
@@ -2120,23 +2087,20 @@ index 201513d..f49a149 100644
 +      TYPE_RANGE_DATA (range_type)->high.u.dwarf_loclist.type
 +        = die_type (target_die, target_cu);
 +      TYPE_DYNAMIC (range_type) = 1;
-     }
-   else
-     {
--      attr = dwarf2_attr (die, DW_AT_count, cu);
--      if (attr)
++    }
++  else
++    {
 +      LONGEST high;
 +
 +      if (attr && attr_form_is_constant (attr))
 +	high = dwarf2_get_attr_constant_value (attr, 0);
-+      else
+       else
  	{
--	  int count = dwarf2_get_attr_constant_value (attr, 1);
--	  high = low + count - 1;
+-	  /* Unspecified array length.  */
 +	  /* Ada expects an empty array on no boundary attributes.  */
 +	  if (cu->language != language_ada)
 +	    TYPE_HIGH_BOUND_UNDEFINED (range_type) = 1;
-+	  high = low - 1;
+ 	  high = low - 1;
  	}
 +      if (!TYPE_UNSIGNED (base_type) && (high & negative_mask))
 +	high |= negative_mask;
@@ -2144,7 +2108,7 @@ index 201513d..f49a149 100644
      }
  
    /* Dwarf-2 specifications explicitly allows to create subrange types
-@@ -8236,20 +8423,41 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -8237,24 +8420,41 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
  	}
      }
  
@@ -2154,6 +2118,8 @@ index 201513d..f49a149 100644
 -    low |= negative_mask;
 -  if (!TYPE_UNSIGNED (base_type) && (high & negative_mask))
 -    high |= negative_mask;
+-
+-  range_type = create_range_type (NULL, base_type, low, high);
 +  /* DW_AT_bit_stride is currently unsupported as we count in bytes.  */
 +  attr = dwarf2_attr (die, DW_AT_byte_stride, cu);
 +  if (attr && attr_form_is_block (attr) && cu->language != language_ada)
@@ -2170,16 +2136,18 @@ index 201513d..f49a149 100644
 +      struct dwarf2_cu *target_cu = cu;
 +      struct attribute *target_loc_attr;
  
--  range_type = create_range_type (NULL, base_type, low, high);
-+      target_die = follow_die_ref_or_sig (die, attr, &target_cu);
-+      gdb_assert (target_cu->objfile == cu->objfile);
-+      target_loc_attr = dwarf2_attr (target_die, DW_AT_location, target_cu);
- 
 -  /* Mark arrays with dynamic length at least as an array of unspecified
 -     length.  GDB could check the boundary but before it gets implemented at
 -     least allow accessing the array elements.  */
 -  if (attr && attr->form == DW_FORM_block1)
 -    TYPE_HIGH_BOUND_UNDEFINED (range_type) = 1;
++      target_die = follow_die_ref_or_sig (die, attr, &target_cu);
++      gdb_assert (target_cu->objfile == cu->objfile);
++      target_loc_attr = dwarf2_attr (target_die, DW_AT_location, target_cu);
+ 
+-  /* Ada expects an empty array on no boundary attributes.  */
+-  if (attr == NULL && cu->language != language_ada)
+-    TYPE_HIGH_BOUND_UNDEFINED (range_type) = 1;
 +      TYPE_RANGE_DATA (range_type)->byte_stride.kind
 +        = RANGE_BOUND_KIND_DWARF_LOCLIST;
 +      TYPE_RANGE_DATA (range_type)->byte_stride.u.dwarf_loclist.loclist
@@ -2198,7 +2166,7 @@ index 201513d..f49a149 100644
  
    name = dwarf2_name (die, cu);
    if (name)
-@@ -10725,10 +10933,12 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
+@@ -10731,10 +10931,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
@@ -2213,7 +2181,7 @@ index 201513d..f49a149 100644
  }
  
  /* Given a pointer to a DWARF information entry, figure out if we need
-@@ -10766,6 +10976,8 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
+@@ -10772,6 +10974,8 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
        else
  	sym = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symbol);
        OBJSTAT (objfile, n_syms++);
@@ -2222,7 +2190,7 @@ index 201513d..f49a149 100644
  
        /* Cache this symbol's name and the name's demangled form (if any).  */
        SYMBOL_SET_LANGUAGE (sym, cu->language);
-@@ -11538,6 +11750,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu)
+@@ -11544,6 +11748,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu)
        break;
      }
  
@@ -2232,7 +2200,7 @@ index 201513d..f49a149 100644
    return this_type;
  }
  
-@@ -14350,60 +14565,98 @@ fill_in_loclist_baton (struct dwarf2_cu *cu,
+@@ -14356,60 +14563,98 @@ fill_in_loclist_baton (struct dwarf2_cu *cu,
    baton->base_address = cu->base_address;
  }
  
@@ -2255,13 +2223,14 @@ index 201513d..f49a149 100644
 +  struct dwarf2_locexpr_baton *baton;
 +
 +  gdb_assert (attr_form_is_block (attr));
-+
+ 
+-      baton = obstack_alloc (&cu->objfile->objfile_obstack,
+-			     sizeof (struct dwarf2_loclist_baton));
 +  baton = obstack_alloc (&cu->objfile->objfile_obstack, sizeof (*baton));
 +  baton->per_cu = cu->per_cu;
 +  gdb_assert (baton->per_cu);
  
--      baton = obstack_alloc (&cu->objfile->objfile_obstack,
--			     sizeof (struct dwarf2_loclist_baton));
+-      fill_in_loclist_baton (cu, baton, attr);
 +  /* Note that we're just copying the block's data pointer
 +     here, not the actual data.  We're still pointing into the
 +     info_buffer for SYM's objfile; right now we never release
@@ -2271,19 +2240,18 @@ index 201513d..f49a149 100644
 +  baton->data = DW_BLOCK (attr)->data;
 +  gdb_assert (baton->size == 0 || baton->data != NULL);
  
--      fill_in_loclist_baton (cu, baton, attr);
-+  return baton;
-+}
- 
 -      if (cu->base_known == 0)
 -	complaint (&symfile_complaints,
 -		   _("Location list used without "
 -		     "specifying the CU base address."));
++  return baton;
++}
++
 +static struct dwarf2_loclist_baton *
 +dwarf2_attr_to_loclist_baton (struct attribute *attr, struct dwarf2_cu *cu)
 +{
 +  struct dwarf2_loclist_baton *baton;
- 
++
 +  /* DW_AT_location of the referenced DIE may be missing if the referenced
 +     variable has been optimized out.  */
 +  if (!attr)
@@ -2311,7 +2279,7 @@ index 201513d..f49a149 100644
 +
 +  return baton;
 +}
-+
+ 
 +/* SYM may get its SYMBOL_CLASS overriden on invalid ATTR content.  */
 +
 +static void
@@ -2373,7 +2341,7 @@ index 201513d..f49a149 100644
      }
  }
  
-@@ -14749,6 +15002,31 @@ offset_and_type_eq (const void *item_lhs, const void *item_rhs)
+@@ -14755,6 +15000,31 @@ offset_and_type_eq (const void *item_lhs, const void *item_rhs)
    return ofs_lhs->offset == ofs_rhs->offset;
  }
  
@@ -2405,7 +2373,7 @@ index 201513d..f49a149 100644
  /* Set the type associated with DIE to TYPE.  Save it in CU's hash
     table if necessary.  For convenience, return TYPE.
  
-@@ -14774,6 +15052,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
+@@ -14780,6 +15050,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
    struct objfile *objfile = cu->objfile;
    htab_t *type_hash_ptr;
  
@@ -2415,7 +2383,7 @@ index 201513d..f49a149 100644
       initialized (if not already set).  There are a few types where
       we should not be doing so, because the type-specific area is
 diff --git a/gdb/elfread.c b/gdb/elfread.c
-index 8d9b0f7..cdb3290 100644
+index c59134b..c2c8229 100644
 --- a/gdb/elfread.c
 +++ b/gdb/elfread.c
 @@ -37,6 +37,7 @@
@@ -2709,7 +2677,7 @@ index 8d9b0f7..cdb3290 100644
  
    /* Add synthetic symbols - for instance, names for any PLT entries.  */
 diff --git a/gdb/eval.c b/gdb/eval.c
-index 8394623..3d3a31e 100644
+index de25b39..cced13c 100644
 --- a/gdb/eval.c
 +++ b/gdb/eval.c
 @@ -44,6 +44,7 @@
@@ -2720,7 +2688,222 @@ index 8394623..3d3a31e 100644
  
  #include "gdb_assert.h"
  
-@@ -806,6 +807,7 @@ evaluate_subexp_standard (struct type *expect_type,
+@@ -505,27 +506,198 @@ init_array_element (struct value *array, struct value *element,
+ }
+ 
+ static struct value *
+-value_f90_subarray (struct value *array,
+-		    struct expression *exp, int *pos, enum noside noside)
++value_f90_subarray (struct value *array, struct expression *exp, int *pos,
++		    int nargs, enum noside noside)
+ {
+-  int pc = (*pos) + 1;
+-  LONGEST low_bound, high_bound;
+-  struct type *range = check_typedef (TYPE_INDEX_TYPE (value_type (array)));
+-  enum f90_range_type range_type = longest_to_int (exp->elts[pc].longconst);
+- 
+-  *pos += 3;
+-
+-  if (range_type == LOW_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT)
+-    low_bound = TYPE_LOW_BOUND (range);
++  /* Type to use for the newly allocated value ARRAY.  */
++  struct type *new_array_type;
++
++  /* Type being iterated for each dimension.  */
++  struct type *type;
++
++  /* Pointer in the last holder to the type of current dimension.  */
++  struct type **typep = &new_array_type;
++
++  struct subscript_index
++    {
++      enum { SUBSCRIPT_RANGE, SUBSCRIPT_NUMBER } kind;
++      union
++	{
++	  struct subscript_range
++	    {
++	      enum f90_range_type f90_range_type;
++	      LONGEST low_bound, high_bound;
++	    }
++	  range;
++	  LONGEST number;
++	};
++    }
++  *subscript_array;
++  int i;
++  struct cleanup *old_chain;
++  CORE_ADDR value_byte_address, value_byte_offset = 0;
++  htab_t copied_types;
++  struct value *saved_array;
++
++  old_chain = make_cleanup (null_cleanup, 0);
++  object_address_set (value_raw_address (array));
++
++  if (value_optimized_out (array)
++      || (VALUE_LVAL (array) != not_lval
++          && VALUE_LVAL (array) != lval_memory
++	  && VALUE_LVAL (array) != lval_internalvar_component
++	  && VALUE_LVAL (array) != lval_internalvar))
++    error (_("value being subranged must be in memory"));
++  type = check_typedef (value_type (array));
++  f_object_address_data_valid_or_error (type);
++
++  copied_types = create_copied_types_hash (NULL);
++  type = copy_type_recursive (type, copied_types);
++  htab_delete (copied_types);
++
++  if (nargs != calc_f77_array_dims (type))
++    error (_("Wrong number of subscripts"));
++
++  if (TYPE_DATA_LOCATION_IS_ADDR (type))
++    {
++      value_byte_address = (TYPE_DATA_LOCATION_ADDR (type)
++			    + value_offset (array));
++      TYPE_DATA_LOCATION_IS_ADDR (type) = 0;
++    }
+   else
+-    low_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
++    value_byte_address = value_address (array);
++
++  new_array_type = type;
++
++  subscript_array = alloca (sizeof (*subscript_array) * nargs);
++
++  gdb_assert (nargs > 0);
++
++  /* Now that we know we have a legal array subscript expression 
++     let us actually find out where this element exists in the array.  */
++
++  /* Take array indices left to right.  */
++  for (i = 0; i < nargs; i++)
++    {
++      struct subscript_index *index = &subscript_array[i];
++
++      if (exp->elts[*pos].opcode == OP_F90_RANGE)
++	{
++	  int pc = (*pos) + 1;
++	  struct subscript_range *range;
++
++	  index->kind = SUBSCRIPT_RANGE;
++	  range = &index->range;
++
++	  *pos += 3;
++	  range->f90_range_type = longest_to_int (exp->elts[pc].longconst);
++
++	  if (range->f90_range_type == HIGH_BOUND_DEFAULT
++	      || range->f90_range_type == NONE_BOUND_DEFAULT)
++	    range->low_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp,
++							       pos, noside));
++
++	  if (range->f90_range_type == LOW_BOUND_DEFAULT
++	      || range->f90_range_type == NONE_BOUND_DEFAULT)
++	    range->high_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp,
++								pos, noside));
++	}
++      else
++	{
++	  struct value *val;
++
++	  index->kind = SUBSCRIPT_NUMBER;
+ 
+-  if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT)
+-    high_bound = TYPE_HIGH_BOUND (range);
++	  /* Evaluate each subscript; it must be a legal integer in F77.  */
++	  val = evaluate_subexp_with_coercion (exp, pos, noside);
++	  index->number = value_as_long (val);
++	}
++    }
++
++  /* Internal type of array is arranged right to left.  */
++  for (i = nargs - 1; i >= 0; i--)
++    {
++      struct subscript_index *index = &subscript_array[i];
++      struct type *range_type = TYPE_INDEX_TYPE (type);
++
++      switch (index->kind)
++	{
++	case SUBSCRIPT_RANGE:
++	  {
++	    struct subscript_range *range = &index->range;
++	    CORE_ADDR byte_offset;
++
++	    if (range->f90_range_type == LOW_BOUND_DEFAULT
++		|| range->f90_range_type == BOTH_BOUND_DEFAULT)
++	      range->low_bound = TYPE_LOW_BOUND (range_type);
++
++	    if (range->f90_range_type == HIGH_BOUND_DEFAULT
++		|| range->f90_range_type == BOTH_BOUND_DEFAULT)
++	      range->high_bound = TYPE_HIGH_BOUND (range_type);
++
++	    if (range->low_bound < TYPE_LOW_BOUND (range_type)
++		|| (!TYPE_HIGH_BOUND_UNDEFINED (range_type)
++		    && range->high_bound > TYPE_HIGH_BOUND (range_type)))
++	      error (_("slice out of range"));
++
++	    byte_offset = ((range->low_bound - TYPE_LOW_BOUND (range_type))
++			   * TYPE_ARRAY_BYTE_STRIDE_VALUE (type));
++	    TYPE_LOW_BOUND (range_type) = range->low_bound;
++	    TYPE_HIGH_BOUND (range_type) = range->high_bound;
++	    if (range->f90_range_type == LOW_BOUND_DEFAULT
++		|| range->f90_range_type == NONE_BOUND_DEFAULT)
++	      TYPE_HIGH_BOUND_UNDEFINED (range_type) = 0;
++
++	    typep = &TYPE_TARGET_TYPE (type);
++	    value_byte_offset += byte_offset;
++	    type = TYPE_TARGET_TYPE (type);
++	  }
++	  break;
++
++	case SUBSCRIPT_NUMBER:
++	  {
++	    CORE_ADDR byte_offset;
++
++	    if (index->number < TYPE_LOW_BOUND (range_type)
++		|| (!TYPE_HIGH_BOUND_UNDEFINED (range_type)
++		    && index->number > TYPE_HIGH_BOUND (range_type)))
++	      error (_("no such vector element"));
++
++	    byte_offset = ((index->number - TYPE_LOW_BOUND (range_type))
++			   * TYPE_ARRAY_BYTE_STRIDE_VALUE (type));
++
++	    type = TYPE_TARGET_TYPE (type);
++	    *typep = type;
++	    value_byte_offset += byte_offset;
++	  }
++	  break;
++	}
++    }
++
++  check_typedef (new_array_type);
++  saved_array = array;
++  array = allocate_value_lazy (new_array_type);
++  VALUE_LVAL (array) = VALUE_LVAL (saved_array);
++  if (VALUE_LVAL (saved_array) == lval_internalvar_component)
++    VALUE_LVAL (array) = lval_internalvar;
+   else
+-    high_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
++    VALUE_LVAL (array) = VALUE_LVAL (saved_array);
++  VALUE_FRAME_ID (array) = VALUE_FRAME_ID (saved_array);
++  if (VALUE_LVAL (array) != lval_internalvar)
++    set_value_address (array, value_byte_address + value_byte_offset);
++
++  if (!value_lazy (saved_array))
++    {
++      allocate_value_contents (array);
++      set_value_lazy (array, 0);
+ 
+-  return value_slice (array, low_bound, high_bound - low_bound + 1);
++      memcpy (value_contents_writeable (array),
++	      value_contents (saved_array) + value_byte_offset,
++	      TYPE_LENGTH (new_array_type));
++    }
++
++  do_cleanups (old_chain);
++  return array;
+ }
+ 
+ 
+@@ -806,6 +978,7 @@ evaluate_subexp_standard (struct type *expect_type,
    int save_pos1;
    struct symbol *function = NULL;
    char *function_name = NULL;
@@ -2728,7 +2911,7 @@ index 8394623..3d3a31e 100644
  
    pc = (*pos)++;
    op = exp->elts[pc].opcode;
-@@ -1847,6 +1849,8 @@ evaluate_subexp_standard (struct type *expect_type,
+@@ -1849,6 +2022,8 @@ evaluate_subexp_standard (struct type *expect_type,
  	      return value_zero (builtin_type (exp->gdbarch)->builtin_int,
  				 not_lval);
  	    }
@@ -2737,7 +2920,7 @@ index 8394623..3d3a31e 100644
  	  else if (TYPE_TARGET_TYPE (ftype))
  	    return allocate_value (TYPE_TARGET_TYPE (ftype));
  	  else
-@@ -1875,6 +1879,8 @@ evaluate_subexp_standard (struct type *expect_type,
+@@ -1877,6 +2052,8 @@ evaluate_subexp_standard (struct type *expect_type,
  
        /* First determine the type code we are dealing with.  */
        arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
@@ -2746,7 +2929,7 @@ index 8394623..3d3a31e 100644
        type = check_typedef (value_type (arg1));
        code = TYPE_CODE (type);
  
-@@ -1895,6 +1901,7 @@ evaluate_subexp_standard (struct type *expect_type,
+@@ -1897,23 +2074,13 @@ evaluate_subexp_standard (struct type *expect_type,
  	      code = TYPE_CODE (type);
  	    }
  	} 
@@ -2754,76 +2937,75 @@ index 8394623..3d3a31e 100644
  
        switch (code)
  	{
-@@ -2354,13 +2361,19 @@ evaluate_subexp_standard (struct type *expect_type,
-       {
- 	int subscript_array[MAX_FORTRAN_DIMS];
- 	int array_size_array[MAX_FORTRAN_DIMS];
-+	int byte_stride_array[MAX_FORTRAN_DIMS];
- 	int ndimensions = 1, i;
- 	struct type *tmp_type;
- 	int offset_item;	/* The array offset where the item lives */
-+	CORE_ADDR offset_byte;	/* byte_stride based offset  */
-+	unsigned element_size;
- 
- 	if (nargs > MAX_FORTRAN_DIMS)
- 	  error (_("Too many subscripts for F77 (%d Max)"), MAX_FORTRAN_DIMS);
- 
-+	old_chain = make_cleanup (null_cleanup, 0);
-+	object_address_set (value_raw_address (arg1));
-+
- 	tmp_type = check_typedef (value_type (arg1));
- 	ndimensions = calc_f77_array_dims (type);
- 
-@@ -2390,6 +2403,9 @@ evaluate_subexp_standard (struct type *expect_type,
- 	    upper = f77_get_upperbound (tmp_type);
- 	    lower = f77_get_lowerbound (tmp_type);
- 
-+	    byte_stride_array[nargs - i - 1] =
-+					TYPE_ARRAY_BYTE_STRIDE_VALUE (tmp_type);
-+
- 	    array_size_array[nargs - i - 1] = upper - lower + 1;
- 
- 	    /* Zero-normalize subscripts so that offsetting will work. */
-@@ -2408,13 +2424,25 @@ evaluate_subexp_standard (struct type *expect_type,
- 	      tmp_type = check_typedef (TYPE_TARGET_TYPE (tmp_type));
- 	  }
- 
-+	/* Kept for the f77_get_upperbound / f77_get_lowerbound calls above.  */
-+	do_cleanups (old_chain);
-+
- 	/* Now let us calculate the offset for this item */
- 
--	offset_item = subscript_array[ndimensions - 1];
-+	offset_item = 0;
-+	offset_byte = 0;
-+
-+	for (i = ndimensions - 1; i >= 0; --i)
-+	  {
-+	    offset_item *= array_size_array[i];
-+	    if (byte_stride_array[i] == 0)
-+	      offset_item += subscript_array[i];
-+	    else
-+	      offset_byte += subscript_array[i] * byte_stride_array[i];
-+	  }
- 
--	for (i = ndimensions - 1; i > 0; --i)
--	  offset_item =
--	    array_size_array[i - 1] * offset_item + subscript_array[i - 1];
-+	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
-@@ -2424,7 +2452,7 @@ evaluate_subexp_standard (struct type *expect_type,
- 	   returns the correct type value */
+ 	case TYPE_CODE_ARRAY:
+-	  if (exp->elts[*pos].opcode == OP_F90_RANGE)
+-	    return value_f90_subarray (arg1, exp, pos, noside);
+-	  else
+-	    goto multi_f77_subscript;
+-
+ 	case TYPE_CODE_STRING:
+-	  if (exp->elts[*pos].opcode == OP_F90_RANGE)
+-	    return value_f90_subarray (arg1, exp, pos, noside);
+-	  else
+-	    {
+-	      arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
+-	      return value_subscript (arg1, value_as_long (arg2));
+-	    }
++	  return value_f90_subarray (arg1, exp, pos, nargs, noside);
  
- 	deprecated_set_value_type (arg1, tmp_type);
--	return value_subscripted_rvalue (arg1, offset_item, 0);
-+	return value_subscripted_rvalue (arg1, offset_byte);
-       }
+ 	case TYPE_CODE_PTR:
+ 	case TYPE_CODE_FUNC:
+@@ -2352,49 +2519,6 @@ evaluate_subexp_standard (struct type *expect_type,
+ 	}
+       return (arg1);
  
+-    multi_f77_subscript:
+-      {
+-	LONGEST subscript_array[MAX_FORTRAN_DIMS];
+-	int ndimensions = 1, i;
+-	struct value *array = arg1;
+-
+-	if (nargs > MAX_FORTRAN_DIMS)
+-	  error (_("Too many subscripts for F77 (%d Max)"), MAX_FORTRAN_DIMS);
+-
+-	ndimensions = calc_f77_array_dims (type);
+-
+-	if (nargs != ndimensions)
+-	  error (_("Wrong number of subscripts"));
+-
+-	gdb_assert (nargs > 0);
+-
+-	/* Now that we know we have a legal array subscript expression 
+-	   let us actually find out where this element exists in the array.  */
+-
+-	/* Take array indices left to right.  */
+-	for (i = 0; i < nargs; i++)
+-	  {
+-	    /* Evaluate each subscript; it must be a legal integer in F77.  */
+-	    arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
+-
+-	    /* Fill in the subscript array.  */
+-
+-	    subscript_array[i] = value_as_long (arg2);
+-	  }
+-
+-	/* Internal type of array is arranged right to left.  */
+-	for (i = nargs; i > 0; i--)
+-	  {
+-	    struct type *array_type = check_typedef (value_type (array));
+-	    LONGEST index = subscript_array[i - 1];
+-
+-	    lower = f77_get_lowerbound (array_type);
+-	    array = value_subscripted_rvalue (array, index, lower);
+-	  }
+-
+-	return array;
+-      }
+-
      case BINOP_LOGICAL_AND:
-@@ -2658,15 +2686,23 @@ evaluate_subexp_standard (struct type *expect_type,
+       arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+       if (noside == EVAL_SKIP)
+@@ -2626,15 +2750,23 @@ evaluate_subexp_standard (struct type *expect_type,
        if (expect_type && TYPE_CODE (expect_type) == TYPE_CODE_PTR)
  	expect_type = TYPE_TARGET_TYPE (check_typedef (expect_type));
        arg1 = evaluate_subexp (expect_type, exp, pos, noside);
@@ -2849,7 +3031,7 @@ index 8394623..3d3a31e 100644
        else if (noside == EVAL_AVOID_SIDE_EFFECTS)
  	{
  	  type = check_typedef (value_type (arg1));
-@@ -2675,12 +2711,18 @@ evaluate_subexp_standard (struct type *expect_type,
+@@ -2643,12 +2775,18 @@ evaluate_subexp_standard (struct type *expect_type,
  	  /* In C you can dereference an array to get the 1st elt.  */
  	      || TYPE_CODE (type) == TYPE_CODE_ARRAY
  	    )
@@ -2873,7 +3055,7 @@ index 8394623..3d3a31e 100644
  	  else
  	    error (_("Attempt to take contents of a non-pointer value."));
  	}
-@@ -2690,9 +2732,14 @@ evaluate_subexp_standard (struct type *expect_type,
+@@ -2658,9 +2796,14 @@ evaluate_subexp_standard (struct type *expect_type,
  	 do.  "long long" variables are rare enough that
  	 BUILTIN_TYPE_LONGEST would seem to be a mistake.  */
        if (TYPE_CODE (type) == TYPE_CODE_INT)
@@ -2891,7 +3073,7 @@ index 8394623..3d3a31e 100644
  
      case UNOP_ADDR:
        /* C++: check for and handle pointer to members.  */
-@@ -3040,7 +3087,7 @@ evaluate_subexp_with_coercion (struct expression *exp,
+@@ -3006,7 +3149,7 @@ evaluate_subexp_with_coercion (struct expression *exp,
  {
    enum exp_opcode op;
    int pc;
@@ -2900,7 +3082,7 @@ index 8394623..3d3a31e 100644
    struct symbol *var;
    struct type *type;
  
-@@ -3051,13 +3098,18 @@ evaluate_subexp_with_coercion (struct expression *exp,
+@@ -3017,13 +3160,18 @@ evaluate_subexp_with_coercion (struct expression *exp,
      {
      case OP_VAR_VALUE:
        var = exp->elts[pc + 2].symbol;
@@ -2920,7 +3102,7 @@ index 8394623..3d3a31e 100644
  	  return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)),
  			     val);
  	}
-@@ -3109,9 +3161,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos)
+@@ -3075,9 +3223,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos)
  
      case OP_VAR_VALUE:
        (*pos) += 4;
@@ -2937,8 +3119,59 @@ index 8394623..3d3a31e 100644
  
      default:
        val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
+@@ -3108,18 +3260,25 @@ parse_and_eval_type (char *p, int length)
+ int
+ calc_f77_array_dims (struct type *array_type)
+ {
+-  int ndimen = 1;
+-  struct type *tmp_type;
++  switch (TYPE_CODE (array_type))
++    {
++    case TYPE_CODE_STRING:
++      return 1;
+ 
+-  if ((TYPE_CODE (array_type) != TYPE_CODE_ARRAY))
+-    error (_("Can't get dimensions for a non-array type"));
++    case TYPE_CODE_ARRAY:
++      {
++	int ndimen = 1;
+ 
+-  tmp_type = array_type;
++	while ((array_type = TYPE_TARGET_TYPE (array_type)))
++	  {
++	    if (TYPE_CODE (array_type) == TYPE_CODE_ARRAY)
++	      ++ndimen;
++	  }
++	return ndimen;
++      }
+ 
+-  while ((tmp_type = TYPE_TARGET_TYPE (tmp_type)))
+-    {
+-      if (TYPE_CODE (tmp_type) == TYPE_CODE_ARRAY)
+-	++ndimen;
++    default:
++      error (_("Can't get dimensions for a non-array/non-string type"));
+     }
+-  return ndimen;
++
+ }
+diff --git a/gdb/f-exp.y b/gdb/f-exp.y
+index 02745c8..3a730e7 100644
+--- a/gdb/f-exp.y
++++ b/gdb/f-exp.y
+@@ -293,7 +293,9 @@ arglist :	subrange
+ 			{ arglist_len = 1; }
+ 	;
+    
+-arglist	:	arglist ',' exp   %prec ABOVE_COMMA
++arglist	:	arglist ',' exp       %prec ABOVE_COMMA
++			{ arglist_len++; }
++	|	arglist ',' subrange  %prec ABOVE_COMMA
+ 			{ arglist_len++; }
+ 	;
+ 
 diff --git a/gdb/f-lang.h b/gdb/f-lang.h
-index 5c2692d..b52ae74 100644
+index 8043577..94a5f31 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 */
@@ -2953,7 +3186,7 @@ index 5c2692d..b52ae74 100644
  			struct ui_file *, int,
  			const struct value *,
 diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
-index 6618188..968de7a 100644
+index ad988d2..985fef6 100644
 --- a/gdb/f-typeprint.c
 +++ b/gdb/f-typeprint.c
 @@ -32,7 +32,7 @@
@@ -3021,18 +3254,18 @@ index 6618188..968de7a 100644
      {
      case TYPE_CODE_ARRAY:
 diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
-index 64c0989..787b4aa 100644
+index 4d26ade..206a62b 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. */
+    n is 1 based.  */
  
 -#define F77_DIM_SIZE(n) (f77_array_offset_tbl[n][1])
 +#define F77_DIM_COUNT(n) (f77_array_offset_tbl[n][1])
  
--/* The following gives us the offset for row n where n is 1-based. */
-+/* The following gives us the element size for row n where n is 1-based. */
+-/* The following gives us the offset for row n where n is 1-based.  */
++/* The following gives us the element size for row n where n is 1-based.  */
  
 -#define F77_DIM_OFFSET(n) (f77_array_offset_tbl[n][0])
 +#define F77_DIM_BYTE_STRIDE(n) (f77_array_offset_tbl[n][0])
@@ -3086,8 +3319,8 @@ index 64c0989..787b4aa 100644
 +  /* Now we multiply eltlen by all the BYTE_STRIDEs, so that later we
       can print out array elements correctly.  Up till now we 
 -     know an offset to apply to get the item but we also 
-+     know an eltlen to apply to get the item but we also
-      have to know how much to add to get to the next item */
++     know an eltlen to apply to get the item but we also 
+      have to know how much to add to get to the next item.  */
  
    ndimen--;
    eltlen = TYPE_LENGTH (tmp_type);
@@ -3160,173 +3393,8 @@ index 64c0989..787b4aa 100644
    CHECK_TYPEDEF (type);
    switch (TYPE_CODE (type))
      {
-diff --git a/gdb/findcmd.c b/gdb/findcmd.c
-index c21c028..4ff9177 100644
---- a/gdb/findcmd.c
-+++ b/gdb/findcmd.c
-@@ -45,6 +45,41 @@ put_bits (bfd_uint64_t data, char *buf, int bits, bfd_boolean big_p)
-     }
- }
- 
-+/* Allocates a buffer in *PATTERN_BUF, with a hard-coded initial size which
-+   will be returned in *PATTERN_BUF_SIZE. *PATTERN_BUF_END points to the same
-+   place as *PATTERN_BUF, indicating that the buffer is initially empty.  */
-+
-+void
-+allocate_pattern_buffer (char **pattern_buf, char **pattern_buf_end,
-+			 ULONGEST *pattern_buf_size)
-+{
-+#define INITIAL_PATTERN_BUF_SIZE 100
-+  *pattern_buf_size = INITIAL_PATTERN_BUF_SIZE;
-+  *pattern_buf = xmalloc (*pattern_buf_size);
-+  *pattern_buf_end = *pattern_buf;
-+}
-+
-+/* Grows *PATTERN_BUF by a factor of two if it's not large enough to hold
-+   VAL_BYTES more bytes  or a 64-bit value, whichever is larger.
-+   *PATTERN_BUF_END is updated as necessary.  */
-+
-+void
-+increase_pattern_buffer (char **pattern_buf, char **pattern_buf_end,
-+			 ULONGEST *pattern_buf_size, int val_bytes)
-+{
-+    /* Keep it simple and assume size == 'g' when watching for when we
-+       need to grow the pattern buf.  */
-+    if ((*pattern_buf_end - *pattern_buf + max (val_bytes, sizeof (int64_t)))
-+	> *pattern_buf_size)
-+      {
-+	size_t current_offset = *pattern_buf_end - *pattern_buf;
-+
-+	*pattern_buf_size *= 2;
-+	*pattern_buf = xrealloc (*pattern_buf, *pattern_buf_size);
-+	*pattern_buf_end = *pattern_buf + current_offset;
-+      }
-+}
-+
- /* Subroutine of find_command to simplify it.
-    Parse the arguments of the "find" command.  */
- 
-@@ -61,8 +96,7 @@ parse_find_args (char *args, ULONGEST *max_countp,
-   char *pattern_buf;
-   /* Current size of search pattern buffer.
-      We realloc space as needed.  */
--#define INITIAL_PATTERN_BUF_SIZE 100
--  ULONGEST pattern_buf_size = INITIAL_PATTERN_BUF_SIZE;
-+  ULONGEST pattern_buf_size;
-   /* Pointer to one past the last in-use part of pattern_buf.  */
-   char *pattern_buf_end;
-   ULONGEST pattern_len;
-@@ -75,8 +109,7 @@ parse_find_args (char *args, ULONGEST *max_countp,
-   if (args == NULL)
-     error (_("Missing search parameters."));
- 
--  pattern_buf = xmalloc (pattern_buf_size);
--  pattern_buf_end = pattern_buf;
-+  allocate_pattern_buffer (&pattern_buf, &pattern_buf_end, &pattern_buf_size);
-   old_cleanups = make_cleanup (free_current_contents, &pattern_buf);
- 
-   /* Get search granularity and/or max count if specified.
-@@ -176,17 +209,9 @@ parse_find_args (char *args, ULONGEST *max_countp,
-       v = parse_to_comma_and_eval (&s);
-       val_bytes = TYPE_LENGTH (value_type (v));
- 
--      /* Keep it simple and assume size == 'g' when watching for when we
--	 need to grow the pattern buf.  */
--      if ((pattern_buf_end - pattern_buf + max (val_bytes, sizeof (int64_t)))
--	  > pattern_buf_size)
--	{
--	  size_t current_offset = pattern_buf_end - pattern_buf;
-+      increase_pattern_buffer (&pattern_buf, &pattern_buf_end,
-+			       &pattern_buf_size, val_bytes);
- 
--	  pattern_buf_size *= 2;
--	  pattern_buf = xrealloc (pattern_buf, pattern_buf_size);
--	  pattern_buf_end = pattern_buf + current_offset;
--	}
- 
-       if (size != '\0')
- 	{
-@@ -241,6 +266,45 @@ parse_find_args (char *args, ULONGEST *max_countp,
-   discard_cleanups (old_cleanups);
- }
- 
-+/* Drives target_search_memory to sweep through the specified search space,
-+   possibly in several iterations (with one call to this function for each
-+   iteration).  *START_ADDR is the address where the search starts, and is
-+   updated to the next starting address to continue the search.
-+   *SEARCH_SPACE_LEN is the amount of bytes which will be searched, and is
-+   updated for the next iteration. PATTERN_BUF holds the pattern to be searched
-+   for, PATTERN_LEN is the size of the pattern in bytes.  If a match is found,
-+   it's address is put in *FOUND_ADDR.
-+
-+   Returns 1 if found, 0 if not found, and -1 if there was an error requiring
-+   halting of the search (e.g. memory read error).  */
-+
-+int
-+search_memory (CORE_ADDR *start_addr, ULONGEST *search_space_len,
-+	       const char *pattern_buf, ULONGEST pattern_len,
-+	       CORE_ADDR *found_addr)
-+{
-+  /* Offset from start of this iteration to the next iteration.  */
-+  ULONGEST next_iter_incr;
-+  int found;
-+    
-+  found = target_search_memory (*start_addr, *search_space_len,
-+				pattern_buf, pattern_len, found_addr);
-+  if (found <= 0)
-+    return found;
-+
-+  /* Begin next iteration at one byte past this match.  */
-+  next_iter_incr = (*found_addr - *start_addr) + 1;
-+
-+  /* For robustness, we don't let search_space_len go -ve here.  */
-+  if (*search_space_len >= next_iter_incr)
-+    *search_space_len -= next_iter_incr;
-+  else
-+    *search_space_len = 0;
-+  *start_addr += next_iter_incr;
-+
-+  return found;
-+}
-+
- static void
- find_command (char *args, int from_tty)
- {
-@@ -271,12 +335,11 @@ find_command (char *args, int from_tty)
-   while (search_space_len >= pattern_len
- 	 && found_count < max_count)
-     {
--      /* Offset from start of this iteration to the next iteration.  */
--      ULONGEST next_iter_incr;
-       CORE_ADDR found_addr;
--      int found = target_search_memory (start_addr, search_space_len,
--					pattern_buf, pattern_len, &found_addr);
-+      int found;
- 
-+      found = search_memory (&start_addr, &search_space_len, pattern_buf,
-+			     pattern_len, &found_addr);
-       if (found <= 0)
- 	break;
- 
-@@ -284,16 +347,6 @@ find_command (char *args, int from_tty)
-       printf_filtered ("\n");
-       ++found_count;
-       last_found_addr = found_addr;
--
--      /* Begin next iteration at one byte past this match.  */
--      next_iter_incr = (found_addr - start_addr) + 1;
--
--      /* For robustness, we don't let search_space_len go -ve here.  */
--      if (search_space_len >= next_iter_incr)
--	search_space_len -= next_iter_incr;
--      else
--	search_space_len = 0;
--      start_addr += next_iter_incr;
-     }
- 
-   /* Record and print the results.  */
 diff --git a/gdb/findvar.c b/gdb/findvar.c
-index 5f97422..2c2670e 100644
+index 6463342..951c2fe 100644
 --- a/gdb/findvar.c
 +++ b/gdb/findvar.c
 @@ -35,6 +35,7 @@
@@ -3337,11 +3405,13 @@ index 5f97422..2c2670e 100644
  
  /* Basic byte-swapping routines.  All 'extract' functions return a
     host-format integer from a target-format integer at ADDR which is
-@@ -401,27 +402,16 @@ symbol_read_needs_frame (struct symbol *sym)
+@@ -399,8 +400,11 @@ symbol_read_needs_frame (struct symbol *sym)
+ 
  /* Given a struct symbol for a variable,
     and a stack frame id, read the value of the variable
-    and return a (pointer to a) struct value containing the value. 
+-   and return a (pointer to a) struct value containing the value.
 -   If the variable cannot be found, return a zero pointer.  */
++   and return a (pointer to a) struct value containing the value. 
 +   If the variable cannot be found, return a zero pointer.
 +   We have to first find the address of the variable before allocating struct
 +   value to return as its size may depend on DW_OP_PUSH_OBJECT_ADDRESS possibly
@@ -3349,171 +3419,106 @@ index 5f97422..2c2670e 100644
  
  struct value *
  read_var_value (struct symbol *var, struct frame_info *frame)
- {
--  struct value *v;
+@@ -408,16 +412,6 @@ read_var_value (struct symbol *var, struct frame_info *frame)
+   struct value *v;
    struct type *type = SYMBOL_TYPE (var);
    CORE_ADDR addr;
 -  int len;
 -
--  if (SYMBOL_CLASS (var) == LOC_COMPUTED
--      || SYMBOL_CLASS (var) == LOC_REGISTER)
--    /* These cases do not use V.  */
--    v = NULL;
--  else
--    {
--      v = allocate_value (type);
--      VALUE_LVAL (v) = lval_memory;	/* The most likely possibility.  */
--    }
+-  /* Call check_typedef on our type to make sure that, if TYPE is
+-     a TYPE_CODE_TYPEDEF, its length is set to the length of the target type
+-     instead of zero.  However, we do not replace the typedef type by the
+-     target type, because we want to keep the typedef in order to be able to
+-     set the returned value type description correctly.  */
+-  check_typedef (type);
 -
 -  len = TYPE_LENGTH (type);
  
    if (symbol_read_needs_frame (var))
      gdb_assert (frame);
-@@ -429,33 +419,43 @@ read_var_value (struct symbol *var, struct frame_info *frame)
-   switch (SYMBOL_CLASS (var))
-     {
+@@ -427,7 +421,7 @@ read_var_value (struct symbol *var, struct frame_info *frame)
      case LOC_CONST:
--      /* Put the constant back in target format.  */
+       /* Put the constant back in target format.  */
+       v = allocate_value (type);
 -      store_signed_integer (value_contents_raw (v), len,
--			    gdbarch_byte_order (get_type_arch (type)),
--			    (LONGEST) SYMBOL_VALUE (var));
--      VALUE_LVAL (v) = not_lval;
--      return v;
-+      {
-+	/* Put the constant back in target format.  */
-+	struct value *v = allocate_value (type);
-+	VALUE_LVAL (v) = not_lval;
-+	store_signed_integer (value_contents_raw (v), TYPE_LENGTH (type),
-+			      gdbarch_byte_order (get_type_arch (type)),
-+			      (LONGEST) SYMBOL_VALUE (var));
-+	return v;
-+      }
- 
-     case LOC_LABEL:
--      /* Put the constant back in target format.  */
--      if (overlay_debugging)
--	{
--	  CORE_ADDR addr
--	    = symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (var),
--					SYMBOL_OBJ_SECTION (var));
-+      {
-+	/* Put the constant back in target format.  */
-+	struct value *v = allocate_value (type);
-+	VALUE_LVAL (v) = not_lval;
-+	if (overlay_debugging)
-+	  {
-+	    CORE_ADDR addr
-+	      = symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (var),
-+					  SYMBOL_OBJ_SECTION (var));
- 
--	  store_typed_address (value_contents_raw (v), type, addr);
--	}
--      else
--	store_typed_address (value_contents_raw (v), type,
--			      SYMBOL_VALUE_ADDRESS (var));
--      VALUE_LVAL (v) = not_lval;
--      return v;
-+	    store_typed_address (value_contents_raw (v), type, addr);
-+	  }
-+	else
-+	  store_typed_address (value_contents_raw (v), type,
-+				SYMBOL_VALUE_ADDRESS (var));
-+	return v;
-+      }
++      store_signed_integer (value_contents_raw (v), TYPE_LENGTH (type),
+ 			    gdbarch_byte_order (get_type_arch (type)),
+ 			    (LONGEST) SYMBOL_VALUE (var));
+       VALUE_LVAL (v) = not_lval;
+@@ -452,12 +446,12 @@ read_var_value (struct symbol *var, struct frame_info *frame)
  
      case LOC_CONST_BYTES:
+       v = allocate_value (type);
 -      memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var), len);
--      VALUE_LVAL (v) = not_lval;
--      return v;
-+      {
-+	struct value *v = allocate_value (type);
-+	VALUE_LVAL (v) = not_lval;
-+	memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var),
-+		TYPE_LENGTH (type));
-+	return v;
-+      }
++      memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var),
++	      TYPE_LENGTH (type));
+       VALUE_LVAL (v) = not_lval;
+       return v;
  
      case LOC_STATIC:
+-      v = allocate_value_lazy (type);
        if (overlay_debugging)
-@@ -496,12 +496,23 @@ read_var_value (struct symbol *var, struct frame_info *frame)
+ 	addr = symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (var),
+ 					 SYMBOL_OBJ_SECTION (var));
+@@ -470,7 +464,6 @@ read_var_value (struct symbol *var, struct frame_info *frame)
+       if (!addr)
+ 	return 0;
+       addr += SYMBOL_VALUE (var);
+-      v = allocate_value_lazy (type);
        break;
  
-     case LOC_BLOCK:
--      if (overlay_debugging)
--	set_value_address (v, symbol_overlayed_address
--	  (BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_OBJ_SECTION (var)));
--      else
--	set_value_address (v, BLOCK_START (SYMBOL_BLOCK_VALUE (var)));
--      return v;
-+      {
-+        CORE_ADDR addr;
-+	struct value *v;
-+
-+	if (overlay_debugging)
-+	  addr = symbol_overlayed_address
-+	    (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
-+	   DW_OP_push_object_address.  */
-+	object_address_set (addr);
-+	v = allocate_value (type);
-+	VALUE_LVAL (v) = lval_memory;
-+	set_value_address (v, addr);
-+	return v;
-+      }
+     case LOC_REF_ARG:
+@@ -484,14 +477,12 @@ read_var_value (struct symbol *var, struct frame_info *frame)
+ 	argref += SYMBOL_VALUE (var);
+ 	ref = value_at (lookup_pointer_type (type), argref);
+ 	addr = value_as_address (ref);
+-	v = allocate_value_lazy (type);
+ 	break;
+       }
+ 
+     case LOC_LOCAL:
+       addr = get_frame_locals_address (frame);
+       addr += SYMBOL_VALUE (var);
+-      v = allocate_value_lazy (type);
+       break;
+ 
+     case LOC_TYPEDEF:
+@@ -499,7 +490,6 @@ read_var_value (struct symbol *var, struct frame_info *frame)
+       break;
  
-     case LOC_REGISTER:
-     case LOC_REGPARM_ADDR:
-@@ -520,7 +531,6 @@ read_var_value (struct symbol *var, struct frame_info *frame)
+     case LOC_BLOCK:
+-      v = allocate_value_lazy (type);
+       if (overlay_debugging)
+ 	addr = symbol_overlayed_address
+ 	  (BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_OBJ_SECTION (var));
+@@ -524,7 +514,6 @@ read_var_value (struct symbol *var, struct frame_info *frame)
  	      error (_("Value of register variable not available."));
  
  	    addr = value_as_address (regval);
--	    VALUE_LVAL (v) = lval_memory;
+-	    v = allocate_value_lazy (type);
  	  }
  	else
  	  {
-@@ -563,18 +573,33 @@ read_var_value (struct symbol *var, struct frame_info *frame)
+@@ -563,7 +552,6 @@ read_var_value (struct symbol *var, struct frame_info *frame)
+ 	if (obj_section
+ 	    && (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
+ 	  addr = target_translate_tls_address (obj_section->objfile, addr);
+-	v = allocate_value_lazy (type);
+       }
        break;
  
-     case LOC_OPTIMIZED_OUT:
--      VALUE_LVAL (v) = not_lval;
--      set_value_optimized_out (v, 1);
--      return v;
-+      {
-+        struct value *v = allocate_value (type);
-+
-+	VALUE_LVAL (v) = not_lval;
-+	set_value_optimized_out (v, 1);
-+	return v;
-+      }
- 
-     default:
-       error (_("Cannot look up value of a botched symbol."));
+@@ -578,6 +566,10 @@ read_var_value (struct symbol *var, struct frame_info *frame)
        break;
      }
  
--  set_value_address (v, addr);
--  set_value_lazy (v, 1);
--  return v;
-+  {
-+    struct value *v;
-+
-+    /* ADDR is set here for ALLOCATE_VALUE's CHECK_TYPEDEF for
-+       DW_OP_PUSH_OBJECT_ADDRESS.  */
-+    object_address_set (addr);
-+    v = allocate_value (type);
-+    VALUE_LVAL (v) = lval_memory;
-+    set_value_address (v, addr);
-+
-+    set_value_lazy (v, 1);
-+
-+    return v;
-+  }
- }
- 
- /* Install default attributes for register values.  */
-@@ -611,10 +636,11 @@ struct value *
++  /* ADDR is set here for ALLOCATE_VALUE's CHECK_TYPEDEF for
++     DW_OP_PUSH_OBJECT_ADDRESS.  */
++  object_address_set (addr);
++  v = allocate_value_lazy (type);
+   VALUE_LVAL (v) = lval_memory;
+   set_value_address (v, addr);
+   return v;
+@@ -617,10 +609,11 @@ struct value *
  value_from_register (struct type *type, int regnum, struct frame_info *frame)
  {
    struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -3527,7 +3532,7 @@ index 5f97422..2c2670e 100644
      {
        /* The ISA/ABI need to something weird when obtaining the
           specified value from this register.  It might need to
-@@ -628,7 +654,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
+@@ -634,7 +627,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,
@@ -3557,7 +3562,7 @@ index ffb7f53..a2e7e94 100644
  
  b internal_error
 diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
-index 00a7075..eaadac0 100644
+index 2cf1b4d..d145fd9 100644
 --- a/gdb/gdbtypes.c
 +++ b/gdb/gdbtypes.c
 @@ -39,6 +39,9 @@
@@ -3570,9 +3575,12 @@ index 00a7075..eaadac0 100644
  
  
  /* Initialize BADNESS constants.  */
-@@ -145,6 +148,11 @@ static void print_arg_types (struct field *, int, int);
+@@ -144,7 +147,14 @@ static void print_bit_vector (B_TYPE *, int);
+ static void print_arg_types (struct field *, int, int);
  static void dump_fn_fieldlists (struct type *, int);
  static void print_cplus_stuff (struct type *, int);
++static LONGEST type_length_get (struct type *type, struct type *target_type,
++				int full_span);
  
 +/* The hash table holding all discardable `struct type *' references.  */
 +static htab_t type_discardable_table;
@@ -3582,7 +3590,7 @@ index 00a7075..eaadac0 100644
  
  /* Allocate a new OBJFILE-associated type structure and fill it
     with some defaults.  Space for the type structure is allocated
-@@ -175,6 +183,39 @@ alloc_type (struct objfile *objfile)
+@@ -175,6 +185,39 @@ alloc_type (struct objfile *objfile)
    return type;
  }
  
@@ -3622,7 +3630,7 @@ index 00a7075..eaadac0 100644
  /* Allocate a new GDBARCH-associated type structure and fill it
     with some defaults.  Space for the type structure is allocated
     on the heap.  */
-@@ -300,7 +341,7 @@ make_pointer_type (struct type *type, struct type **typeptr)
+@@ -300,7 +343,7 @@ make_pointer_type (struct type *type, struct type **typeptr)
  
    if (typeptr == 0 || *typeptr == 0)	/* We'll need to allocate one.  */
      {
@@ -3631,7 +3639,7 @@ index 00a7075..eaadac0 100644
        if (typeptr)
  	*typeptr = ntype;
      }
-@@ -377,7 +418,7 @@ make_reference_type (struct type *type, struct type **typeptr)
+@@ -377,7 +420,7 @@ make_reference_type (struct type *type, struct type **typeptr)
  
    if (typeptr == 0 || *typeptr == 0)	/* We'll need to allocate one.  */
      {
@@ -3640,7 +3648,7 @@ index 00a7075..eaadac0 100644
        if (typeptr)
  	*typeptr = ntype;
      }
-@@ -748,6 +789,7 @@ create_range_type (struct type *result_type, struct type *index_type,
+@@ -748,6 +791,7 @@ create_range_type (struct type *result_type, struct type *index_type,
      TYPE_ZALLOC (result_type, sizeof (struct range_bounds));
    TYPE_LOW_BOUND (result_type) = low_bound;
    TYPE_HIGH_BOUND (result_type) = high_bound;
@@ -3648,7 +3656,7 @@ index 00a7075..eaadac0 100644
  
    if (low_bound >= 0)
      TYPE_UNSIGNED (result_type) = 1;
-@@ -891,26 +933,45 @@ create_array_type (struct type *result_type,
+@@ -891,26 +935,31 @@ create_array_type (struct type *result_type,
  
    TYPE_CODE (result_type) = TYPE_CODE_ARRAY;
    TYPE_TARGET_TYPE (result_type) = element_type;
@@ -3669,34 +3677,20 @@ index 00a7075..eaadac0 100644
    TYPE_INDEX_TYPE (result_type) = range_type;
    TYPE_VPTR_FIELDNO (result_type) = -1;
  
--  /* TYPE_FLAG_TARGET_STUB will take care of zero length arrays */
+-  /* TYPE_FLAG_TARGET_STUB will take care of zero length arrays.  */
 +  /* DWARF blocks may depend on runtime information like
 +     DW_OP_PUSH_OBJECT_ADDRESS not being available during the
 +     CREATE_ARRAY_TYPE time.  */
 +  if (TYPE_RANGE_DATA (range_type)->low.kind != RANGE_BOUND_KIND_CONSTANT
-+      || TYPE_RANGE_DATA (range_type)->high.kind != RANGE_BOUND_KIND_CONSTANT
-+      || TYPE_LOW_BOUND_UNDEFINED (range_type) 
-+      || TYPE_HIGH_BOUND_UNDEFINED (range_type) 
-+      || get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
-+    {
-+      low_bound = 0;
-+      high_bound = -1;
-+    }
-+
-+  /* Be careful when setting the array length.  Ada arrays can be
-+     empty arrays with the high_bound being smaller than the low_bound.
-+     In such cases, the array length should be zero.  TYPE_TARGET_STUB needs to
-+     be checked as it may have dependencies on DWARF blocks depending on
-+     runtime information not available during the CREATE_ARRAY_TYPE time.  */
-+  if (high_bound < low_bound || TYPE_TARGET_STUB (element_type))
++      || TYPE_RANGE_DATA (range_type)->high.kind != RANGE_BOUND_KIND_CONSTANT
++      || TYPE_DYNAMIC (element_type))
 +    TYPE_LENGTH (result_type) = 0;
 +  else
 +    {
 +      CHECK_TYPEDEF (element_type);
-+      TYPE_LENGTH (result_type) =
-+	TYPE_LENGTH (element_type) * (high_bound - low_bound + 1);
++      TYPE_LENGTH (result_type) = type_length_get (result_type, element_type,
++						   0);
 +    }
-+
    if (TYPE_LENGTH (result_type) == 0)
 -    TYPE_TARGET_STUB (result_type) = 1;
 +    {
@@ -3707,7 +3701,7 @@ index 00a7075..eaadac0 100644
  
    return result_type;
  }
-@@ -1413,6 +1474,105 @@ stub_noname_complaint (void)
+@@ -1413,6 +1462,105 @@ stub_noname_complaint (void)
    complaint (&symfile_complaints, _("stub type has NULL name"));
  }
  
@@ -3813,7 +3807,7 @@ index 00a7075..eaadac0 100644
  /* 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
-@@ -1575,52 +1735,36 @@ check_typedef (struct type *type)
+@@ -1575,52 +1723,35 @@ check_typedef (struct type *type)
          }
      }
  
@@ -3823,7 +3817,6 @@ index 00a7075..eaadac0 100644
 +  if (TYPE_DYNAMIC (type))
 +    {
 +      htab_t copied_types;
-+      struct type *type_old = type;
 +
 +      copied_types = create_copied_types_hash (NULL);
 +      type = copy_type_recursive (type, copied_types);
@@ -3852,7 +3845,7 @@ index 00a7075..eaadac0 100644
  	  /* Now recompute the length of the array type, based on its
 -	     number of elements and the target type's length.
 -	     Watch out for Ada null Ada arrays where the high bound
--	     is smaller than the low bound. */
+-	     is smaller than the low bound.  */
 -	  const LONGEST low_bound = TYPE_LOW_BOUND (range_type);
 -	  const LONGEST high_bound = TYPE_HIGH_BOUND (range_type);
 -	  ULONGEST len;
@@ -3866,12 +3859,12 @@ index 00a7075..eaadac0 100644
 -		 that for x < 0, (ULONGEST) x == -x + ULONGEST_MAX + 1,
 -		 which is technically not guaranteed by C, but is usually true
 -		 (because it would be true if x were unsigned with its
--		 high-order bit on). It uses the fact that
+-		 high-order bit on).  It uses the fact that
 -		 high_bound-low_bound is always representable in
 -		 ULONGEST and that if high_bound-low_bound+1 overflows,
 -		 it overflows to 0.  We must change these tests if we 
 -		 decide to increase the representation of TYPE_LENGTH
--		 from unsigned int to ULONGEST. */
+-		 from unsigned int to ULONGEST.  */
 -	      ULONGEST ulow = low_bound, uhigh = high_bound;
 -	      ULONGEST tlen = TYPE_LENGTH (target_type);
 -
@@ -3886,7 +3879,7 @@ index 00a7075..eaadac0 100644
  	  TYPE_TARGET_STUB (type) = 0;
  	}
        else if (TYPE_CODE (type) == TYPE_CODE_RANGE)
-@@ -1628,6 +1772,7 @@ check_typedef (struct type *type)
+@@ -1628,6 +1759,7 @@ check_typedef (struct type *type)
  	  TYPE_LENGTH (type) = TYPE_LENGTH (target_type);
  	  TYPE_TARGET_STUB (type) = 0;
  	}
@@ -3894,7 +3887,7 @@ index 00a7075..eaadac0 100644
      }
  
    type = make_qualified_type (type, instance_flags, NULL);
-@@ -1902,6 +2047,8 @@ init_type (enum type_code code, int length, int flags,
+@@ -1902,6 +2034,8 @@ init_type (enum type_code code, int length, int flags,
      TYPE_STUB_SUPPORTED (type) = 1;
    if (flags & TYPE_FLAG_FIXED_INSTANCE)
      TYPE_FIXED_INSTANCE (type) = 1;
@@ -3903,7 +3896,7 @@ index 00a7075..eaadac0 100644
  
    if (name)
      TYPE_NAME (type) = obsavestring (name, strlen (name),
-@@ -3199,33 +3346,42 @@ type_pair_eq (const void *item_lhs, const void *item_rhs)
+@@ -3259,33 +3393,42 @@ type_pair_eq (const void *item_lhs, const void *item_rhs)
  }
  
  /* Allocate the hash table used by copy_type_recursive to walk
@@ -3961,7 +3954,7 @@ index 00a7075..eaadac0 100644
      return type;
  
    /* This type shouldn't be pointing to any types in other objfiles;
-@@ -3240,9 +3396,10 @@ copy_type_recursive (struct objfile *objfile,
+@@ -3300,9 +3443,10 @@ copy_type_recursive (struct objfile *objfile,
    new_type = alloc_type_arch (get_type_arch (type));
  
    /* We must add the new type to the hash table immediately, in case
@@ -3975,7 +3968,7 @@ index 00a7075..eaadac0 100644
    stored->old = type;
    stored->new = new_type;
    *slot = stored;
-@@ -3253,6 +3410,19 @@ copy_type_recursive (struct objfile *objfile,
+@@ -3313,6 +3457,19 @@ copy_type_recursive (struct objfile *objfile,
    TYPE_OBJFILE_OWNED (new_type) = 0;
    TYPE_OWNER (new_type).gdbarch = get_type_arch (type);
  
@@ -3995,7 +3988,7 @@ index 00a7075..eaadac0 100644
    if (TYPE_NAME (type))
      TYPE_NAME (new_type) = xstrdup (TYPE_NAME (type));
    if (TYPE_TAG_NAME (type))
-@@ -3261,12 +3431,48 @@ copy_type_recursive (struct objfile *objfile,
+@@ -3321,12 +3478,48 @@ copy_type_recursive (struct objfile *objfile,
    TYPE_INSTANCE_FLAGS (new_type) = TYPE_INSTANCE_FLAGS (type);
    TYPE_LENGTH (new_type) = TYPE_LENGTH (type);
  
@@ -4044,7 +4037,7 @@ index 00a7075..eaadac0 100644
        TYPE_FIELDS (new_type) = XCALLOC (nfields, struct field);
        for (i = 0; i < nfields; i++)
  	{
-@@ -3275,8 +3481,8 @@ copy_type_recursive (struct objfile *objfile,
+@@ -3335,8 +3528,8 @@ copy_type_recursive (struct objfile *objfile,
  	  TYPE_FIELD_BITSIZE (new_type, i) = TYPE_FIELD_BITSIZE (type, i);
  	  if (TYPE_FIELD_TYPE (type, i))
  	    TYPE_FIELD_TYPE (new_type, i)
@@ -4055,7 +4048,7 @@ index 00a7075..eaadac0 100644
  	  if (TYPE_FIELD_NAME (type, i))
  	    TYPE_FIELD_NAME (new_type, i) = 
  	      xstrdup (TYPE_FIELD_NAME (type, i));
-@@ -3303,24 +3509,166 @@ copy_type_recursive (struct objfile *objfile,
+@@ -3363,24 +3556,184 @@ copy_type_recursive (struct objfile *objfile,
  	}
      }
  
@@ -4063,7 +4056,7 @@ index 00a7075..eaadac0 100644
 +     possibly converted.  */
 +  TYPE_DYNAMIC (new_type) = 0;
 +
-   /* For range types, copy the bounds information. */
+   /* For range types, copy the bounds information.  */
 -  if (TYPE_CODE (type) == TYPE_CODE_RANGE)
 +  if (TYPE_CODE (new_type) == TYPE_CODE_RANGE)
      {
@@ -4087,8 +4080,12 @@ index 00a7075..eaadac0 100644
 +	      TYPE_LOW_BOUND_UNDEFINED (new_type) = 1;
 +	    }
 +	  else
-+	    TYPE_LOW_BOUND (new_type) = dwarf_locexpr_baton_eval
++	    {
++	      TYPE_LOW_BOUND (new_type) = dwarf_locexpr_baton_eval
 +				(TYPE_RANGE_DATA (new_type)->low.u.dwarf_block);
++	      if (TYPE_LOW_BOUND (new_type) >= 0)
++		TYPE_UNSIGNED (new_type) = 1;
++	    }
 +	  TYPE_RANGE_DATA (new_type)->low.kind = RANGE_BOUND_KIND_CONSTANT;
 +	  break;
 +	case RANGE_BOUND_KIND_DWARF_LOCLIST:
@@ -4104,7 +4101,11 @@ index 00a7075..eaadac0 100644
 +	        && dwarf_loclist_baton_eval
 +		  (TYPE_RANGE_DATA (new_type)->low.u.dwarf_loclist.loclist,
 +		   TYPE_RANGE_DATA (new_type)->low.u.dwarf_loclist.type, &addr))
-+	      TYPE_LOW_BOUND (new_type) = addr;
++	      {
++		TYPE_LOW_BOUND (new_type) = addr;
++		if (TYPE_LOW_BOUND (new_type) >= 0)
++		  TYPE_UNSIGNED (new_type) = 1;
++	      }
 +	    else
 +	      {
 +		/* We should set 1 for Fortran but how to find the language?  */
@@ -4226,10 +4227,20 @@ index 00a7075..eaadac0 100644
 +      copy_type_recursive_1 (objfile,
 +			     TYPE_VPTR_BASETYPE (type),
 +			     copied_types);
++
++  if (TYPE_CODE (new_type) == TYPE_CODE_ARRAY)
++    {
++      struct type *new_index_type = TYPE_INDEX_TYPE (new_type);
++
++      if (TYPE_BYTE_STRIDE (new_index_type) == 0)
++	TYPE_BYTE_STRIDE (new_index_type)
++	  = TYPE_LENGTH (TYPE_TARGET_TYPE (new_type));
++    }
++
    /* Maybe copy the type_specific bits.
  
       NOTE drow/2005-12-09: We do not copy the C++-specific bits like
-@@ -3337,6 +3685,17 @@ copy_type_recursive (struct objfile *objfile,
+@@ -3397,6 +3750,17 @@ copy_type_recursive (struct objfile *objfile,
    return new_type;
  }
  
@@ -4247,7 +4258,7 @@ index 00a7075..eaadac0 100644
  /* Make a copy of the given TYPE, except that the pointer & reference
     types are not preserved.
     
-@@ -3359,6 +3718,199 @@ copy_type (const struct type *type)
+@@ -3419,6 +3783,199 @@ copy_type (const struct type *type)
    return new_type;
  }
  
@@ -4447,7 +4458,7 @@ index 00a7075..eaadac0 100644
  
  /* Helper functions to initialize architecture-specific types.  */
  
-@@ -3707,6 +4259,8 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
+@@ -3767,6 +4324,8 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
      = lookup_pointer_type (builtin_type->builtin_void);
    builtin_type->builtin_func_ptr
      = lookup_pointer_type (lookup_function_type (builtin_type->builtin_void));
@@ -4456,7 +4467,7 @@ index 00a7075..eaadac0 100644
  
    /* This type represents a GDB internal function.  */
    builtin_type->internal_fn
-@@ -3820,6 +4374,18 @@ objfile_type (struct objfile *objfile)
+@@ -3880,6 +4439,18 @@ objfile_type (struct objfile *objfile)
  		 "<text variable, no debug info>", objfile);
    TYPE_TARGET_TYPE (objfile_type->nodebug_text_symbol)
      = objfile_type->builtin_int;
@@ -4475,7 +4486,7 @@ index 00a7075..eaadac0 100644
    objfile_type->nodebug_data_symbol
      = init_type (TYPE_CODE_INT,
  		 gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT, 0,
-@@ -3874,6 +4440,11 @@ void
+@@ -3934,6 +4505,11 @@ void
  _initialize_gdbtypes (void)
  {
    gdbtypes_data = gdbarch_data_register_post_init (gdbtypes_post_init);
@@ -4488,7 +4499,7 @@ index 00a7075..eaadac0 100644
  
    add_setshow_zinteger_cmd ("overload", no_class, &overload_debug,
 diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
-index 0353f96..a035bad 100644
+index debb41c..c31c9b8 100644
 --- a/gdb/gdbtypes.h
 +++ b/gdb/gdbtypes.h
 @@ -170,6 +170,7 @@ enum type_flag_value
@@ -4509,8 +4520,8 @@ index 0353f96..a035bad 100644
 +#define TYPE_DYNAMIC(t)		(TYPE_MAIN_TYPE (t)->flag_dynamic)
 +
  /* Static type.  If this is set, the corresponding type had 
-  * a static modifier.
-  * Note: This may be unnecessary, since static data members
+    a static modifier.
+    Note: This may be unnecessary, since static data members
 @@ -271,6 +277,12 @@ enum type_instance_flag_value
  
  #define TYPE_NOTTEXT(t)	(TYPE_INSTANCE_FLAGS (t) & TYPE_INSTANCE_FLAG_NOTTEXT)
@@ -4571,9 +4582,9 @@ index 0353f96..a035bad 100644
 +  (TYPE_MAIN_TYPE (t)->flag_data_location_is_addr)
 +
  /* Constant type.  If this is set, the corresponding type has a
-  * const modifier.
-  */
-@@ -389,11 +443,19 @@ struct main_type
+    const modifier.  */
+ 
+@@ -387,11 +441,19 @@ struct main_type
    unsigned int flag_varargs : 1;
    unsigned int flag_vector : 1;
    unsigned int flag_stub_supported : 1;
@@ -4593,7 +4604,7 @@ index 0353f96..a035bad 100644
  
    /* A discriminant telling us which field of the type_specific union
       is being used for this type, if any.  */
-@@ -467,6 +529,20 @@ struct main_type
+@@ -465,6 +527,20 @@ struct main_type
  
    struct type *target_type;
  
@@ -4614,7 +4625,7 @@ index 0353f96..a035bad 100644
    /* 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.
-@@ -541,13 +617,34 @@ struct main_type
+@@ -539,13 +615,34 @@ struct main_type
  
      struct range_bounds
      {
@@ -4640,21 +4651,21 @@ index 0353f96..a035bad 100644
 +	    }
 +	  kind;
 +	}
-       /* Low bound of range. */
+       /* Low bound of range.  */
 -
 -      LONGEST low;
 -
 +      low,
-       /* High bound of range. */
+       /* High bound of range.  */
 -
 -      LONGEST high;
 +      high,
-+      /* Byte stride of range. */
++      /* Byte stride of range.  */
 +      byte_stride;
  
        /* Flags indicating whether the values of low and high are
           valid.  When true, the respective range value is
-@@ -921,9 +1018,9 @@ extern void allocate_gnat_aux_type (struct type *);
+@@ -918,9 +1015,9 @@ extern void allocate_gnat_aux_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
@@ -4667,7 +4678,7 @@ index 0353f96..a035bad 100644
     calls check_typedef, TYPE_LENGTH (VALUE_TYPE (X)) is safe.  */
  #define TYPE_LENGTH(thistype) (thistype)->length
  /* Note that TYPE_CODE can be TYPE_CODE_TYPEDEF, so if you want the real
-@@ -931,11 +1028,16 @@ extern void allocate_gnat_aux_type (struct type *);
+@@ -928,11 +1025,16 @@ extern void allocate_gnat_aux_type (struct type *);
  #define TYPE_CODE(thistype) TYPE_MAIN_TYPE(thistype)->code
  #define TYPE_NFIELDS(thistype) TYPE_MAIN_TYPE(thistype)->nfields
  #define TYPE_FIELDS(thistype) TYPE_MAIN_TYPE(thistype)->flds_bnds.fields
@@ -4686,7 +4697,7 @@ index 0353f96..a035bad 100644
  #define TYPE_LOW_BOUND_UNDEFINED(range_type) \
     TYPE_RANGE_DATA(range_type)->low_undefined
  #define TYPE_HIGH_BOUND_UNDEFINED(range_type) \
-@@ -952,7 +1054,14 @@ extern void allocate_gnat_aux_type (struct type *);
+@@ -949,7 +1051,14 @@ extern void allocate_gnat_aux_type (struct type *);
     (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype))))
  
  #define TYPE_ARRAY_LOWER_BOUND_VALUE(arraytype) \
@@ -4702,7 +4713,7 @@ index 0353f96..a035bad 100644
  
  /* C++ */
  
-@@ -1181,6 +1290,10 @@ struct builtin_type
+@@ -1178,6 +1287,10 @@ struct builtin_type
       (*) () can server as a generic function pointer.  */
    struct type *builtin_func_ptr;
  
@@ -4713,7 +4724,7 @@ index 0353f96..a035bad 100644
  
    /* Special-purpose types.  */
  
-@@ -1221,6 +1334,8 @@ struct objfile_type
+@@ -1218,6 +1331,8 @@ struct objfile_type
  
    /* Types used for symbols with no debug information.  */
    struct type *nodebug_text_symbol;
@@ -4722,7 +4733,7 @@ index 0353f96..a035bad 100644
    struct type *nodebug_data_symbol;
    struct type *nodebug_unknown_symbol;
    struct type *nodebug_tls_symbol;
-@@ -1368,6 +1483,18 @@ extern struct type *create_array_type (struct type *, struct type *,
+@@ -1365,6 +1480,18 @@ extern struct type *create_array_type (struct type *, struct type *,
  				       struct type *);
  extern struct type *lookup_array_range_type (struct type *, int, int);
  
@@ -4741,7 +4752,7 @@ index 0353f96..a035bad 100644
  extern struct type *create_string_type (struct type *, struct type *,
  					struct type *);
  extern struct type *lookup_string_range_type (struct type *, int, int);
-@@ -1413,6 +1540,8 @@ extern int is_public_ancestor (struct type *, struct type *);
+@@ -1410,6 +1537,8 @@ extern int is_public_ancestor (struct type *, struct type *);
  
  extern int is_unique_ancestor (struct type *, struct value *);
  
@@ -4750,7 +4761,7 @@ index 0353f96..a035bad 100644
  /* Overload resolution */
  
  #define LENGTH_MATCH(bv) ((bv)->rank[0])
-@@ -1483,10 +1612,11 @@ extern void maintenance_print_type (char *, int);
+@@ -1482,10 +1611,11 @@ extern void maintenance_print_type (char *, int);
  
  extern htab_t create_copied_types_hash (struct objfile *objfile);
  
@@ -4765,10 +4776,10 @@ index 0353f96..a035bad 100644
 +
  #endif /* GDBTYPES_H */
 diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
-index ed555ef..6b5c458 100644
+index c3cbbcc..7f86c29 100644
 --- a/gdb/i386-linux-nat.c
 +++ b/gdb/i386-linux-nat.c
-@@ -633,22 +633,13 @@ i386_linux_store_inferior_registers (struct target_ops *ops,
+@@ -649,22 +649,13 @@ i386_linux_store_inferior_registers (struct target_ops *ops,
  }
  
  
@@ -4792,7 +4803,7 @@ index ed555ef..6b5c458 100644
    /* FIXME: kettenis/2001-03-27: Calling perror_with_name if the
       ptrace call fails breaks debugging remote targets.  The correct
       way to fix this is to add the hardware breakpoint and watchpoint
-@@ -670,14 +661,8 @@ i386_linux_dr_get (ptid_t ptid, int regnum)
+@@ -686,14 +677,8 @@ i386_linux_dr_get (ptid_t ptid, int regnum)
  /* Set debug register REGNUM to VALUE in only the one LWP of PTID.  */
  
  static void
@@ -4808,7 +4819,7 @@ index ed555ef..6b5c458 100644
    errno = 0;
    ptrace (PTRACE_POKEUSER, tid,
  	  offsetof (struct user, u_debugreg[regnum]), value);
-@@ -685,35 +670,78 @@ i386_linux_dr_set (ptid_t ptid, int regnum, unsigned long value)
+@@ -701,35 +686,78 @@ i386_linux_dr_set (ptid_t ptid, int regnum, unsigned long value)
      perror_with_name (_("Couldn't write debug register"));
  }
  
@@ -4900,7 +4911,7 @@ index ed555ef..6b5c458 100644
  
  static void
  i386_linux_dr_reset_addr (int regnum)
-@@ -726,36 +754,54 @@ i386_linux_dr_reset_addr (int regnum)
+@@ -742,36 +770,54 @@ i386_linux_dr_reset_addr (int regnum)
  static unsigned long
  i386_linux_dr_get_status (void)
  {
@@ -4973,7 +4984,7 @@ index ed555ef..6b5c458 100644
  
  
 diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
-index 900fb40..f28c45b 100644
+index 0606ce1..1ad0e39 100644
 --- a/gdb/i386-nat.c
 +++ b/gdb/i386-nat.c
 @@ -25,6 +25,7 @@
@@ -4990,7 +5001,7 @@ index 900fb40..f28c45b 100644
  /* Debug registers' indices.  */
 -#define DR_NADDR	4	/* The number of debug address registers.  */
  #define DR_STATUS	6	/* Index of debug status register (DR6).  */
- #define DR_CONTROL	7	/* Index of debug control register (DR7). */
+ #define DR_CONTROL	7	/* Index of debug control register (DR7).  */
  
 @@ -111,49 +111,60 @@ struct i386_dr_low_type i386_dr_low;
  
@@ -5191,7 +5202,7 @@ index 900fb40..f28c45b 100644
        i++;
      }
  }
-@@ -311,6 +385,7 @@ Invalid hardware breakpoint length %d in i386_length_and_rw_bits.\n"), len);
+@@ -312,6 +386,7 @@ Invalid hardware breakpoint length %d in i386_length_and_rw_bits.\n"), len);
  static int
  i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
  {
@@ -5199,7 +5210,7 @@ index 900fb40..f28c45b 100644
    int i;
  
    if (!i386_dr_low.set_addr || !i386_dr_low.set_control)
-@@ -321,11 +396,10 @@ i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
+@@ -322,11 +397,10 @@ i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
       reuse it for this watchpoint as well (and save a register).  */
    ALL_DEBUG_REGISTERS(i)
      {
@@ -5214,7 +5225,7 @@ index 900fb40..f28c45b 100644
  	  return 0;
  	}
      }
-@@ -333,7 +407,7 @@ i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
+@@ -334,7 +408,7 @@ i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
    /* Next, look for a vacant debug register.  */
    ALL_DEBUG_REGISTERS(i)
      {
@@ -5223,7 +5234,7 @@ index 900fb40..f28c45b 100644
  	break;
      }
  
-@@ -344,9 +418,9 @@ i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
+@@ -345,9 +419,9 @@ i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
    /* Now set up the register I to watch our region.  */
  
    /* Record the info in our local mirrored array.  */
@@ -5236,7 +5247,7 @@ index 900fb40..f28c45b 100644
    /* Note: we only enable the watchpoint locally, i.e. in the current
       task.  Currently, no i386 target allows or supports global
       watchpoints; however, if any target would want that in the
-@@ -354,13 +428,13 @@ i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
+@@ -355,13 +429,13 @@ i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
       to enable watchpoints globally or locally, and the code below
       should use global or local enable and slow-down flags as
       appropriate.  */
@@ -5254,7 +5265,7 @@ index 900fb40..f28c45b 100644
  
    /* Only a sanity check for leftover bits (set possibly only by inferior).  */
    if (i386_dr_low.unset_status)
-@@ -378,21 +452,21 @@ i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
+@@ -379,21 +453,21 @@ i386_insert_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
  static int
  i386_remove_aligned_watchpoint (CORE_ADDR addr, unsigned len_rw_bits)
  {
@@ -5269,8 +5280,8 @@ index 900fb40..f28c45b 100644
 +      if (!i386_dr_vacant (dr_mirror, i) && dr_mirror->addr[i] == addr
 +	  && i386_dr_get_rw_len (dr_mirror, i) == len_rw_bits)
  	{
--	  if (--dr_ref_count[i] == 0) /* no longer in use? */
-+	  if (--dr_mirror->ref_count[i] == 0) /* no longer in use? */
+-	  if (--dr_ref_count[i] == 0) /* no longer in use?  */
++	  if (--dr_mirror->ref_count[i] == 0) /* no longer in use?  */
  	    {
  	      /* Reset our mirror.  */
 -	      dr_mirror[i] = 0;
@@ -5283,7 +5294,7 @@ index 900fb40..f28c45b 100644
  	      if (i386_dr_low.reset_addr)
  		i386_dr_low.reset_addr (i);
  	    }
-@@ -554,26 +628,27 @@ i386_region_ok_for_watchpoint (CORE_ADDR addr, int len)
+@@ -555,26 +629,27 @@ i386_region_ok_for_watchpoint (CORE_ADDR addr, int len)
  static int
  i386_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p)
  {
@@ -5316,7 +5327,7 @@ index 900fb40..f28c45b 100644
  	  rc = 1;
  	  if (maint_show_dr)
  	    i386_show_dr ("watchpoint_hit", addr, -1, hw_write);
-@@ -687,6 +762,10 @@ i386_use_watchpoints (struct target_ops *t)
+@@ -688,6 +763,10 @@ i386_use_watchpoints (struct target_ops *t)
    t->to_remove_watchpoint = i386_remove_watchpoint;
    t->to_insert_hw_breakpoint = i386_insert_hw_breakpoint;
    t->to_remove_hw_breakpoint = i386_remove_hw_breakpoint;
@@ -5328,7 +5339,7 @@ index 900fb40..f28c45b 100644
  
  void
 diff --git a/gdb/i386-nat.h b/gdb/i386-nat.h
-index 10fdc3b..ed6de56 100644
+index 819c6b8..bef8a35 100644
 --- a/gdb/i386-nat.h
 +++ b/gdb/i386-nat.h
 @@ -78,6 +78,28 @@ struct i386_dr_low_type
@@ -5361,7 +5372,7 @@ index 10fdc3b..ed6de56 100644
     rather than setting it directly to check that the length is only
     set once.  It also enables the 'maint set/show show-debug-regs' 
 diff --git a/gdb/infcall.c b/gdb/infcall.c
-index 48c183e..716fb68 100644
+index 75de56c..2a64a0e 100644
 --- a/gdb/infcall.c
 +++ b/gdb/infcall.c
 @@ -228,6 +228,56 @@ value_arg_coerce (struct gdbarch *gdbarch, struct value *arg,
@@ -5473,12 +5484,12 @@ index 48c183e..716fb68 100644
 +  else if (TYPE_CODE (ftype) == TYPE_CODE_INT)
      {
        /* Handle the case of functions lacking debugging info.
-          Their values are characters since their addresses are char */
+          Their values are characters since their addresses are char.  */
 diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
-index e467e9a..d7b5396 100644
+index 62a4538..8d14fcd 100644
 --- a/gdb/linux-nat.c
 +++ b/gdb/linux-nat.c
-@@ -1257,6 +1257,64 @@ iterate_over_lwps (ptid_t filter,
+@@ -1254,6 +1254,64 @@ iterate_over_lwps (ptid_t filter,
    return NULL;
  }
  
@@ -5560,7 +5571,7 @@ index 42cb2fc..05ac11d 100644
     override it with local methods.  */
  struct target_ops * linux_target (void);
 diff --git a/gdb/main.c b/gdb/main.c
-index 69f2298..6b2530b 100644
+index 6be4805..1b00759 100644
 --- a/gdb/main.c
 +++ b/gdb/main.c
 @@ -39,6 +39,7 @@
@@ -5606,7 +5617,7 @@ index 69f2298..6b2530b 100644
  	  case OPT_SE:
  	    symarg = optarg;
  	    execarg = optarg;
-@@ -663,7 +673,31 @@ captured_main (void *data)
+@@ -664,7 +674,31 @@ captured_main (void *data)
  
    /* Now that gdb_init has created the initial inferior, we're in
       position to set args for that inferior.  */
@@ -5639,7 +5650,7 @@ index 69f2298..6b2530b 100644
      {
        /* The remaining options are the command-line options for the
  	 inferior.  The first one is the sym/exec file, and the rest
-@@ -912,7 +946,8 @@ captured_main (void *data)
+@@ -913,7 +947,8 @@ captured_main (void *data)
  
    /* Read in the old history after all the command files have been
       read.  */
@@ -5649,7 +5660,7 @@ index 69f2298..6b2530b 100644
  
    if (batch_flag)
      {
-@@ -923,13 +958,25 @@ captured_main (void *data)
+@@ -924,13 +959,25 @@ captured_main (void *data)
    /* Show time and/or space usage.  */
    do_cleanups (pre_stat_chain);
  
@@ -5681,7 +5692,7 @@ index 69f2298..6b2530b 100644
      }
    /* No exit -- exit is through quit_command.  */
  }
-@@ -961,7 +1008,12 @@ print_gdb_help (struct ui_file *stream)
+@@ -962,7 +1009,12 @@ print_gdb_help (struct ui_file *stream)
    fputs_unfiltered (_("\
  This is the GNU debugger.  Usage:\n\n\
      gdb [options] [executable-file [core-file or process-id]]\n\
@@ -5695,7 +5706,7 @@ index 69f2298..6b2530b 100644
  Options:\n\n\
  "), stream);
    fputs_unfiltered (_("\
-@@ -999,7 +1051,13 @@ Options:\n\n\
+@@ -1000,7 +1052,13 @@ Options:\n\n\
    --nw		     Do not use a window interface.\n\
    --nx               Do not read "), stream);
    fputs_unfiltered (gdbinit, stream);
@@ -5711,7 +5722,7 @@ index 69f2298..6b2530b 100644
    --readnow          Fully read symbol files on first access.\n\
  "), stream);
 diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
-index 8e0f410..e23f482 100644
+index a401846..26dca8c 100644
 --- a/gdb/mi/mi-cmd-var.c
 +++ b/gdb/mi/mi-cmd-var.c
 @@ -707,7 +707,6 @@ mi_cmd_var_update (char *command, char **argv, int argc)
@@ -5723,7 +5734,7 @@ index 8e0f410..e23f482 100644
  
        varobj_update_one (var, print_values, 1 /* explicit */);
 diff --git a/gdb/minsyms.c b/gdb/minsyms.c
-index 77159a5..ea94c13 100644
+index 8497991..4635853 100644
 --- a/gdb/minsyms.c
 +++ b/gdb/minsyms.c
 @@ -338,8 +338,9 @@ lookup_minimal_symbol_text (const char *name, struct objfile *objf)
@@ -5774,7 +5785,7 @@ index 77159a5..ea94c13 100644
  		       SYMBOL_LINKAGE_NAME (tsymbol)) == 0)
  	  return SYMBOL_VALUE_ADDRESS (msymbol);
 diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
-index 5390dd9..c0a0b2a 100644
+index e993c05..affbe45 100644
 --- a/gdb/p-valprint.c
 +++ b/gdb/p-valprint.c
 @@ -38,6 +38,7 @@
@@ -5850,7 +5861,7 @@ index 5390dd9..c0a0b2a 100644
  }
  
 diff --git a/gdb/parse.c b/gdb/parse.c
-index 4f0c111..243a94a 100644
+index 856c24d..dbb38c5 100644
 --- a/gdb/parse.c
 +++ b/gdb/parse.c
 @@ -487,9 +487,21 @@ write_exp_msymbol (struct minimal_symbol *msymbol)
@@ -5899,7 +5910,7 @@ index 4f0c111..243a94a 100644
      default:
        write_exp_elt_type (objfile_type (objfile)->nodebug_unknown_symbol);
        break;
-@@ -1482,6 +1503,7 @@ parser_fprintf (FILE *x, const char *y, ...)
+@@ -1480,6 +1501,7 @@ parser_fprintf (FILE *x, const char *y, ...)
  
  int
  operator_check_standard (struct expression *exp, int pos,
@@ -5907,7 +5918,7 @@ index 4f0c111..243a94a 100644
  			 int (*objfile_func) (struct objfile *objfile,
  					      void *data),
  			 void *data)
-@@ -1523,7 +1545,7 @@ operator_check_standard (struct expression *exp, int pos,
+@@ -1521,7 +1543,7 @@ operator_check_standard (struct expression *exp, int pos,
  	    struct type *type = elts[pos + 2 + arg].type;
  	    struct objfile *objfile = TYPE_OBJFILE (type);
  
@@ -5916,7 +5927,7 @@ index 4f0c111..243a94a 100644
  	      return 1;
  	  }
        }
-@@ -1541,7 +1563,8 @@ operator_check_standard (struct expression *exp, int pos,
+@@ -1539,7 +1561,8 @@ operator_check_standard (struct expression *exp, int pos,
  
  	/* Check objfile where the variable itself is placed.
  	   SYMBOL_OBJ_SECTION (symbol) may be NULL.  */
@@ -5926,7 +5937,7 @@ index 4f0c111..243a94a 100644
  	  return 1;
  
  	/* Check objfile where is placed the code touching the variable.  */
-@@ -1554,24 +1577,27 @@ operator_check_standard (struct expression *exp, int pos,
+@@ -1552,24 +1575,27 @@ operator_check_standard (struct expression *exp, int pos,
  
    /* Invoke callbacks for TYPE and OBJFILE if they were set as non-NULL.  */
  
@@ -5962,7 +5973,7 @@ index 4f0c111..243a94a 100644
  	     int (*objfile_func) (struct objfile *objfile, void *data),
  	     void *data)
  {
-@@ -1586,7 +1612,9 @@ exp_iterate (struct expression *exp,
+@@ -1584,7 +1610,9 @@ exp_iterate (struct expression *exp,
  
        pos = endpos - oplen;
        if (exp->language_defn->la_exp_desc->operator_check (exp, pos,
@@ -5973,7 +5984,7 @@ index 4f0c111..243a94a 100644
  	return 1;
  
        endpos = pos;
-@@ -1617,7 +1645,26 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile)
+@@ -1615,7 +1643,26 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile)
  {
    gdb_assert (objfile->separate_debug_objfile_backlink == NULL);
  
@@ -6002,7 +6013,7 @@ index 4f0c111..243a94a 100644
  
  void
 diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
-index 95dd799..42266df 100644
+index 3f743d1..0ee19f5 100644
 --- a/gdb/parser-defs.h
 +++ b/gdb/parser-defs.h
 @@ -194,6 +194,8 @@ extern void operator_length_standard (const struct expression *, int, int *,
@@ -6032,10 +6043,10 @@ index 95dd799..42266df 100644
 +
  #endif /* PARSER_DEFS_H */
 diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
-index ca7312b..58696d3 100644
+index 0c5563e..e4f0b25 100644
 --- a/gdb/ppc-linux-nat.c
 +++ b/gdb/ppc-linux-nat.c
-@@ -1621,12 +1621,18 @@ booke_remove_point (struct ppc_hw_breakpoint *b, int tid)
+@@ -1637,12 +1637,18 @@ booke_remove_point (struct ppc_hw_breakpoint *b, int tid)
    hw_breaks[i].hw_break = NULL;
  }
  
@@ -6056,8 +6067,8 @@ index ca7312b..58696d3 100644
    struct ppc_hw_breakpoint p;
  
    if (!have_ptrace_booke_interface ())
-@@ -1640,18 +1646,23 @@ ppc_linux_insert_hw_breakpoint (struct gdbarch *gdbarch,
-   p.addr2           = 0;
+@@ -1656,18 +1662,23 @@ ppc_linux_insert_hw_breakpoint (struct gdbarch *gdbarch,
+   p.addr2 = 0;
    p.condition_value = 0;
  
 -  ALL_LWPS (lp, ptid)
@@ -6084,8 +6095,8 @@ index ca7312b..58696d3 100644
    struct ppc_hw_breakpoint p;
  
    if (!have_ptrace_booke_interface ())
-@@ -1665,8 +1676,7 @@ ppc_linux_remove_hw_breakpoint (struct gdbarch *gdbarch,
-   p.addr2           = 0;
+@@ -1681,8 +1692,7 @@ ppc_linux_remove_hw_breakpoint (struct gdbarch *gdbarch,
+   p.addr2 = 0;
    p.condition_value = 0;
  
 -  ALL_LWPS (lp, ptid)
@@ -6094,7 +6105,7 @@ index ca7312b..58696d3 100644
  
    return 0;
  }
-@@ -1879,12 +1889,19 @@ ppc_linux_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
+@@ -1896,6 +1906,15 @@ ppc_linux_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
  	  && check_condition (addr, cond, &data_value));
  }
  
@@ -6107,7 +6118,10 @@ index ca7312b..58696d3 100644
 +    *retp = -1;
 +}
 +
- static int
+ /* Set up P with the parameters necessary to request a watchpoint covering
+    LEN bytes starting at ADDR and if possible with condition expression COND
+    evaluated by hardware.  INSERT tells if we are creating a request for
+@@ -1949,8 +1968,6 @@ static int
  ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
  			     struct expression *cond)
  {
@@ -6116,9 +6130,9 @@ index ca7312b..58696d3 100644
    int ret = -1;
  
    if (have_ptrace_booke_interface ())
-@@ -1908,8 +1925,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
-       p.addr            = (uint64_t) addr;
-       p.addr2           = 0;
+@@ -1959,8 +1976,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+ 
+       create_watchpoint_request (&p, addr, len, rw, cond, 1);
  
 -      ALL_LWPS (lp, ptid)
 -	booke_insert_point (&p, TIDGET (ptid));
@@ -6126,7 +6140,7 @@ index ca7312b..58696d3 100644
  
        ret = 0;
      }
-@@ -1952,12 +1968,8 @@ ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+@@ -2003,12 +2019,8 @@ ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
  
        saved_dabr_value = dabr_value;
  
@@ -6140,7 +6154,7 @@ index ca7312b..58696d3 100644
      }
  
    return ret;
-@@ -1967,8 +1979,6 @@ static int
+@@ -2018,8 +2030,6 @@ static int
  ppc_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
  			     struct expression *cond)
  {
@@ -6149,9 +6163,9 @@ index ca7312b..58696d3 100644
    int ret = -1;
  
    if (have_ptrace_booke_interface ())
-@@ -1992,20 +2002,16 @@ ppc_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
-       p.addr            = (uint64_t) addr;
-       p.addr2           = 0;
+@@ -2028,20 +2038,16 @@ ppc_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
+ 
+       create_watchpoint_request (&p, addr, len, rw, cond, 0);
  
 -      ALL_LWPS (lp, ptid)
 -	booke_remove_point (&p, TIDGET (ptid));
@@ -6173,10 +6187,10 @@ index ca7312b..58696d3 100644
  
    return ret;
 diff --git a/gdb/printcmd.c b/gdb/printcmd.c
-index b7d3ade..a6fa86a 100644
+index f435f6d..7bcb667 100644
 --- a/gdb/printcmd.c
 +++ b/gdb/printcmd.c
-@@ -973,6 +973,11 @@ print_command_1 (char *exp, int inspect, int voidprint)
+@@ -974,6 +974,11 @@ print_command_1 (char *exp, int inspect, int voidprint)
    else
      val = access_value_history (0);
  
@@ -6188,7 +6202,7 @@ index b7d3ade..a6fa86a 100644
    if (voidprint || (val && value_type (val) &&
  		    TYPE_CODE (value_type (val)) != TYPE_CODE_VOID))
      {
-@@ -1474,6 +1479,22 @@ x_command (char *exp, int from_tty)
+@@ -1475,6 +1480,22 @@ x_command (char *exp, int from_tty)
  	set_internalvar (lookup_internalvar ("__"), last_examine_value);
      }
  }
@@ -6211,7 +6225,7 @@ index b7d3ade..a6fa86a 100644
  
  
  /* Add an expression to the auto-display chain.
-@@ -2874,4 +2895,6 @@ Show printing of source filename and line number with <symbol>."), NULL,
+@@ -2875,4 +2896,6 @@ Show printing of source filename and line number with <symbol>."), NULL,
    add_com ("eval", no_class, eval_command, _("\
  Convert \"printf format string\", arg1, arg2, arg3, ..., argn to\n\
  a command line, and call it."));
@@ -6377,13 +6391,13 @@ index 0000000..b790a54
 +        return getattr (self.frame, name)
 diff --git a/gdb/python/lib/gdb/backtrace.py b/gdb/python/lib/gdb/backtrace.py
 new file mode 100644
-index 0000000..2baab5f
+index 0000000..6bb4fb1
 --- /dev/null
 +++ b/gdb/python/lib/gdb/backtrace.py
 @@ -0,0 +1,42 @@
 +# Filtering backtrace.
 +
-+# Copyright (C) 2008 Free Software Foundation, Inc.
++# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
 +
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -6415,7 +6429,7 @@ index 0000000..2baab5f
 +    if frame_filter == None:
 +        frame_filter = constructor
 +    else:
-+        frame_filter = lambda iterator: constructor (frame_filter (iterator))
++        frame_filter = lambda iterator, filter = frame_filter: constructor (filter (iterator))
 +
 +def create_frame_filter (iter):
 +    global frame_filter
@@ -6490,13 +6504,13 @@ index 0000000..96b6618
 +AliasCommand()
 diff --git a/gdb/python/lib/gdb/command/backtrace.py b/gdb/python/lib/gdb/command/backtrace.py
 new file mode 100644
-index 0000000..ec9a527
+index 0000000..2aa5b90
 --- /dev/null
 +++ b/gdb/python/lib/gdb/command/backtrace.py
 @@ -0,0 +1,106 @@
 +# New backtrace command.
 +
-+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
++# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
 +
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -6576,7 +6590,7 @@ index 0000000..ec9a527
 +
 +        # FIXME: provide option to start at selected frame
 +        # However, should still number as if starting from newest
-+	newest_frame = gdb.selected_thread ().newest_frame ()
++        newest_frame = gdb.selected_thread ().newest_frame ()
 +        iter = itertools.imap (FrameWrapper,
 +                               FrameIterator (newest_frame))
 +        if filter:
@@ -7046,328 +7060,6 @@ index 0000000..debb3bb
 +	return wanted == found
 +
 +InScope ()
-diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
-index 3de3af2..6a7a20b 100644
---- a/gdb/python/py-cmd.c
-+++ b/gdb/python/py-cmd.c
-@@ -49,8 +49,7 @@ static struct cmdpy_completer completers[] =
- 
- #define N_COMPLETERS (sizeof (completers) / sizeof (completers[0]))
- 
--/* A gdb command.  For the time being only ordinary commands (not
--   set/show commands) are allowed.  */
-+/* A gdb command.  */
- struct cmdpy_object
- {
-   PyObject_HEAD
-diff --git a/gdb/python/py-membuf.c b/gdb/python/py-membuf.c
-new file mode 100644
-index 0000000..7bc294c
---- /dev/null
-+++ b/gdb/python/py-membuf.c
-@@ -0,0 +1,268 @@
-+/* Python interface to the inferior memory.
-+
-+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
-+
-+   This file is part of GDB.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-+
-+#include "defs.h"
-+#include "exceptions.h"
-+#include "gdbcore.h"
-+#include "python-internal.h"
-+
-+typedef struct {
-+  PyObject_HEAD
-+  void *buffer;
-+
-+  /* These are kept just for mbpy_str.  */
-+  CORE_ADDR addr;
-+  CORE_ADDR length;
-+} membuf_object;
-+
-+static PyTypeObject membuf_object_type;
-+
-+/* Implementation of gdb.read_memory (address, length).
-+   Returns a Python buffer object with LENGTH bytes of the inferior's memory
-+   at ADDRESS. Both arguments are integers.  */
-+
-+PyObject *
-+gdbpy_read_memory (PyObject *self, PyObject *args)
-+{
-+  int error = 0;
-+  CORE_ADDR addr, length;
-+  void *buffer = NULL;
-+  membuf_object *membuf_obj;
-+  PyObject *addr_obj, *length_obj;
-+  struct cleanup *cleanups = NULL;
-+  volatile struct gdb_exception except;
-+
-+  if (! PyArg_ParseTuple (args, "OO", &addr_obj, &length_obj))
-+    return NULL;
-+
-+  TRY_CATCH (except, RETURN_MASK_ALL)
-+    {
-+      if (!get_addr_from_python (addr_obj, &addr)
-+	  || !get_addr_from_python (length_obj, &length))
-+	{
-+	  error = 1;
-+	  break;
-+	}
-+
-+      buffer = xmalloc (length);
-+      cleanups = make_cleanup (xfree, buffer);
-+
-+      read_memory (addr, buffer, length);
-+    }
-+  GDB_PY_HANDLE_EXCEPTION (except);
-+
-+  if (error)
-+    return NULL;
-+
-+  discard_cleanups (cleanups);
-+
-+  membuf_obj = PyObject_New (membuf_object, &membuf_object_type);
-+  if (membuf_obj == NULL)
-+    {
-+      xfree (buffer);
-+      PyErr_SetString (PyExc_MemoryError,
-+		       "Could not allocate memory buffer object.");
-+      return NULL;
-+    }
-+
-+  membuf_obj->buffer = buffer;
-+  membuf_obj->addr = addr;
-+  membuf_obj->length = length;
-+
-+  return PyBuffer_FromReadWriteObject ((PyObject *) membuf_obj, 0,
-+				       Py_END_OF_BUFFER);
-+}
-+
-+/* Implementation of gdb.write_memory (address, buffer [, length]).
-+   Writes the contents of BUFFER (a Python object supporting the read buffer
-+   protocol) at ADDRESS in the inferior's memory.  Write LENGTH bytes from
-+   BUFFER, or its entire contents if the argument is not provided.  The
-+   function returns nothing.  */
-+
-+PyObject *
-+gdbpy_write_memory (PyObject *self, PyObject *args)
-+{
-+  int buf_len, error = 0;
-+  const char *buffer;
-+  CORE_ADDR addr, length;
-+  PyObject *addr_obj, *length_obj = NULL;
-+  volatile struct gdb_exception except;
-+
-+  if (! PyArg_ParseTuple (args, "Os#|O", &addr_obj, &buffer, &buf_len,
-+			  &length_obj))
-+    return NULL;
-+
-+  TRY_CATCH (except, RETURN_MASK_ALL)
-+    {
-+      if (!get_addr_from_python (addr_obj, &addr))
-+	{
-+	  error = 1;
-+	  break;
-+	}
-+      
-+      if (!length_obj)
-+	length = buf_len;
-+      else if (!get_addr_from_python (length_obj, &length))
-+	{
-+	  error = 1;
-+	  break;
-+	}
-+
-+      write_memory (addr, buffer, length);
-+    }
-+  GDB_PY_HANDLE_EXCEPTION (except);
-+
-+  if (error)
-+    return NULL;
-+
-+  Py_RETURN_NONE;
-+}
-+
-+/* Destructor of Membuf objects.  */
-+
-+static void
-+mbpy_dealloc (PyObject *self)
-+{
-+  xfree (((membuf_object *) self)->buffer);
-+  self->ob_type->tp_free (self);
-+}
-+
-+/* Return a description of the Membuf object.  */
-+
-+static PyObject *
-+mbpy_str (PyObject *self)
-+{
-+  membuf_object *membuf_obj = (membuf_object *) self;
-+
-+  return PyString_FromFormat ("memory buffer for address %s, %s bytes long",
-+			      paddress (membuf_obj->addr),
-+			      pulongest (membuf_obj->length));
-+}
-+
-+static Py_ssize_t
-+get_read_buffer (PyObject *self, Py_ssize_t segment, void **ptrptr)
-+{
-+  membuf_object *membuf_obj = (membuf_object *) self;
-+
-+  if (segment)
-+    {
-+      PyErr_SetString (PyExc_SystemError,
-+		       "The memory buffer supports only one segment.");
-+      return -1;
-+    }
-+
-+  *ptrptr = membuf_obj->buffer;
-+
-+  return membuf_obj->length;
-+}
-+
-+static Py_ssize_t
-+get_write_buffer (PyObject *self, Py_ssize_t segment, void **ptrptr)
-+{
-+  return get_read_buffer (self, segment, ptrptr);
-+}
-+
-+static Py_ssize_t
-+get_seg_count (PyObject *self, Py_ssize_t *lenp)
-+{
-+  if (lenp)
-+    *lenp = ((membuf_object *) self)->length;
-+
-+  return 1;
-+}
-+
-+static Py_ssize_t
-+get_char_buffer (PyObject *self, Py_ssize_t segment, char **ptrptr)
-+{
-+  void *ptr = NULL;
-+  Py_ssize_t ret;
-+
-+  ret = get_read_buffer (self, segment, &ptr);
-+  *ptrptr = (char *) ptr;
-+
-+  return ret;
-+}
-+
-+/* Python doesn't provide a decent way to get compatibility here.  */
-+#if HAVE_LIBPYTHON2_4
-+#define CHARBUFFERPROC_NAME getcharbufferproc
-+#else
-+#define CHARBUFFERPROC_NAME charbufferproc
-+#endif
-+
-+static PyBufferProcs buffer_procs = {
-+  get_read_buffer,
-+  get_write_buffer,
-+  get_seg_count,
-+  /* The cast here works around a difference between Python 2.4 and
-+     Python 2.5.  */
-+  (CHARBUFFERPROC_NAME) get_char_buffer
-+};
-+
-+static PyTypeObject membuf_object_type = {
-+  PyObject_HEAD_INIT (NULL)
-+  0,				  /*ob_size*/
-+  "gdb.Membuf",			  /*tp_name*/
-+  sizeof (membuf_object),	  /*tp_basicsize*/
-+  0,				  /*tp_itemsize*/
-+  mbpy_dealloc,			  /*tp_dealloc*/
-+  0,				  /*tp_print*/
-+  0,				  /*tp_getattr*/
-+  0,				  /*tp_setattr*/
-+  0,				  /*tp_compare*/
-+  0,				  /*tp_repr*/
-+  0,				  /*tp_as_number*/
-+  0,				  /*tp_as_sequence*/
-+  0,				  /*tp_as_mapping*/
-+  0,				  /*tp_hash */
-+  0,				  /*tp_call*/
-+  mbpy_str,			  /*tp_str*/
-+  0,				  /*tp_getattro*/
-+  0,				  /*tp_setattro*/
-+  &buffer_procs,		  /*tp_as_buffer*/
-+  Py_TPFLAGS_DEFAULT,		  /*tp_flags*/
-+  "GDB memory buffer object", 	  /*tp_doc*/
-+  0,				  /* tp_traverse */
-+  0,				  /* tp_clear */
-+  0,				  /* tp_richcompare */
-+  0,				  /* tp_weaklistoffset */
-+  0,				  /* tp_iter */
-+  0,				  /* tp_iternext */
-+  0,				  /* tp_methods */
-+  0,				  /* tp_members */
-+  0,				  /* tp_getset */
-+  0,				  /* tp_base */
-+  0,				  /* tp_dict */
-+  0,				  /* tp_descr_get */
-+  0,				  /* tp_descr_set */
-+  0,				  /* tp_dictoffset */
-+  0,				  /* tp_init */
-+  0,				  /* tp_alloc */
-+  PyType_GenericNew		  /* tp_new */
-+};
-+
-+void
-+gdbpy_initialize_membuf (void)
-+{
-+  if (PyType_Ready (&membuf_object_type) < 0)
-+    return;
-+
-+  Py_INCREF (&membuf_object_type);
-+  PyModule_AddObject (gdb_module, "Membuf", (PyObject *) &membuf_object_type);
-+}
-diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
-index 7532aa5..85f3940 100644
---- a/gdb/python/py-prettyprint.c
-+++ b/gdb/python/py-prettyprint.c
-@@ -227,10 +227,10 @@ pretty_print_one_value (PyObject *printer, struct value **out_value)
- 	      && result != Py_None)
- 	    {
- 	      *out_value = convert_value_from_python (result);
--	      if (PyErr_Occurred ())
--		*out_value = NULL;
--	      Py_DECREF (result);
--	      result = NULL;
-+ 	      if (PyErr_Occurred ())
-+ 		*out_value = NULL;
-+ 	      Py_DECREF (result);
-+ 	      result = NULL;
- 	    }
- 	}
-     }
-@@ -763,14 +763,7 @@ gdbpy_get_varobj_pretty_printer (struct value *value)
- {
-   PyObject *val_obj;
-   PyObject *pretty_printer = NULL;
--  volatile struct gdb_exception except;
- 
--  TRY_CATCH (except, RETURN_MASK_ALL)
--    {
--      value = value_copy (value);
--    }
--  GDB_PY_HANDLE_EXCEPTION (except);
--  
-   val_obj = value_to_value_object (value);
-   if (! val_obj)
-     return NULL;
 diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
 index 9a6b077..656d3a1 100644
 --- a/gdb/python/py-type.c
@@ -7593,81 +7285,6 @@ index 1aa9443..786c45a 100644
  }
  
  
-diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
-index 80d0763..0040403 100644
---- a/gdb/python/python-internal.h
-+++ b/gdb/python/python-internal.h
-@@ -88,10 +88,11 @@ struct language_defn;
- struct program_space;
- 
- extern PyObject *gdb_module;
--extern PyTypeObject value_object_type;
- extern PyTypeObject block_object_type;
-+extern PyTypeObject value_object_type;
- extern PyTypeObject symbol_object_type;
- 
-+/* Used in python-inferior.c.  */
- typedef struct
- {
-   PyObject_HEAD
-@@ -133,6 +134,10 @@ PyObject *block_to_block_object (struct block *block, struct objfile *objfile);
- PyObject *value_to_value_object (struct value *v);
- PyObject *type_to_type_object (struct type *);
- PyObject *frame_info_to_frame_object (struct frame_info *frame);
-+PyObject *frame_info_to_frame_object (struct frame_info *frame);
-+thread_object *create_thread_object (struct thread_info *tp);
-+thread_object *find_thread_object (ptid_t ptid);
-+PyObject *find_inferior_object (int pid);
- 
- PyObject *pspace_to_pspace_object (struct program_space *);
- PyObject *pspy_get_printers (PyObject *, void *);
-@@ -153,7 +158,9 @@ struct symtab *symtab_object_to_symtab (PyObject *obj);
- struct symtab_and_line *sal_object_to_symtab_and_line (PyObject *obj);
- 
- void gdbpy_initialize_auto_load (void);
-+
- void gdbpy_initialize_values (void);
-+void gdbpy_initialize_breakpoints (void);
- void gdbpy_initialize_frames (void);
- void gdbpy_initialize_symtabs (void);
- void gdbpy_initialize_commands (void);
-@@ -161,6 +168,7 @@ void gdbpy_initialize_symbols (void);
- void gdbpy_initialize_symtabs (void);
- void gdbpy_initialize_blocks (void);
- void gdbpy_initialize_types (void);
-+void gdbpy_initialize_blocks (void);
- void gdbpy_initialize_functions (void);
- void gdbpy_initialize_pspace (void);
- void gdbpy_initialize_objfile (void);
-@@ -178,6 +186,12 @@ struct cleanup *ensure_python_env (struct gdbarch *gdbarch,
- extern struct gdbarch *python_gdbarch;
- extern const struct language_defn *python_language;
- 
-+char *gdbpy_parse_command_name (char *text,
-+				struct cmd_list_element ***base_list,
-+				struct cmd_list_element **start_list);
-+
-+PyObject *gdbpy_parameter_value (enum var_types, void *);
-+
- /* Use this after a TRY_EXCEPT to throw the appropriate Python
-    exception.  */
- #define GDB_PY_HANDLE_EXCEPTION(Exception)				\
-@@ -225,13 +239,14 @@ PyObject *apply_varobj_pretty_printer (PyObject *print_obj,
- 				       struct value **replacement,
- 				       struct ui_file *stream);
- PyObject *gdbpy_get_varobj_pretty_printer (struct value *value);
-+PyObject *gdbpy_instantiate_printer (PyObject *cons, PyObject *value);
- char *gdbpy_get_display_hint (PyObject *printer);
- PyObject *gdbpy_default_visualizer (PyObject *self, PyObject *args);
- 
--extern PyObject *gdbpy_doc_cst;
- extern PyObject *gdbpy_children_cst;
- extern PyObject *gdbpy_to_string_cst;
- extern PyObject *gdbpy_display_hint_cst;
-+extern PyObject *gdbpy_doc_cst;
- extern PyObject *gdbpy_enabled_cst;
- 
- /* Exception types.  */
 diff --git a/gdb/python/python.c b/gdb/python/python.c
 index 375042c..b6af645 100644
 --- a/gdb/python/python.c
@@ -7761,7 +7378,7 @@ index 58d97fc..93d56ef 100644
  			      int embedded_offset, CORE_ADDR address,
  			      struct ui_file *stream, int recurse,
 diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
-index d45cd92..f6955e9 100644
+index 432da99..78c6b1c 100644
 --- a/gdb/solib-svr4.c
 +++ b/gdb/solib-svr4.c
 @@ -1276,7 +1276,8 @@ svr4_in_dynsym_resolve_code (CORE_ADDR pc)
@@ -7775,7 +7392,7 @@ index d45cd92..f6955e9 100644
  
  /* Given an executable's ABFD and target, compute the entry-point
 diff --git a/gdb/stack.c b/gdb/stack.c
-index 4fc634f..f6df7ee 100644
+index 6e59cd0..0eacac9 100644
 --- a/gdb/stack.c
 +++ b/gdb/stack.c
 @@ -366,6 +366,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
@@ -7801,7 +7418,7 @@ index 4fc634f..f6df7ee 100644
  	        }
  	      else
 diff --git a/gdb/symmisc.c b/gdb/symmisc.c
-index 7f2d38a..7d3589e 100644
+index 4be8106..081b532 100644
 --- a/gdb/symmisc.c
 +++ b/gdb/symmisc.c
 @@ -264,6 +264,9 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
@@ -7815,10 +7432,10 @@ index 7f2d38a..7d3589e 100644
  	  ms_type = 'S';
  	  break;
 diff --git a/gdb/symtab.c b/gdb/symtab.c
-index bdf34d6..fe2dc4c 100644
+index 68666da..aa45042 100644
 --- a/gdb/symtab.c
 +++ b/gdb/symtab.c
-@@ -3000,7 +3000,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
+@@ -3001,7 +3001,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
    static const enum minimal_symbol_type types3[]
      = {mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown};
    static const enum minimal_symbol_type types4[]
@@ -7828,7 +7445,7 @@ index bdf34d6..fe2dc4c 100644
    enum minimal_symbol_type ourtype2;
    enum minimal_symbol_type ourtype3;
 diff --git a/gdb/symtab.h b/gdb/symtab.h
-index 6864b96..651bd67 100644
+index e4ec4bf..754d89d 100644
 --- a/gdb/symtab.h
 +++ b/gdb/symtab.h
 @@ -290,6 +290,9 @@ enum minimal_symbol_type
@@ -7843,7 +7460,7 @@ index 6864b96..651bd67 100644
    mst_abs,			/* Generally absolute (nonrelocatable) */
 @@ -956,11 +959,25 @@ extern struct symbol *find_pc_sect_function (CORE_ADDR, struct obj_section *);
  
- /* lookup function from address, return name, start addr and end addr */
+ /* lookup function from address, return name, start addr and end addr.  */
  
 -extern int find_pc_partial_function (CORE_ADDR, char **, CORE_ADDR *,
 -				     CORE_ADDR *);
@@ -7866,7 +7483,7 @@ index 6864b96..651bd67 100644
 +				    const char *function_name,
 +				    CORE_ADDR function_address);
 +
- /* lookup partial symbol table by address and section */
+ /* lookup partial symbol table by address and section.  */
  
  extern struct symtab *find_pc_sect_symtab_via_partial (CORE_ADDR,
 @@ -1035,6 +1052,8 @@ extern struct minimal_symbol *lookup_minimal_symbol_by_pc_name
@@ -7878,29 +7495,6 @@ index 6864b96..651bd67 100644
  extern struct minimal_symbol *
      lookup_minimal_symbol_and_objfile (const char *,
  				       struct objfile **);
-diff --git a/gdb/target.h b/gdb/target.h
-index c34625c..d4fcbfc 100644
---- a/gdb/target.h
-+++ b/gdb/target.h
-@@ -1372,6 +1372,18 @@ extern int target_search_memory (CORE_ADDR start_addr,
-                                  ULONGEST pattern_len,
-                                  CORE_ADDR *found_addrp);
- 
-+/* Utility functions which can be used by search_memory implementations.  */
-+
-+void allocate_pattern_buffer (char **pattern_bufp, char **pattern_buf_end,
-+			      ULONGEST *pattern_buf_size);
-+
-+void increase_pattern_buffer (char **pattern_bufp, char **pattern_buf_end,
-+			      ULONGEST *pattern_buf_size, int val_bytes);
-+
-+int search_memory (CORE_ADDR *start_addr, ULONGEST *search_space_len,
-+		   const char *pattern_buf, ULONGEST pattern_len,
-+		   CORE_ADDR *found_addr);
-+
- /* Tracepoint-related operations.  */
- 
- #define target_trace_init() \
 diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
 new file mode 100644
 index 0000000..83faaf6
@@ -10876,6 +10470,92 @@ index 0000000..226dc5d
 +  h = 'h'
 +  call foo (g, h)
 +end
+diff --git a/gdb/testsuite/gdb.fortran/subrange.exp b/gdb/testsuite/gdb.fortran/subrange.exp
+new file mode 100644
+index 0000000..55598f9
+--- /dev/null
++++ b/gdb/testsuite/gdb.fortran/subrange.exp
+@@ -0,0 +1,51 @@
++# Copyright 2011 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++if { [skip_fortran_tests] } { return -1 }
++
++set testfile "subrange"
++set srcfile ${testfile}.f90
++if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}] } {
++    return -1
++}
++
++if ![runto MAIN__] {
++    perror "Couldn't run to MAIN__"
++    continue
++}
++
++# Depending on the compiler version being used, the name of the 4-byte integer
++# and real types can be printed differently.  For instance, gfortran-4.1 uses
++# "int4" whereas gfortran-4.3 uses "int(kind=4)".
++set int4 "(int4|integer\\(kind=4\\))"
++
++gdb_breakpoint [gdb_get_line_number "break-static"]
++gdb_continue_to_breakpoint "break-static" ".*break-static.*"
++
++gdb_test "p a (2, 2:3)" { = \(22, 32\)}
++gdb_test "p a (2:3, 3)" { = \(32, 33\)}
++gdb_test "p a (1, 2:)" { = \(21, 31\)}
++gdb_test "p a (2, :2)" { = \(12, 22\)}
++gdb_test "p a (3, 2:2)" { = \(23\)}
++gdb_test "ptype a (3, 2:2)" " = $int4 \\(2:2\\)"
++gdb_test "p a (4, :)" { = \(14, 24, 34\)}
++gdb_test "p a (:, :)" { = \(\( *11, 12, 13, 14\) \( *21, 22, 23, 24\) \( *31, 32, 33, 34\) *\)}
++gdb_test "ptype a (:, :)" " = $int4 \\(4,3\\)"
++gdb_test "p a (:)" "Wrong number of subscripts"
++gdb_test "p a (:, :, :)" "Wrong number of subscripts"
++gdb_test_no_output {set $a=a}
++delete_breakpoints
++gdb_unload
++gdb_test {p $a (3, 2:2)} { = \(23\)}
+diff --git a/gdb/testsuite/gdb.fortran/subrange.f90 b/gdb/testsuite/gdb.fortran/subrange.f90
+new file mode 100644
+index 0000000..fe33c2c
+--- /dev/null
++++ b/gdb/testsuite/gdb.fortran/subrange.f90
+@@ -0,0 +1,23 @@
++! Copyright 2011 Free Software Foundation, Inc.
++!
++! This program is free software; you can redistribute it and/or modify
++! it under the terms of the GNU General Public License as published by
++! the Free Software Foundation; either version 3 of the License, or
++! (at your option) any later version.
++! 
++! This program is distributed in the hope that it will be useful,
++! but WITHOUT ANY WARRANTY; without even the implied warranty of
++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++! GNU General Public License for more details.
++! 
++! You should have received a copy of the GNU General Public License
++! along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++program test
++  integer :: a (4, 3)
++  do 1 i = 1, 4
++  do 1 j = 1, 3
++    a (i, j) = j * 10 + i
++1 continue
++  write (*,*) a                 ! break-static
++end
 diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
 index 30a71dd..4bb8e7d 100644
 --- a/gdb/testsuite/gdb.gdb/selftest.exp
@@ -11453,35 +11133,6 @@ index 0000000..295602d
 +  s := 'test'#0'string';
 +  writeln(s); { set breakpoint 2 here }
 +end.
-diff --git a/gdb/testsuite/gdb.python/py-cmd.exp b/gdb/testsuite/gdb.python/py-cmd.exp
-index 66d3e53..0ee5f63 100644
---- a/gdb/testsuite/gdb.python/py-cmd.exp
-+++ b/gdb/testsuite/gdb.python/py-cmd.exp
-@@ -20,24 +20,6 @@ if $tracelevel then {
-     strace $tracelevel
- }
- 
--# Usage: gdb_py_test_multiple NAME INPUT RESULT {INPUT RESULT}...
--# Run a test named NAME, consisting of multiple lines of input.
--# After each input line INPUT, search for result line RESULT.
--# Succeed if all results are seen; fail otherwise.
--proc gdb_py_test_multiple {name args} {
--    global gdb_prompt
--    foreach {input result} $args {
--	if {[gdb_test_multiple $input "$name - $input" {
--	    -re "\[\r\n\]*($result)\[\r\n\]+($gdb_prompt | *>)$" {
--		pass "$name - $input"
--	    }
--	}]} {
--	    return 1
--	}
--    }
--    return 0
--}
--
- # Start with a fresh gdb.
- 
- gdb_exit
 diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
 index e3b5629..2a63d8d 100644
 --- a/gdb/testsuite/gdb.python/py-frame.exp
@@ -11501,48 +11152,6 @@ index e3b5629..2a63d8d 100644
  gdb_test "python print 'result =', gdb.selected_frame () == f1" " = True" "test gdb.selected_frame"
 +
 +gdb_test "python print 'result =', f0.block ()" "<gdb.Block object at 0x\[\[:xdigit:\]\]+>" "test Frame.block"
-diff --git a/gdb/testsuite/gdb.python/py-function.exp b/gdb/testsuite/gdb.python/py-function.exp
-index a5c8025..8a5dcda 100644
---- a/gdb/testsuite/gdb.python/py-function.exp
-+++ b/gdb/testsuite/gdb.python/py-function.exp
-@@ -20,24 +20,6 @@ if $tracelevel then {
-     strace $tracelevel
- }
- 
--# Usage: gdb_py_test_multiple NAME INPUT RESULT {INPUT RESULT}...
--# Run a test named NAME, consisting of multiple lines of input.
--# After each input line INPUT, search for result line RESULT.
--# Succeed if all results are seen; fail otherwise.
--proc gdb_py_test_multiple {name args} {
--    global gdb_prompt
--    foreach {input result} $args {
--	if {[gdb_test_multiple $input "$name - $input" {
--	    -re "\[\r\n\]*($result)\[\r\n\]+($gdb_prompt | *>)$" {
--		pass "$name - $input"
--	    }
--	}]} {
--	    return 1
--	}
--    }
--    return 0
--}
--
- # Start with a fresh gdb.
- 
- gdb_exit
-diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
-index e4a6c38..09ac065 100644
---- a/gdb/testsuite/gdb.python/py-prettyprint.exp
-+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
-@@ -99,6 +99,8 @@ proc run_lang_tests {lang} {
- 
-     gdb_test "print c" " = container \"container\" with 2 elements = {$nl *.0. = 23,$nl *.1. = 72$nl}"
- 
-+    gdb_test "print nullstr" "RuntimeError: Error reading string from inferior.*"
-+
-     gdb_test "print nstype" " = {$nl *.0. = 7,$nl *.1. = 42$nl}"
-     gdb_test "continue" "Program exited normally\."
- 
 diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
 index e012d53..1bd9e53 100644
 --- a/gdb/testsuite/gdb.python/py-value.exp
@@ -12225,17 +11834,21 @@ index 0000000..31f7656
 +extern void marker (void);
 +extern void forkoff (int nr);
 diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
-index 5a3f1fc..62466f8 100644
+index 5a3f1fc..4716626 100644
 --- a/gdb/testsuite/lib/gdb.exp
 +++ b/gdb/testsuite/lib/gdb.exp
-@@ -28,6 +28,7 @@ if {$tool == ""} {
- }
- 
- load_lib libgloss.exp
-+load_lib python-support.exp
- 
- global GDB
- 
+@@ -140,6 +140,11 @@ proc gdb_unload {} {
+ 		verbose "\t\tKilling previous program being debugged"
+ 	    exp_continue
+ 	}
++	-re "A program is being debugged already..*Are you sure you want to change the file.*y or n. $"\
++	    { send_gdb "y\n"
++		verbose "\t\tUnloading symbols for program being debugged"
++	    exp_continue
++	}
+ 	-re "Discard symbol table from .*y or n.*$" {
+ 	    send_gdb "y\n"
+ 	    exp_continue
 diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp
 index 891da37..236c5ca 100644
 --- a/gdb/testsuite/lib/pascal.exp
@@ -12271,67 +11884,8 @@ index 891da37..236c5ca 100644
      }
      set pascal_init_done 1
  }   
-diff --git a/gdb/testsuite/lib/python-support.exp b/gdb/testsuite/lib/python-support.exp
-new file mode 100644
-index 0000000..b8e9836
---- /dev/null
-+++ b/gdb/testsuite/lib/python-support.exp
-@@ -0,0 +1,53 @@
-+global python_supported_saved
-+
-+# Return 1 if Python scripting is supported in GDB, 0 if not.
-+proc python_supported { } {
-+  global gdb_prompt
-+  global python_supported_saved
-+
-+  if [info exists python_supported_saved] {
-+      verbose "python_supported:  returning saved $python_supported_saved" 2
-+      return $python_supported_saved
-+  }
-+
-+  gdb_test_multiple "python print 'hello, world!'" "verify python support" {
-+    -re "not supported.*$gdb_prompt $"	{
-+      return [set python_supported_saved 0]
-+    }
-+    -re "$gdb_prompt $"	{
-+      return [set python_supported_saved 1]
-+    }
-+  }
-+
-+  return [set python_supported_saved 0]
-+}
-+
-+# Run a command in GDB, and report a failure if a Python exception is thrown.
-+# If report_pass is true, report a pass if no exception is thrown.
-+proc gdb_py_test_silent_cmd {cmd name report_pass} {
-+  global gdb_prompt
-+
-+  gdb_test_multiple $cmd $name {
-+      -re "Traceback.*$gdb_prompt $"  { fail $name }
-+      -re "$gdb_prompt $"	      { if $report_pass { pass $name } }
-+  }
-+}
-+
-+# Usage: gdb_py_test_multiple NAME INPUT RESULT {INPUT RESULT}...
-+# Run a test named NAME, consisting of multiple lines of input.
-+# After each input line INPUT, search for result line RESULT.
-+# Succeed if all results are seen; fail otherwise.
-+proc gdb_py_test_multiple {name args} {
-+    global gdb_prompt
-+
-+    foreach {input result} $args {
-+	if {[gdb_test_multiple $input "$name - $input" {
-+	    -re "\[\r\n\]*($result)\[\r\n\]+($gdb_prompt | *>)$" {
-+		pass "$name - $input"
-+	    }
-+	}]} {
-+	    return 1
-+	}
-+    }
-+    return 0
-+}
 diff --git a/gdb/top.c b/gdb/top.c
-index e0feba5..e8981dd 100644
+index bba1a2d..5582f30 100644
 --- a/gdb/top.c
 +++ b/gdb/top.c
 @@ -343,6 +343,7 @@ void
@@ -12343,7 +11897,7 @@ index e0feba5..e8981dd 100644
    /* With multiple threads running while the one we're examining is
       stopped, the dcache can get stale without us being able to detect
 diff --git a/gdb/typeprint.c b/gdb/typeprint.c
-index a1c44f2..036d939 100644
+index 03e6332..ce6d1e0 100644
 --- a/gdb/typeprint.c
 +++ b/gdb/typeprint.c
 @@ -36,6 +36,7 @@
@@ -12400,7 +11954,7 @@ index a1c44f2..036d939 100644
  
  static void
 diff --git a/gdb/utils.c b/gdb/utils.c
-index 985f219..ccb068e 100644
+index c23c4d4..60d55b7 100644
 --- a/gdb/utils.c
 +++ b/gdb/utils.c
 @@ -2206,6 +2206,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void)
@@ -12441,89 +11995,22 @@ index 985f219..ccb068e 100644
  
  static void
 diff --git a/gdb/valarith.c b/gdb/valarith.c
-index 18e88b7..9f90acb 100644
+index 265532c..1e419dd 100644
 --- a/gdb/valarith.c
 +++ b/gdb/valarith.c
-@@ -165,12 +165,26 @@ value_subscript (struct value *array, LONGEST index)
- 
-       get_discrete_bounds (range_type, &lowerbound, &upperbound);
-       if (VALUE_LVAL (array) != lval_memory)
--	return value_subscripted_rvalue (array, index, lowerbound);
-+	{
-+	  if (index >= lowerbound && index <= upperbound)
-+	    {
-+	      CORE_ADDR element_size = TYPE_LENGTH (TYPE_TARGET_TYPE (tarray));
-+	      CORE_ADDR offset = (index - lowerbound) * element_size;
-+
-+	      return value_subscripted_rvalue (array, offset);
-+	    }
-+	  error (_("array or string index out of range"));
-+	}
- 
-       if (c_style == 0)
- 	{
- 	  if (index >= lowerbound && index <= upperbound)
--	    return value_subscripted_rvalue (array, index, lowerbound);
-+	    {
-+	      CORE_ADDR element_size = TYPE_LENGTH (TYPE_TARGET_TYPE (tarray));
-+	      CORE_ADDR offset = (index - lowerbound) * element_size;
-+
-+	      return value_subscripted_rvalue (array, offset);
-+	    }
- 	  /* Emit warning unless we have an array of unknown size.
- 	     An array of unknown size has lowerbound 0 and upperbound -1.  */
- 	  if (upperbound > -1)
-@@ -189,34 +203,37 @@ value_subscript (struct value *array, LONGEST index)
-     error (_("not an array or string"));
- }
- 
--/* Return the value of EXPR[IDX], expr an aggregate rvalue
--   (eg, a vector register).  This routine used to promote floats
--   to doubles, but no longer does.  */
-+/* Return the value of *((void *) ARRAY + ELEMENT), ARRAY an aggregate rvalue
-+   (eg, a vector register).  This routine used to promote floats to doubles,
-+   but no longer does.  OFFSET is zero-based with 0 for the lowermost existing
-+   element, it must be expressed in bytes (therefore multiplied by
-+   check_typedef (TYPE_TARGET_TYPE (array_type)).  */
- 
- struct value *
--value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
-+value_subscripted_rvalue (struct value *array, CORE_ADDR offset)
- {
+@@ -198,7 +198,10 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
    struct type *array_type = check_typedef (value_type (array));
    struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
--  unsigned int elt_size = TYPE_LENGTH (elt_type);
+   unsigned int elt_size = TYPE_LENGTH (elt_type);
 -  unsigned int elt_offs = elt_size * longest_to_int (index - lowerbound);
++  unsigned int elt_stride
++    = (TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)) == 0
++       ? elt_size : TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)));
++  unsigned int elt_offs = elt_stride * longest_to_int (index - lowerbound);
    struct value *v;
  
--  if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
--			     && elt_offs >= TYPE_LENGTH (array_type)))
--    error (_("no such vector element"));
-+  /* Do not check TYPE_LENGTH (array_type) as we may have been given the
-+     innermost dimension of a multi-dimensional Fortran array where its length
-+     is shorter than the possibly accessed element offset.  */
- 
-   v = allocate_value (elt_type);
-   if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
-     set_value_lazy (v, 1);
-   else
--    memcpy (value_contents_writeable (v),
--	    value_contents (array) + elt_offs, elt_size);
-+    {
-+      unsigned int elt_size = TYPE_LENGTH (elt_type);
-+      memcpy (value_contents_writeable (v),
-+	      value_contents (array) + offset, elt_size);
-+    }
- 
-   set_value_component_location (v, array);
-   VALUE_REGNUM (v) = VALUE_REGNUM (array);
-   VALUE_FRAME_ID (v) = VALUE_FRAME_ID (array);
--  set_value_offset (v, value_offset (array) + elt_offs);
-+  set_value_offset (v, value_offset (array) + offset);
-   return v;
- }
- 
-@@ -296,6 +313,10 @@ int
+   if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
+@@ -297,6 +300,10 @@ int
  binop_user_defined_p (enum exp_opcode op,
  		      struct value *arg1, struct value *arg2)
  {
@@ -12535,7 +12022,7 @@ index 18e88b7..9f90acb 100644
  }
  
 diff --git a/gdb/valops.c b/gdb/valops.c
-index fdbb702..f93f94a 100644
+index 19d5238..c9d721a 100644
 --- a/gdb/valops.c
 +++ b/gdb/valops.c
 @@ -38,6 +38,7 @@
@@ -12641,7 +12128,7 @@ index fdbb702..f93f94a 100644
  	}
      }
    else if (VALUE_LVAL (val) == lval_register)
-@@ -1427,7 +1493,18 @@ address_of_variable (struct symbol *var, struct block *b)
+@@ -1429,7 +1495,18 @@ address_of_variable (struct symbol *var, struct block *b)
    if ((VALUE_LVAL (val) == lval_memory && value_lazy (val))
        || TYPE_CODE (type) == TYPE_CODE_FUNC)
      {
@@ -12661,7 +12148,7 @@ index fdbb702..f93f94a 100644
  
        return value_from_pointer (lookup_pointer_type (type), addr);
      }
-@@ -1535,6 +1612,7 @@ struct value *
+@@ -1536,6 +1613,7 @@ struct value *
  value_coerce_array (struct value *arg1)
  {
    struct type *type = check_typedef (value_type (arg1));
@@ -12669,7 +12156,7 @@ index fdbb702..f93f94a 100644
  
    /* 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
-@@ -1544,8 +1622,12 @@ value_coerce_array (struct value *arg1)
+@@ -1545,8 +1623,12 @@ value_coerce_array (struct value *arg1)
    if (VALUE_LVAL (arg1) != lval_memory)
      error (_("Attempt to take address of value not located in memory."));
  
@@ -12683,8 +12170,17 @@ index fdbb702..f93f94a 100644
  }
  
  /* Given a value which is a function, return a value which is a pointer
+@@ -3587,6 +3669,8 @@ value_slice (struct value *array, int lowbound, int length)
+ 					TYPE_TARGET_TYPE (range_type),
+ 					lowbound, 
+ 					lowbound + length - 1);
++  TYPE_BYTE_STRIDE (slice_range_type) = TYPE_BYTE_STRIDE (range_type);
++
+   if (TYPE_CODE (array_type) == TYPE_CODE_BITSTRING)
+     {
+       int i;
 diff --git a/gdb/valprint.c b/gdb/valprint.c
-index d78df5c..e4fe7f9 100644
+index f65fe27..dd1aaee 100644
 --- a/gdb/valprint.c
 +++ b/gdb/valprint.c
 @@ -36,6 +36,7 @@
@@ -12703,7 +12199,7 @@ index d78df5c..e4fe7f9 100644
      case TYPE_CODE_BITSTRING:
        return 0;
      default:
-@@ -1115,6 +1115,7 @@ val_print_array_elements (struct type *type, const gdb_byte *valaddr,
+@@ -1117,6 +1117,7 @@ val_print_array_elements (struct type *type, const gdb_byte *valaddr,
  {
    unsigned int things_printed = 0;
    unsigned len;
@@ -12711,7 +12207,7 @@ index d78df5c..e4fe7f9 100644
    struct type *elttype, *index_type;
    unsigned eltlen;
    /* Position of the array element we are examining to see
-@@ -1123,9 +1124,33 @@ val_print_array_elements (struct type *type, const gdb_byte *valaddr,
+@@ -1125,9 +1126,33 @@ val_print_array_elements (struct type *type, const gdb_byte *valaddr,
    /* Number of repetitions we have detected so far.  */
    unsigned int reps;
    LONGEST low_bound, high_bound;
@@ -12747,7 +12243,7 @@ index d78df5c..e4fe7f9 100644
    index_type = TYPE_INDEX_TYPE (type);
  
    if (get_array_bounds (type, &low_bound, &high_bound))
-@@ -1200,6 +1225,8 @@ val_print_array_elements (struct type *type, const gdb_byte *valaddr,
+@@ -1202,6 +1227,8 @@ val_print_array_elements (struct type *type, const gdb_byte *valaddr,
      {
        fprintf_filtered (stream, "...");
      }
@@ -12757,7 +12253,7 @@ index d78df5c..e4fe7f9 100644
  
  /* Read LEN bytes of target memory at address MEMADDR, placing the
 diff --git a/gdb/value.c b/gdb/value.c
-index 1c50428..9b1b438 100644
+index db83ea2..3d47556 100644
 --- a/gdb/value.c
 +++ b/gdb/value.c
 @@ -39,6 +39,7 @@
@@ -12768,7 +12264,7 @@ index 1c50428..9b1b438 100644
  
  #include "python/python.h"
  
-@@ -864,12 +865,15 @@ void
+@@ -863,12 +864,15 @@ void
  set_value_component_location (struct value *component,
  			      const struct value *whole)
  {
@@ -12784,7 +12280,7 @@ index 1c50428..9b1b438 100644
    if (whole->lval == lval_computed)
      {
        struct lval_funcs *funcs = whole->location.computed.funcs;
-@@ -877,6 +881,12 @@ set_value_component_location (struct value *component,
+@@ -876,6 +880,12 @@ set_value_component_location (struct value *component,
        if (funcs->copy_closure)
          component->location.computed.closure = funcs->copy_closure (whole);
      }
@@ -12797,7 +12293,7 @@ index 1c50428..9b1b438 100644
  }
  
  
-@@ -1010,6 +1020,29 @@ show_values (char *num_exp, int from_tty)
+@@ -1009,6 +1019,29 @@ show_values (char *num_exp, int from_tty)
        num_exp[1] = '\0';
      }
  }
@@ -12827,7 +12323,7 @@ index 1c50428..9b1b438 100644
  
  /* Internal variables.  These are variables within the debugger
     that hold values assigned by debugger commands.
-@@ -1505,6 +1538,40 @@ call_internal_function (struct gdbarch *gdbarch,
+@@ -1504,6 +1537,40 @@ call_internal_function (struct gdbarch *gdbarch,
    return (*ifn->handler) (gdbarch, language, ifn->cookie, argc, argv);
  }
  
@@ -12868,7 +12364,7 @@ index 1c50428..9b1b438 100644
  /* The 'function' command.  This does nothing -- it is just a
     placeholder to let "help function NAME" work.  This is also used as
     the implementation of the sub-command that is created when
-@@ -1552,11 +1619,10 @@ preserve_one_value (struct value *value, struct objfile *objfile,
+@@ -1551,11 +1618,10 @@ preserve_one_value (struct value *value, struct objfile *objfile,
  		    htab_t copied_types)
  {
    if (TYPE_OBJFILE (value->type) == objfile)
@@ -12882,7 +12378,7 @@ index 1c50428..9b1b438 100644
  						 copied_types);
  }
  
-@@ -1571,13 +1637,13 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile,
+@@ -1570,13 +1636,13 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile,
      case INTERNALVAR_INTEGER:
        if (var->u.integer.type && TYPE_OBJFILE (var->u.integer.type) == objfile)
  	var->u.integer.type
@@ -12934,7 +12430,7 @@ index 1c50428..9b1b438 100644
 +  observer_attach_mark_used (value_types_mark_used);
  }
 diff --git a/gdb/value.h b/gdb/value.h
-index e637842..5f36aef 100644
+index 16f4646..501df86 100644
 --- a/gdb/value.h
 +++ b/gdb/value.h
 @@ -389,6 +389,10 @@ extern struct value *value_from_double (struct type *type, DOUBLEST num);
@@ -12948,12 +12444,3 @@ index e637842..5f36aef 100644
  extern struct value *value_at (struct type *type, CORE_ADDR addr);
  extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr);
  
-@@ -749,7 +753,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,
--					       LONGEST index, int lowerbound);
-+					       CORE_ADDR offset);
- 
- /* User function handler.  */
- 
diff --git a/gdb-bz541866-rwatch-before-run.patch b/gdb-bz541866-rwatch-before-run.patch
index f485b2f..073b6b9 100644
--- a/gdb-bz541866-rwatch-before-run.patch
+++ b/gdb-bz541866-rwatch-before-run.patch
@@ -1,7 +1,7 @@
-Index: gdb-7.1.90.20100711/gdb/config/i386/linux64.mh
+Index: gdb-7.2.50.20110117/gdb/config/i386/linux64.mh
 ===================================================================
---- gdb-7.1.90.20100711.orig/gdb/config/i386/linux64.mh	2010-05-28 20:50:31.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/config/i386/linux64.mh	2010-07-13 19:02:54.000000000 +0200
+--- gdb-7.2.50.20110117.orig/gdb/config/i386/linux64.mh	2010-05-28 20:50:31.000000000 +0200
++++ gdb-7.2.50.20110117/gdb/config/i386/linux64.mh	2011-01-17 16:01:48.000000000 +0100
 @@ -2,7 +2,7 @@
  NATDEPFILES= inf-ptrace.o fork-child.o \
  	i386-nat.o amd64-nat.o amd64-linux-nat.o linux-nat.o \
@@ -11,10 +11,10 @@ Index: gdb-7.1.90.20100711/gdb/config/i386/linux64.mh
  NAT_CDEPS = $(srcdir)/proc-service.list
  
  # The dynamically loaded libthread_db needs access to symbols in the
-Index: gdb-7.1.90.20100711/gdb/config/i386/nm-linux64.h
+Index: gdb-7.2.50.20110117/gdb/config/i386/nm-linux64.h
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.1.90.20100711/gdb/config/i386/nm-linux64.h	2010-07-13 19:02:28.000000000 +0200
++++ gdb-7.2.50.20110117/gdb/config/i386/nm-linux64.h	2011-01-17 16:01:48.000000000 +0100
 @@ -0,0 +1,28 @@
 +/* Native support for GNU/Linux amd64.
 +
@@ -44,11 +44,11 @@ Index: gdb-7.1.90.20100711/gdb/config/i386/nm-linux64.h
 +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
 +
 +#endif /* NM_LINUX64_H */
-Index: gdb-7.1.90.20100711/gdb/target.h
+Index: gdb-7.2.50.20110117/gdb/target.h
 ===================================================================
---- gdb-7.1.90.20100711.orig/gdb/target.h	2010-07-12 23:07:34.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/target.h	2010-07-13 19:02:28.000000000 +0200
-@@ -1298,8 +1298,10 @@ extern char *normal_pid_to_str (ptid_t p
+--- gdb-7.2.50.20110117.orig/gdb/target.h	2011-01-14 14:47:15.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/target.h	2011-01-17 16:02:08.000000000 +0100
+@@ -1318,8 +1318,10 @@ extern char *normal_pid_to_str (ptid_t p
     bp_hardware_breakpoint.  CNT is the number of such watchpoints used so far
     (including this one?).  OTHERTYPE is who knows what...  */
  
@@ -57,12 +57,12 @@ Index: gdb-7.1.90.20100711/gdb/target.h
   (*current_target.to_can_use_hw_breakpoint) (TYPE, CNT, OTHERTYPE);
 +#endif
  
- #define target_region_ok_for_hw_watchpoint(addr, len) \
-     (*current_target.to_region_ok_for_hw_watchpoint) (addr, len)
-Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
+ /* Returns the number of debug registers needed to watch the given
+    memory region, or zero if not supported.  */
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp	2010-07-13 19:02:28.000000000 +0200
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp	2011-01-17 16:01:48.000000000 +0100
 @@ -0,0 +1,40 @@
 +# Copyright 2009, 2010 Free Software Foundation, Inc.
 +
diff --git a/gdb-bz592031-siginfo-lost-4of5.patch b/gdb-bz592031-siginfo-lost-4of5.patch
index 290644c..639b37d 100644
--- a/gdb-bz592031-siginfo-lost-4of5.patch
+++ b/gdb-bz592031-siginfo-lost-4of5.patch
@@ -78,11 +78,11 @@ gdb/testsuite/
 	* gdb.threads/sigstep-threads.exp: New file.
 	* gdb.threads/sigstep-threads.c: New file.
 
-Index: gdb-7.2.50.20101116/gdb/linux-nat.c
+Index: gdb-7.2.50.20110117/gdb/linux-nat.c
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/linux-nat.c	2010-11-16 08:21:46.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/linux-nat.c	2010-11-16 09:12:26.000000000 +0100
-@@ -2759,6 +2759,8 @@ stop_wait_callback (struct lwp_info *lp,
+--- gdb-7.2.50.20110117.orig/gdb/linux-nat.c	2011-01-17 15:53:14.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/linux-nat.c	2011-01-17 16:05:57.000000000 +0100
+@@ -2803,6 +2803,8 @@ stop_wait_callback (struct lwp_info *lp,
      {
        int status;
  
@@ -91,7 +91,7 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
        status = wait_lwp (lp);
        if (status == 0)
  	return 0;
-@@ -2783,110 +2785,61 @@ stop_wait_callback (struct lwp_info *lp,
+@@ -2828,110 +2830,61 @@ stop_wait_callback (struct lwp_info *lp,
  
        if (WSTOPSIG (status) != SIGSTOP)
  	{
@@ -115,7 +115,7 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
 -
 -	      save_sigtrap (lp);
 -
--	      /* Now resume this LWP and get the SIGSTOP event. */
+-	      /* Now resume this LWP and get the SIGSTOP event.  */
 -	      errno = 0;
 -	      ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
 -	      if (debug_linux_nat)
@@ -130,13 +130,13 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
 -				      target_pid_to_str (lp->ptid));
 -		}
 -	      /* Hold this event/waitstatus while we check to see if
--		 there are any more (we still want to get that SIGSTOP). */
+-		 there are any more (we still want to get that SIGSTOP).  */
 -	      stop_wait_callback (lp, NULL);
 +	  /* The thread was stopped with a signal other than SIGSTOP.  */
  
 -	      /* Hold the SIGTRAP for handling by linux_nat_wait.  If
 -		 there's another event, throw it back into the
--		 queue. */
+-		 queue.  */
 -	      if (lp->status)
 -		{
 -		  if (debug_linux_nat)
@@ -149,14 +149,14 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
 +	  /* Save the trap's siginfo in case we need it later.  */
 +	  save_siginfo (lp);
  
--	      /* Save the sigtrap event. */
+-	      /* Save the sigtrap event.  */
 -	      lp->status = status;
 -	      return 0;
 -	    }
 -	  else
 -	    {
 -	      /* The thread was stopped with a signal other than
--	         SIGSTOP, and didn't accidentally trip a breakpoint. */
+-	         SIGSTOP, and didn't accidentally trip a breakpoint.  */
 +	  save_sigtrap (lp);
  
 -	      if (debug_linux_nat)
@@ -166,7 +166,7 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
 -				      status_to_str ((int) status),
 -				      target_pid_to_str (lp->ptid));
 -		}
--	      /* Now resume this LWP and get the SIGSTOP event. */
+-	      /* Now resume this LWP and get the SIGSTOP event.  */
 -	      errno = 0;
 -	      ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
 -	      if (debug_linux_nat)
@@ -176,7 +176,7 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
 -				    errno ? safe_strerror (errno) : "OK");
 -
 -	      /* Hold this event/waitstatus while we check to see if
--	         there are any more (we still want to get that SIGSTOP). */
+-	         there are any more (we still want to get that SIGSTOP).  */
 -	      stop_wait_callback (lp, NULL);
 +	  if (debug_linux_nat)
 +	    fprintf_unfiltered (gdb_stdlog,
@@ -202,7 +202,7 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
 -		lp->status = status;
 -	      return 0;
 -	    }
-+	  /* Save the sigtrap event. */
++	  /* Save the sigtrap event.  */
 +	  lp->status = status;
 +	  gdb_assert (! lp->stopped);
 +	  gdb_assert (lp->signalled);
@@ -248,7 +248,7 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
  	  lp->signalled = 0;
  	}
      }
-@@ -3469,52 +3422,6 @@ retry:
+@@ -3514,52 +3467,6 @@ retry:
  	lp = NULL;
      }
  
@@ -301,10 +301,10 @@ Index: gdb-7.2.50.20101116/gdb/linux-nat.c
    if (!target_can_async_p ())
      {
        /* Causes SIGINT to be passed on to the attached process.  */
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/siginfo-threads.c
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/siginfo-threads.c	2010-11-16 09:08:44.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.c	2011-01-17 16:02:40.000000000 +0100
 @@ -0,0 +1,447 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -753,10 +753,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/siginfo-threads.c
 +
 +  return EXIT_SUCCESS;
 +}
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/siginfo-threads.exp
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/siginfo-threads.exp	2010-11-16 09:08:44.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/siginfo-threads.exp	2011-01-17 16:02:40.000000000 +0100
 @@ -0,0 +1,94 @@
 +# Copyright 2010 Free Software Foundation, Inc.
 +
@@ -852,10 +852,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/siginfo-threads.exp
 +}
 +
 +gdb_continue_to_breakpoint break-at-exit ".*break-at-exit.*"
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/sigstep-threads.c
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/sigstep-threads.c	2010-11-16 09:08:44.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.c	2011-01-17 16:02:40.000000000 +0100
 @@ -0,0 +1,54 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -911,10 +911,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/sigstep-threads.c
 +  start (NULL);	/* main-start */
 +  return 0;
 +}
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/sigstep-threads.exp
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/sigstep-threads.exp	2010-11-16 09:08:44.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.threads/sigstep-threads.exp	2011-01-17 16:02:40.000000000 +0100
 @@ -0,0 +1,74 @@
 +# Copyright 2010 Free Software Foundation, Inc.
 +
diff --git a/gdb-fortran-common-reduce.patch b/gdb-fortran-common-reduce.patch
index 2df3d3b..fe1199f 100644
--- a/gdb-fortran-common-reduce.patch
+++ b/gdb-fortran-common-reduce.patch
@@ -1,7 +1,7 @@
-Index: gdb-7.2.50.20110107/gdb/f-lang.c
+Index: gdb-7.2.50.20110117/gdb/f-lang.c
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/f-lang.c	2011-01-05 23:22:48.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/f-lang.c	2011-01-07 09:08:52.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/f-lang.c	2011-01-07 20:36:16.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/f-lang.c	2011-01-17 15:56:07.000000000 +0100
 @@ -57,20 +57,6 @@ typedef struct saved_bf_symnum SAVED_BF,
  /* Local functions */
  
@@ -77,10 +77,10 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -						       above list.  */
 -
 -static SAVED_BF_PTR tmp_bf_ptr;	/* Generic temporary for use 
--				   in macros */
+-				   in macros.  */
 -
 -/* The following function simply enters a given common block onto 
--   the global common block chain */
+-   the global common block chain.  */
 -
 -static void
 -add_common_block (char *name, CORE_ADDR offset, int secnum, char *func_stab)
@@ -91,7 +91,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -  /* If the COMMON block we are trying to add has a blank 
 -     name (i.e. "#BLNK_COM") then we set it to __BLANK
 -     because the darn "#" character makes GDB's input 
--     parser have fits. */
+-     parser have fits.  */
 -
 -
 -  if (strcmp (name, BLANK_COMMON_NAME_ORIGINAL) == 0
@@ -111,7 +111,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -  tmp->name = xmalloc (strlen (name) + 1);
 -
 -  /* local_copy_func_stab is a stabstring, let us first extract the 
--     function name from the stab by NULLing out the ':' character. */
+-     function name from the stab by NULLing out the ':' character.  */
 -
 -
 -  c = NULL;
@@ -148,7 +148,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -#endif
 -
 -/* The following function simply enters a given common entry onto 
--   the "current_common" block that has been saved away. */
+-   the "current_common" block that has been saved away.  */
 -
 -#if 0
 -static void
@@ -160,7 +160,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -
 -  /* The order of this list is important, since 
 -     we expect the entries to appear in decl.
--     order when we later issue "info common" calls */
+-     order when we later issue "info common" calls.  */
 -
 -  tmp = allocate_common_entry_node ();
 -
@@ -185,7 +185,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -}
 -#endif
 -
--/* This routine finds the first encountred COMMON block named "name" */
+-/* This routine finds the first encountred COMMON block named "name".  */
 -
 -#if 0
 -static SAVED_F77_COMMON_PTR
@@ -208,7 +208,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -#endif
  
  /* This routine finds the first encountred COMMON block named "name" 
-    that belongs to function funcname */
+    that belongs to function funcname.  */
 @@ -662,193 +470,3 @@ find_common_for_function (char *name, ch
      }
    return (NULL);
@@ -226,7 +226,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -{
 -  COMMON_ENTRY_PTR entry;
 -
--  blk->offset = offset;		/* Keep this around for future use. */
+-  blk->offset = offset;		/* Keep this around for future use.  */
 -
 -  entry = blk->entries;
 -
@@ -244,7 +244,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -   blocks occur with relative infrequency, we simply do a linear scan on
 -   the name.  Eventually, the best way to do this will be a
 -   hashed-lookup.  Secnum is the section number for the .bss section
--   (which is where common data lives). */
+-   (which is where common data lives).  */
 -
 -static void
 -patch_all_commons_by_name (char *name, CORE_ADDR offset, int secnum)
@@ -282,7 +282,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -   #line pragmas sometimes cause line ranges to get messed up 
 -   we simply create a linear list.  This list can then be searched 
 -   first by a queueing algorithm and upon failure fall back to 
--   a linear scan. */
+-   a linear scan.  */
 -
 -#if 0
 -#define ADD_BF_SYMNUM(bf_sym,fcn_sym) \
@@ -311,7 +311,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -		   }
 -#endif
 -
--/* This function frees the entire (.bf,function) list */
+-/* This function frees the entire (.bf,function) list.  */
 -
 -#if 0
 -static void
@@ -342,7 +342,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -  int nprobes = 0;
 -
 -  /* First use a simple queuing algorithm (i.e. look and see if the 
--     item at the head of the queue is the one you want)  */
+-     item at the head of the queue is the one you want).  */
 -
 -  if (saved_bf_list == NULL)
 -    internal_error (__FILE__, __LINE__,
@@ -361,7 +361,7 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -
 -  /* If the above did not work (probably because #line directives were 
 -     used in the sourcefile and they messed up our internal tables) we now do
--     the ugly linear scan */
+-     the ugly linear scan.  */
 -
 -  if (global_remote_debug)
 -    fprintf_unfiltered (gdb_stderr, "\ndefaulting to linear scan\n");
@@ -403,10 +403,10 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.c
 -  saved_function_list = NULL;
 -}
 -#endif
-Index: gdb-7.2.50.20110107/gdb/f-lang.h
+Index: gdb-7.2.50.20110117/gdb/f-lang.h
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/f-lang.h	2011-01-07 09:03:38.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/f-lang.h	2011-01-07 09:07:58.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/f-lang.h	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/f-lang.h	2011-01-17 15:54:14.000000000 +0100
 @@ -76,14 +76,9 @@ typedef struct saved_f77_common SAVED_F7
  typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR;
  
@@ -422,10 +422,10 @@ Index: gdb-7.2.50.20110107/gdb/f-lang.h
  #define BLANK_COMMON_NAME_ORIGINAL "#BLNK_COM"	/* XLF assigned  */
  #define BLANK_COMMON_NAME_MF77     "__BLNK__"	/* MF77 assigned  */
  #define BLANK_COMMON_NAME_LOCAL    "__BLANK"	/* Local GDB */
-Index: gdb-7.2.50.20110107/gdb/f-valprint.c
+Index: gdb-7.2.50.20110117/gdb/f-valprint.c
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/f-valprint.c	2011-01-07 09:03:38.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/f-valprint.c	2011-01-07 09:07:58.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/f-valprint.c	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/f-valprint.c	2011-01-17 15:54:36.000000000 +0100
 @@ -35,10 +35,6 @@
  #include "command.h"
  #include "block.h"
@@ -442,7 +442,7 @@ Index: gdb-7.2.50.20110107/gdb/f-valprint.c
  }
  
 -/* This function is used to determine whether there is a
--   F77 common block visible at the current scope called 'comname'. */
+-   F77 common block visible at the current scope called 'comname'.  */
 -
 -#if 0
 -static int
@@ -459,7 +459,7 @@ Index: gdb-7.2.50.20110107/gdb/f-valprint.c
 -  fi = get_selected_frame (_("No frame selected"));
 -
 -  /* The following is generally ripped off from stack.c's routine 
--     print_frame_info() */
+-     print_frame_info().  */
 -
 -  func = find_pc_function (fi->pc);
 -  if (func)
@@ -476,7 +476,7 @@ Index: gdb-7.2.50.20110107/gdb/f-valprint.c
 -         up with a larger address for the function use that instead.
 -         I don't think this can ever cause any problems; there shouldn't
 -         be any minimal symbols in the middle of a function.
--         FIXME:  (Not necessarily true.  What about text labels) */
+-         FIXME:  (Not necessarily true.  What about text labels?)  */
 -
 -      struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (fi->pc);
 -
diff --git a/gdb-fortran-common.patch b/gdb-fortran-common.patch
index a70b780..acc3622 100644
--- a/gdb-fortran-common.patch
+++ b/gdb-fortran-common.patch
@@ -1,8 +1,8 @@
-Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
+Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/dwarf2read.c	2010-11-16 08:19:54.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/dwarf2read.c	2010-11-16 08:25:21.000000000 +0100
-@@ -7315,12 +7315,14 @@ read_set_type (struct die_info *die, str
+--- gdb-7.2.50.20110117.orig/gdb/dwarf2read.c	2011-01-17 15:50:41.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/dwarf2read.c	2011-01-17 15:56:23.000000000 +0100
+@@ -7465,12 +7465,14 @@ read_set_type (struct die_info *die, str
    return set_die_type (die, set_type, cu);
  }
  
@@ -19,7 +19,7 @@ Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
    struct attribute *attr;
    struct symbol *sym;
    CORE_ADDR base = (CORE_ADDR) 0;
-@@ -7345,10 +7347,40 @@ read_common_block (struct die_info *die,
+@@ -7495,10 +7497,40 @@ read_common_block (struct die_info *die,
      }
    if (die->child != NULL)
      {
@@ -60,7 +60,7 @@ Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
  	  attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu);
  	  if (sym != NULL && attr != NULL)
  	    {
-@@ -7366,8 +7398,25 @@ read_common_block (struct die_info *die,
+@@ -7516,8 +7548,25 @@ read_common_block (struct die_info *die,
  	      SYMBOL_VALUE_ADDRESS (sym) = base + byte_offset;
  	      add_symbol_to_list (sym, &global_symbols);
  	    }
@@ -86,7 +86,7 @@ Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
      }
  }
  
-@@ -10954,6 +11003,13 @@ new_symbol_full (struct die_info *die, s
+@@ -11111,6 +11160,13 @@ new_symbol_full (struct die_info *die, s
  	    {
  	      var_decode_location (attr, sym, cu);
  	      attr2 = dwarf2_attr (die, DW_AT_external, cu);
@@ -100,7 +100,7 @@ Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
  	      if (SYMBOL_CLASS (sym) == LOC_STATIC
  		  && SYMBOL_VALUE_ADDRESS (sym) == 0
  		  && !dwarf2_per_objfile->has_section_at_zero)
-@@ -11126,6 +11182,11 @@ new_symbol_full (struct die_info *die, s
+@@ -11283,6 +11339,11 @@ new_symbol_full (struct die_info *die, s
  	  SYMBOL_CLASS (sym) = LOC_TYPEDEF;
  	  list_to_add = &global_symbols;
  	  break;
@@ -112,11 +112,11 @@ Index: gdb-7.2.50.20101116/gdb/dwarf2read.c
  	default:
  	  /* Not a tag we recognize.  Hopefully we aren't processing
  	     trash data, but since we must specifically ignore things
-Index: gdb-7.2.50.20101116/gdb/f-lang.c
+Index: gdb-7.2.50.20110117/gdb/f-lang.c
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/f-lang.c	2010-11-16 08:21:46.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/f-lang.c	2010-11-16 08:22:05.000000000 +0100
-@@ -443,27 +443,3 @@ _initialize_f_language (void)
+--- gdb-7.2.50.20110117.orig/gdb/f-lang.c	2011-01-17 15:56:07.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/f-lang.c	2011-01-17 15:56:48.000000000 +0100
+@@ -446,27 +446,3 @@ _initialize_f_language (void)
  
    add_language (&f_language_defn);
  }
@@ -124,7 +124,7 @@ Index: gdb-7.2.50.20101116/gdb/f-lang.c
 -SAVED_F77_COMMON_PTR head_common_list = NULL;	/* Ptr to 1st saved COMMON  */
 -
 -/* This routine finds the first encountred COMMON block named "name" 
--   that belongs to function funcname */
+-   that belongs to function funcname.  */
 -
 -SAVED_F77_COMMON_PTR
 -find_common_for_function (char *name, char *funcname)
@@ -144,10 +144,10 @@ Index: gdb-7.2.50.20101116/gdb/f-lang.c
 -    }
 -  return (NULL);
 -}
-Index: gdb-7.2.50.20101116/gdb/f-lang.h
+Index: gdb-7.2.50.20110117/gdb/f-lang.h
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/f-lang.h	2010-11-16 08:21:46.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/f-lang.h	2010-11-16 08:22:05.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/f-lang.h	2011-01-17 15:54:14.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/f-lang.h	2011-01-17 15:56:23.000000000 +0100
 @@ -52,36 +52,8 @@ enum f90_range_type
      NONE_BOUND_DEFAULT		/* "(low:high)"  */
    };
@@ -185,10 +185,10 @@ Index: gdb-7.2.50.20101116/gdb/f-lang.h
  
  /* When reasonable array bounds cannot be fetched, such as when 
     you ask to 'mt print symbols' and there is no stack frame and 
-Index: gdb-7.2.50.20101116/gdb/f-valprint.c
+Index: gdb-7.2.50.20110117/gdb/f-valprint.c
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/f-valprint.c	2010-11-16 08:21:46.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/f-valprint.c	2010-11-16 08:22:05.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/f-valprint.c	2011-01-17 15:54:36.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/f-valprint.c	2011-01-17 15:59:38.000000000 +0100
 @@ -34,6 +34,8 @@
  #include "gdbcore.h"
  #include "command.h"
@@ -198,7 +198,7 @@ Index: gdb-7.2.50.20101116/gdb/f-valprint.c
  
  extern void _initialize_f_valprint (void);
  static void info_common_command (char *, int);
-@@ -486,22 +488,54 @@ f_val_print (struct type *type, const gd
+@@ -489,22 +491,54 @@ f_val_print (struct type *type, const gd
    return 0;
  }
  
@@ -266,7 +266,7 @@ Index: gdb-7.2.50.20101116/gdb/f-valprint.c
  }
  
  /* This function is used to print out the values in a given COMMON 
-@@ -511,11 +545,9 @@ list_all_visible_commons (char *funname)
+@@ -514,11 +548,9 @@ list_all_visible_commons (char *funname)
  static void
  info_common_command (char *comname, int from_tty)
  {
@@ -280,9 +280,9 @@ Index: gdb-7.2.50.20101116/gdb/f-valprint.c
  
    /* We have been told to display the contents of F77 COMMON 
       block supposedly visible in this function.  Let us 
-@@ -527,74 +559,31 @@ info_common_command (char *comname, int 
+@@ -530,74 +562,31 @@ info_common_command (char *comname, int 
    /* The following is generally ripped off from stack.c's routine 
-      print_frame_info() */
+      print_frame_info().  */
  
 -  func = find_pc_function (get_frame_pc (fi));
 -  if (func)
@@ -301,7 +301,7 @@ Index: gdb-7.2.50.20101116/gdb/f-valprint.c
 -         up with a larger address for the function use that instead.
 -         I don't think this can ever cause any problems; there shouldn't
 -         be any minimal symbols in the middle of a function.
--         FIXME:  (Not necessarily true.  What about text labels) */
+-         FIXME:  (Not necessarily true.  What about text labels?)  */
 -
 -      struct minimal_symbol *msymbol = 
 -	lookup_minimal_symbol_by_pc (get_frame_pc (fi));
@@ -327,7 +327,7 @@ Index: gdb-7.2.50.20101116/gdb/f-valprint.c
      }
  
 -  /* If comname is NULL, we assume the user wishes to see the 
--     which COMMON blocks are visible here and then return */
+-     which COMMON blocks are visible here and then return.  */
 -
 -  if (comname == 0)
 +  while (block)
@@ -371,11 +371,11 @@ Index: gdb-7.2.50.20101116/gdb/f-valprint.c
  }
  
  void
-Index: gdb-7.2.50.20101116/gdb/stack.c
+Index: gdb-7.2.50.20110117/gdb/stack.c
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/stack.c	2010-09-30 12:29:00.000000000 +0200
-+++ gdb-7.2.50.20101116/gdb/stack.c	2010-11-16 08:22:05.000000000 +0100
-@@ -1490,6 +1490,8 @@ iterate_over_block_locals (struct block 
+--- gdb-7.2.50.20110117.orig/gdb/stack.c	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/stack.c	2011-01-17 15:56:23.000000000 +0100
+@@ -1498,6 +1498,8 @@ iterate_over_block_locals (struct block 
  	case LOC_COMPUTED:
  	  if (SYMBOL_IS_ARGUMENT (sym))
  	    break;
@@ -384,10 +384,10 @@ Index: gdb-7.2.50.20101116/gdb/stack.c
  	  (*cb) (SYMBOL_PRINT_NAME (sym), sym, cb_data);
  	  break;
  
-Index: gdb-7.2.50.20101116/gdb/symtab.h
+Index: gdb-7.2.50.20110117/gdb/symtab.h
 ===================================================================
---- gdb-7.2.50.20101116.orig/gdb/symtab.h	2010-11-16 07:53:59.000000000 +0100
-+++ gdb-7.2.50.20101116/gdb/symtab.h	2010-11-16 08:22:05.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/symtab.h	2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/symtab.h	2011-01-17 15:56:23.000000000 +0100
 @@ -408,7 +408,10 @@ typedef enum domain_enum_tag
    FUNCTIONS_DOMAIN,
  
@@ -400,10 +400,10 @@ Index: gdb-7.2.50.20101116/gdb/symtab.h
  }
  domain_enum;
  
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.fortran/common-block.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp	2010-11-16 08:22:05.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.fortran/common-block.exp	2011-01-17 15:56:23.000000000 +0100
 @@ -0,0 +1,101 @@
 +# Copyright 2008 Free Software Foundation, Inc.
 +
@@ -506,10 +506,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp
 +gdb_test "p ix_x" " = 1 *" "p ix_x in"
 +gdb_test "p iy_y" " = 2 *" "p iy_y in"
 +gdb_test "p iz_z2" " = 3 *" "p iz_z2 in"
-Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.f90
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.fortran/common-block.f90
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.f90	2010-11-16 08:22:05.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.fortran/common-block.f90	2011-01-17 15:56:23.000000000 +0100
 @@ -0,0 +1,67 @@
 +! Copyright 2008 Free Software Foundation, Inc.
 +!
diff --git a/gdb-readline-6.0-signal.patch b/gdb-readline-6.0-signal.patch
new file mode 100644
index 0000000..79c36b0
--- /dev/null
+++ b/gdb-readline-6.0-signal.patch
@@ -0,0 +1,266 @@
+http://sourceware.org/ml/gdb-patches/2009-11/msg00596.html
+Subject: [gdb FYI-patch] callback-mode readline-6.0 regression
+
+Hi Chet,
+
+FSF GDB currently ships bundled with readline-5.2 which works fine.
+But using --with-system-readline and readline-6.0-patchlevel4 has
+a regression:
+
+readline-5.2: Run `gdb -nx -q' and type CTRL-C:
+(gdb) Quit
+(gdb) _
+
+readline-6.0: Run `gdb -nx -q' and type CTRL-C:
+(gdb) _
+ = nothing happens (it gets buffered and executed later)
+	(It does also FAIL on gdb.gdb/selftest.exp.)
+
+It is because GDB waits in its own poll() mainloop and readline uses via
+rl_callback_handler_install and rl_callback_handler_remove.  This way the
+readline internal variable _rl_interrupt_immediately remains 0 and CTRL-C gets
+only stored to _rl_caught_signal but not executed.
+
+Seen in rl_signal_handler even if _rl_interrupt_immediately is set and
+_rl_handle_signal is called then the signal is still stored to
+_rl_caught_signal.  In the _rl_interrupt_immediately case it should not be
+stored when it was already processed.
+
+rl_signal_handler does `_rl_interrupt_immediately = 0;' - while I am not aware
+of its meaning it breaks the nest-counting of other routines which do
+`_rl_interrupt_immediately++;' and `_rl_interrupt_immediately--;' possibly
+creating problematic `_rl_interrupt_immediately == -1'.
+
+`_rl_interrupt_immediately' is an internal variable, how it could be accessed
+by a readline application? (OK, maybe it should not be used.)
+
+Attaching a current GDB-side patch but it must access readline internal
+variable _rl_caught_signal and it is generally just a workaround.  Could you
+please include support for signals in this asynchronous mode in readline-6.1?
+I find it would be enough to make RL_CHECK_SIGNALS public?
+
+
+GDB: No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
+But this is not a patch intended to be accepted.
+
+
+Thanks,
+Jan
+
+
+gdb/
+2009-11-29  Jan Kratochvil  <jan.kratochvil at redhat.com>
+
+	* config.in, configure: Regenerate.
+	* configure.ac (for readline_echoing_p): Move inside $LIBS change.
+	(for _rl_caught_signal): New.
+	* event-loop.c: Include readline/readline.h.
+	(gdb_do_one_event) [HAVE_READLINE_CAUGHT_SIGNAL]: New.
+
+gdb/testsuite/
+2009-11-29  Jan Kratochvil  <jan.kratochvil at redhat.com>
+
+	* gdb.gdb/selftest.exp (backtrace through signal handler): Move before
+	SIGINT pass, drop the timeout case.
+	(send SIGINT signal to child process): Use gdb_test.
+	(backtrace through readline handler): New.
+
+Index: gdb-7.2.50.20110107/gdb/config.in
+===================================================================
+--- gdb-7.2.50.20110107.orig/gdb/config.in	2011-01-17 15:36:40.000000000 +0100
++++ gdb-7.2.50.20110107/gdb/config.in	2011-01-17 15:37:09.000000000 +0100
+@@ -464,6 +464,9 @@
+ /* Define to 1 if wcwidth is declared even after undefining macros. */
+ #undef HAVE_RAW_DECL_WCWIDTH
+ 
++/* readline-6.0 workaround of blocked signals. */
++#undef HAVE_READLINE_CAUGHT_SIGNAL
++
+ /* Define to 1 if you have the `realpath' function. */
+ #undef HAVE_REALPATH
+ 
+Index: gdb-7.2.50.20110107/gdb/configure.ac
+===================================================================
+--- gdb-7.2.50.20110107.orig/gdb/configure.ac	2011-01-17 15:36:42.000000000 +0100
++++ gdb-7.2.50.20110107/gdb/configure.ac	2011-01-17 15:37:09.000000000 +0100
+@@ -736,17 +736,25 @@ if test "$with_system_readline" = yes; t
+   # readline-6.0 started to use the name `_rl_echoing_p'.
+   # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
+ 
+-  AC_MSG_CHECKING([for readline_echoing_p])
+   save_LIBS=$LIBS
+   LIBS="$LIBS $READLINE"
++  AC_MSG_CHECKING([for readline_echoing_p])
+   AC_LINK_IFELSE(AC_LANG_PROGRAM(,[[extern int readline_echoing_p;
+ 				    return readline_echoing_p;]]),
+ 		 [READLINE_ECHOING_P=yes],
+ 		 [READLINE_ECHOING_P=no
+ 		  AC_DEFINE([readline_echoing_p], [_rl_echoing_p],
+ 			    [readline-6.0 started to use different name.])])
+-  LIBS="$save_LIBS"
+   AC_MSG_RESULT([$READLINE_ECHOING_P])
++  AC_MSG_CHECKING([for _rl_caught_signal])
++  AC_LINK_IFELSE(AC_LANG_PROGRAM(,[[extern int volatile _rl_caught_signal;
++				    return _rl_caught_signal;]]),
++		 [READLINE_CAUGHT_SIGNAL=yes
++		  AC_DEFINE([HAVE_READLINE_CAUGHT_SIGNAL],,
++			    [readline-6.0 workaround of blocked signals.])],
++		 [READLINE_CAUGHT_SIGNAL=no])
++  AC_MSG_RESULT([$READLINE_CAUGHT_SIGNAL])
++  LIBS="$save_LIBS"
+ else
+   READLINE='$(READLINE_DIR)/libreadline.a'
+   READLINE_DEPS='$(READLINE)'
+Index: gdb-7.2.50.20110107/gdb/event-loop.c
+===================================================================
+--- gdb-7.2.50.20110107.orig/gdb/event-loop.c	2011-01-05 23:22:48.000000000 +0100
++++ gdb-7.2.50.20110107/gdb/event-loop.c	2011-01-17 15:37:23.000000000 +0100
+@@ -37,6 +37,7 @@
+ #include "exceptions.h"
+ #include "gdb_assert.h"
+ #include "gdb_select.h"
++#include "readline/readline.h"
+ 
+ /* Tell create_file_handler what events we are interested in.
+    This is used by the select version of the event loop.  */
+@@ -419,6 +420,9 @@ gdb_do_one_event (void *data)
+   static int event_source_head = 0;
+   const int number_of_sources = 3;
+   int current = 0;
++#ifdef HAVE_READLINE_CAUGHT_SIGNAL
++  extern int volatile _rl_caught_signal;
++#endif
+ 
+   /* Any events already waiting in the queue?  */
+   if (process_event ())
+@@ -463,6 +467,29 @@ gdb_do_one_event (void *data)
+   if (gdb_wait_for_event (1) < 0)
+     return -1;
+ 
++#ifdef HAVE_READLINE_CAUGHT_SIGNAL
++  if (async_command_editing_p && RL_ISSTATE (RL_STATE_CALLBACK)
++      && _rl_caught_signal)
++    {
++      char *prompt;
++
++      if (rl_prompt == NULL)
++	{
++	  /* Should not happen, defensive only.  */
++	  prompt = "";
++	}
++      else
++	{
++	  prompt = alloca (strlen (rl_prompt) + 1);
++	  strcpy (prompt, rl_prompt);
++	}
++
++      /* Call RL_CHECK_SIGNALS this way.  */
++      rl_callback_handler_remove ();
++      rl_callback_handler_install (prompt, input_handler);
++    }
++#endif
++
+   /* Handle any new events occurred while waiting.  */
+   if (process_event ())
+     return 1;
+Index: gdb-7.2.50.20110107/gdb/testsuite/gdb.gdb/selftest.exp
+===================================================================
+--- gdb-7.2.50.20110107.orig/gdb/testsuite/gdb.gdb/selftest.exp	2011-01-17 15:36:37.000000000 +0100
++++ gdb-7.2.50.20110107/gdb/testsuite/gdb.gdb/selftest.exp	2011-01-17 15:37:09.000000000 +0100
+@@ -433,6 +433,28 @@ proc test_with_self { executable } {
+ 	}
+     }
+     
++    # get a stack trace with the poll function
++    #
++    # This fails on some linux systems for unknown reasons.  On the
++    # systems where it fails, sometimes it works fine when run manually.
++    # The testsuite failures may not be limited to just aout systems.
++    setup_xfail "i*86-pc-linuxaout-gnu"
++    set description "backtrace through signal handler"
++    gdb_test_multiple "backtrace" "$description" {
++	-re "#0.*(read|poll).*in main \\(.*\\) at .*gdb\\.c.*$gdb_prompt $" {
++	    pass "$description"
++	}
++	-re ".*$gdb_prompt $" {
++	    # On the alpha, we hit the infamous problem about gdb
++	    # being unable to get the frame pointer (mentioned in
++	    # gdb/README).  As it is intermittent, there is no way to
++	    # XFAIL it which will give us an XPASS if the problem goes
++	    # away.
++	    setup_xfail "alpha*-*-osf*"
++	    fail "$description"
++	}
++    }
++
+     set description "send SIGINT signal to child process"
+     gdb_test "signal SIGINT" \
+ 	"Continuing with signal SIGINT.*" \
+@@ -443,10 +465,11 @@ proc test_with_self { executable } {
+     # This fails on some linux systems for unknown reasons.  On the
+     # systems where it fails, sometimes it works fine when run manually.
+     # The testsuite failures may not be limited to just aout systems.
++    # Optional system readline may not have symbols to be shown.
+     setup_xfail "i*86-pc-linuxaout-gnu"
+-    set description "backtrace through signal handler"
++    set description "backtrace through readline handler"
+     gdb_test_multiple "backtrace" "$description" {
+-	-re "#0.*(read|poll).*in main \\(.*\\) at .*gdb\\.c.*$gdb_prompt $" {
++	-re "#0.*gdb_do_one_event.*in main \\(.*\\) at .*gdb\\.c.*$gdb_prompt $" {
+ 	    pass "$description"
+ 	}
+ 	-re ".*$gdb_prompt $" {
+Index: gdb-7.2.50.20110107/gdb/configure
+===================================================================
+--- gdb-7.2.50.20110107.orig/gdb/configure	2011-01-17 15:36:42.000000000 +0100
++++ gdb-7.2.50.20110107/gdb/configure	2011-01-17 15:37:09.000000000 +0100
+@@ -10237,10 +10237,10 @@ if test "$with_system_readline" = yes; t
+   # readline-6.0 started to use the name `_rl_echoing_p'.
+   # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
+ 
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
+-$as_echo_n "checking for readline_echoing_p... " >&6; }
+   save_LIBS=$LIBS
+   LIBS="$LIBS $READLINE"
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
++$as_echo_n "checking for readline_echoing_p... " >&6; }
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+@@ -10263,9 +10263,35 @@ $as_echo "#define readline_echoing_p _rl
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+-  LIBS="$save_LIBS"
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
+ $as_echo "$READLINE_ECHOING_P" >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _rl_caught_signal" >&5
++$as_echo_n "checking for _rl_caught_signal... " >&6; }
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++extern int volatile _rl_caught_signal;
++				    return _rl_caught_signal;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  READLINE_CAUGHT_SIGNAL=yes
++
++$as_echo "#define HAVE_READLINE_CAUGHT_SIGNAL /**/" >>confdefs.h
++
++else
++  READLINE_CAUGHT_SIGNAL=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_CAUGHT_SIGNAL" >&5
++$as_echo "$READLINE_CAUGHT_SIGNAL" >&6; }
++  LIBS="$save_LIBS"
+ else
+   READLINE='$(READLINE_DIR)/libreadline.a'
+   READLINE_DEPS='$(READLINE)'
diff --git a/gdb-test-pp-hint-error.patch b/gdb-test-pp-hint-error.patch
index de7bdbf..f727eca 100644
--- a/gdb-test-pp-hint-error.patch
+++ b/gdb-test-pp-hint-error.patch
@@ -27,10 +27,10 @@ gdb/testsuite/
 	* gdb.python/py-prettyprint.py (class pp_hint_error): New.
 	(register_pretty_printers): Register it.
 
-Index: gdb-7.2.50.20110107/gdb/testsuite/gdb.python/py-prettyprint.c
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.c
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/testsuite/gdb.python/py-prettyprint.c	2011-01-01 16:33:49.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/testsuite/gdb.python/py-prettyprint.c	2011-01-07 09:11:18.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/testsuite/gdb.python/py-prettyprint.c	2011-01-01 16:33:49.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.c	2011-01-17 16:08:16.000000000 +0100
 @@ -44,6 +44,10 @@ struct lazystring {
    const char *lazy_str;
  };
@@ -50,10 +50,10 @@ Index: gdb-7.2.50.20110107/gdb/testsuite/gdb.python/py-prettyprint.c
  
    nstype.elements = narray;
    nstype.len = 0;
-Index: gdb-7.2.50.20110107/gdb/testsuite/gdb.python/py-prettyprint.exp
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.exp
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/testsuite/gdb.python/py-prettyprint.exp	2011-01-07 09:03:38.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/testsuite/gdb.python/py-prettyprint.exp	2011-01-07 09:11:32.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/testsuite/gdb.python/py-prettyprint.exp	2011-01-01 16:33:49.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.exp	2011-01-17 16:08:33.000000000 +0100
 @@ -97,6 +97,8 @@ proc run_lang_tests {lang} {
      gdb_test_no_output "python pp_ls_encoding = 'UTF-8'"
      gdb_test "print estring2" "\"embedded \", <incomplete sequence \\\\302>"
@@ -62,11 +62,11 @@ Index: gdb-7.2.50.20110107/gdb/testsuite/gdb.python/py-prettyprint.exp
 +
      gdb_test "print c" " = container \"container\" with 2 elements = {$nl *.0. = 23,$nl *.1. = 72$nl}"
  
-     gdb_test "print nullstr" "RuntimeError: Error reading string from inferior.*"
-Index: gdb-7.2.50.20110107/gdb/testsuite/gdb.python/py-prettyprint.py
+     gdb_test "print nstype" " = {$nl *.0. = 7,$nl *.1. = 42$nl}"
+Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.py
 ===================================================================
---- gdb-7.2.50.20110107.orig/gdb/testsuite/gdb.python/py-prettyprint.py	2011-01-01 16:33:49.000000000 +0100
-+++ gdb-7.2.50.20110107/gdb/testsuite/gdb.python/py-prettyprint.py	2011-01-07 09:11:18.000000000 +0100
+--- gdb-7.2.50.20110117.orig/gdb/testsuite/gdb.python/py-prettyprint.py	2011-01-01 16:33:49.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.py	2011-01-17 16:08:16.000000000 +0100
 @@ -156,6 +156,18 @@ class pp_ls:
      def display_hint (self):
          return 'string'
diff --git a/gdb.spec b/gdb.spec
index dfa1e0d..cf1b026 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -23,11 +23,11 @@ Name: gdb%{?_with_debug:-debug}
 # 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: 7.2.50.20110107
+Version: 7.2.50.20110117
 
 # 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: 10%{?_with_upstream:.upstream}%{dist}
+Release: 11%{?_with_upstream:.upstream}%{dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
 Group: Development/Debuggers
@@ -418,6 +418,9 @@ Patch381: gdb-simultaneous-step-resume-breakpoint-test.patch
 #=push+work: It should be in glibc: libc-alpha: <20091004161706.GA27450 at .*>
 Patch382: gdb-core-open-vdso-warning.patch
 
+# Fix callback-mode readline-6.0 regression for CTRL-C (for RHEL-6.0).
+Patch390: gdb-readline-6.0-signal.patch
+
 # Fix syscall restarts for amd64->i386 biarch.
 #=push
 Patch391: gdb-x86_64-i386-syscall-restart.patch
@@ -783,8 +786,14 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
 %patch547 -p1
 %patch548 -p1
 
+%patch390 -p1
 %patch393 -p1
 %patch335 -p1
+readline="$(readlink -f %{_libdir}/libreadline.so)"
+if [ "$readline" = "${readline%/libreadline.so.6.0}" ]
+then
+%patch390 -p1 -R
+fi
 %if 0%{!?el5:1}
 %patch393 -p1 -R
 %patch335 -p1 -R
@@ -1178,6 +1187,11 @@ fi
 %endif
 
 %changelog
+* Mon Jan 17 2011 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.2.50.20110117-11.fc15
+- Rebase to FSF GDB 7.2.50.20110117 (which is a 7.3 pre-release).
+- Fix callback-mode readline-6.0 regression for CTRL-C (for RHEL-6.0).
+  - Fix occasional NULL dereference of the readline-6.0 workaround (BZ 575516).
+
 * Sat Jan 15 2011 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.2.50.20110107-10.fc15
 - [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
 - [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
diff --git a/sources b/sources
index 8832fe9..766cdf8 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-a409209e95cd717274431b2eaa77dac0  gdb-7.2.50.20110107.tar.bz2
 04e5c4b1b9e633422cc48990fe61958d  libstdc++-v3-python-r155978.tar.bz2
+3cecba20b0efd51e5acb937f3abd2014  gdb-7.2.50.20110117.tar.bz2


More information about the scm-commits mailing list