rpms/gdb/F-12 gdb-bz533176-fortran-omp-step.patch, NONE, 1.1 gdb-6.3-rh-testversion-20041202.patch, 1.3, 1.4 gdb-6.8-inlining-addon.patch, 1.9, 1.10 gdb-archer.patch, 1.38, 1.39 gdb-bz538626-bp_location-accel-bp-cond.patch, 1.1, 1.2 gdb.spec, 1.400, 1.401

Jan Kratochvil jkratoch at fedoraproject.org
Mon Dec 14 18:54:51 UTC 2009


Author: jkratoch

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

Modified Files:
	gdb-6.3-rh-testversion-20041202.patch 
	gdb-6.8-inlining-addon.patch gdb-archer.patch 
	gdb-bz538626-bp_location-accel-bp-cond.patch gdb.spec 
Added Files:
	gdb-bz533176-fortran-omp-step.patch 
Log Message:
* Mon Dec 14 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.0-10.fc12
- Make gdb-6.3-rh-testversion-20041202.patch to accept both RHEL and Fedora GDB.
- Adjust BuildRequires for Fedora-12, RHEL-6 and RHEL-5 builds.
- [vla] Fix compatibility of dynamic arrays with iFort (BZ 514287).
- Fix stepping through OMP parallel Fortran sections (BZ 533176).
- New fix of bp conditionals [bp_location-accel] regression (BZ 538626).


gdb-bz533176-fortran-omp-step.patch:
 infrun.c                           |    7 +++++++
 testsuite/gdb.fortran/omp-step.exp |   31 +++++++++++++++++++++++++++++++
 testsuite/gdb.fortran/omp-step.f90 |   32 ++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+)

--- NEW FILE gdb-bz533176-fortran-omp-step.patch ---
https://bugzilla.redhat.com/show_bug.cgi?id=533176#c4

I find it a bug in DWARF and gdb behaves correctly according to it.  From the
current DWARF's point of view the is a function call which you skip by "next".

If you hide any /usr/lib/debug such as using:
gdb -nx -ex 'set debug-file-directory /qwe' -ex 'file ./tpcommon_gfortran44'
and use "step" command instead of "next" there it will work.
(You need to hide debuginfo from libgomp as you would step into libgomp sources
to maintain the threads for execution.)

There should be some DWARF extension for it, currently tried to detect
substring ".omp_fn." as this function is called "MAIN__.omp_fn.0" and do not
consider such sub-function as a skippable by "next".

Another problem is that with "set scheduler-locking" being "off" (default
upstream) or "step" (default in F/RHEL) the simultaneous execution of the
threads is inconvenient.  Setting it to "on" will lockup the debugging as the
threads need to get synchronized at some point.  This is a more general
debugging problem of GOMP outside of the scope of this Bug.



--- ./gdb/infrun.c	2009-12-09 22:03:33.000000000 +0100
+++ ./gdb/infrun.c	2009-12-09 22:29:56.000000000 +0100
@@ -3994,6 +3994,12 @@ infrun: not switching back to stepped th
 
       if (ecs->event_thread->step_over_calls == STEP_OVER_ALL)
 	{
+	  struct symbol *stop_fn = find_pc_function (stop_pc);
+
+	  if (stop_fn == NULL
+	      || strstr (SYMBOL_LINKAGE_NAME (stop_fn), ".omp_fn.") == NULL)
+{	/* ".omp_fn." */
+
 	  /* We're doing a "next".
 
 	     Normal (forward) execution: set a breakpoint at the
@@ -4020,6 +4026,7 @@ infrun: not switching back to stepped th
 
 	  keep_going (ecs);
 	  return;
+}	/* ".omp_fn." */
 	}
 
       /* If we are in a function call trampoline (a stub between the
--- ./gdb/testsuite/gdb.fortran/omp-step.exp	1970-01-01 01:00:00.000000000 +0100
+++ ./gdb/testsuite/gdb.fortran/omp-step.exp	2009-12-09 22:31:04.000000000 +0100
@@ -0,0 +1,31 @@
+# Copyright 2009 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set testfile "omp-step"
+set srcfile ${testfile}.f90
+if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77 additional_flags=-fopenmp}] } {
+    return -1
+}
+
+if ![runto [gdb_get_line_number "start-here"]] {
+    perror "Couldn't run to start-here"
+    return 0
+}
+
+gdb_test "next" {!\$omp parallel} "step closer"
+gdb_test "next" {a\(omp_get_thread_num\(\) \+ 1\) = 1} "step into omp"
+
+gdb_breakpoint [gdb_get_line_number "success"]
+gdb_continue_to_breakpoint "success" ".*success.*"
--- ./gdb/testsuite/gdb.fortran/omp-step.f90	1970-01-01 01:00:00.000000000 +0100
+++ ./gdb/testsuite/gdb.fortran/omp-step.f90	2009-12-09 22:25:35.000000000 +0100
@@ -0,0 +1,32 @@
+! Copyright 2009 Free Software Foundation, Inc.
+
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 3 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+      use omp_lib
+      integer nthreads, i, a(1000)
+      nthreads = omp_get_num_threads()
+      if (nthreads .gt. 1000) call abort
+
+      do i = 1, nthreads
+          a(i) = 0
+      end do
+      print *, "start-here"
+!$omp parallel
+      a(omp_get_thread_num() + 1) = 1
+!$omp end parallel
+      do i = 1, nthreads
+          if (a(i) .ne. 1) call abort
+      end do
+      print *, "success"
+      end

gdb-6.3-rh-testversion-20041202.patch:
 selftest.exp |    3 +++
 1 file changed, 3 insertions(+)

Index: gdb-6.3-rh-testversion-20041202.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb-6.3-rh-testversion-20041202.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- gdb-6.3-rh-testversion-20041202.patch	14 Jul 2008 09:09:04 -0000	1.3
+++ gdb-6.3-rh-testversion-20041202.patch	14 Dec 2009 18:54:50 -0000	1.4
@@ -11,8 +11,8 @@ Index: gdb-6.8/gdb/testsuite/gdb.gdb/sel
  	-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
  	    pass "printed version with cast"
  	}
-+	-re ".\[0-9\]+ = .Fedora \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
-+	    pass "printed version Fedora only"
++	-re ".\[0-9\]+ = .(Fedora|Red Hat Enterprise Linux) \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
++	    pass "printed version Fedora or Red Hat Enterprise Linux only"
 +	}
  	-re ".*$gdb_prompt $"	{ fail "printed version" }
  	timeout		{ fail "(timeout) printed version" }

gdb-6.8-inlining-addon.patch:
 breakpoint.c                        |   35 +++++++++++++---
 dwarf2read.c                        |    6 ++
 frame.c                             |    8 ++-
 gdbthread.h                         |    6 ++
 infcmd.c                            |   76 ++++++++++++++++++++++++++----------
 inline-frame.c                      |   34 +++++++++++++---
 inline-frame.h                      |    4 +
 target.c                            |    1 
 testsuite/gdb.opt/inline-bt.c       |   10 +++-
 testsuite/gdb.opt/inline-cmds.c     |   10 +++-
 testsuite/gdb.opt/inline-cmds.exp   |   28 ++++++-------
 testsuite/gdb.opt/inline-locals.c   |    9 +++-
 testsuite/gdb.opt/inline-locals.exp |    6 ++
 testsuite/gdb.opt/inline-markers.c  |    5 --
 14 files changed, 176 insertions(+), 62 deletions(-)

Index: gdb-6.8-inlining-addon.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb-6.8-inlining-addon.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- gdb-6.8-inlining-addon.patch	17 Sep 2009 12:15:41 -0000	1.9
+++ gdb-6.8-inlining-addon.patch	14 Dec 2009 18:54:50 -0000	1.10
@@ -236,19 +236,19 @@ Index: gdb-6.8.91.20090917/gdb/breakpoin
      {
        int value_is_zero = 0;
        
-@@ -3383,6 +3398,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
- 	    bs->print = 0;
- 	  }
- 	bs->commands = copy_command_lines (bs->commands);
-+
-+	/* Display the innermost inlined frame at a breakpont as it gives to
-+	   most of the available information.  */
-+	if (b->type != bp_until && b->type != bp_finish)
-+	  while (inline_skipped_frames (ptid))
-+	    step_into_inline_frame (ptid);
-       }
+@@ -3399,6 +3399,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+ 		  bs->print = 0;
+ 		}
+ 	      bs->commands = copy_command_lines (bs->commands);
++
++	      /* Display the innermost inlined frame at a breakpont as it gives to
++		 most of the available information.  */
++	      if (b->type != bp_until && b->type != bp_finish)
++		while (inline_skipped_frames (ptid))
++		  step_into_inline_frame (ptid);
+ 	    }
  
-     /* Print nothing for this entry if we dont stop or if we dont print.  */
+ 	  /* Print nothing for this entry if we dont stop or if we dont print.  */
 @@ -5572,9 +5593,9 @@ set_momentary_breakpoint (struct gdbarch
  {
    struct breakpoint *b;

gdb-archer.patch:
 Makefile.in                                              |   92 
 NEWS                                                     |    7 
 ada-lang.c                                               |   43 
 amd64-linux-nat.c                                        |   45 
 block.c                                                  |   24 
 block.h                                                  |   12 
 breakpoint.c                                             |  773 ++++--
 breakpoint.h                                             |   21 
 c-exp.y                                                  |  240 ++
 c-lang.c                                                 |    6 
 c-typeprint.c                                            |   47 
 cli/cli-cmds.c                                           |   72 
 coffread.c                                               |    3 
 config.in                                                |    8 
 config/i386/nm-i386.h                                    |  125 +
 config/i386/nm-linux64.h                                 |   54 
 config/mips/nm-irix5.h                                   |   44 
 configure                                                |   76 
 configure.ac                                             |   47 
 cp-name-parser.y                                         |    5 
 cp-namespace.c                                           |  294 +-
 cp-support.c                                             |  123 +
 cp-support.h                                             |   50 
 dbxread.c                                                |    1 
 doc/gdb.texinfo                                          |  438 +++
 doc/gdbint.texinfo                                       |   62 
 doc/observer.texi                                        |    5 
 dwarf2-frame.c                                           |    9 
 dwarf2expr.c                                             |    7 
 dwarf2expr.h                                             |    2 
 dwarf2loc.c                                              |  227 +
 dwarf2loc.h                                              |    6 
 dwarf2read.c                                             | 1761 ++++++++++-----
 elfread.c                                                |   11 
 eval.c                                                   |  209 +
 expression.h                                             |   11 
 f-exp.y                                                  |    4 
 f-lang.c                                                 |  457 ---
 f-lang.h                                                 |   45 
 f-typeprint.c                                            |   36 
 f-valprint.c                                             |  267 --
 findcmd.c                                                |  111 
 findvar.c                                                |  126 -
 frame.c                                                  |    8 
 gdbinit.in                                               |   10 
 gdbserver/linux-i386-low.c                               |  210 +
 gdbserver/linux-x86-64-low.c                             |  184 +
 gdbthread.h                                              |    7 
 gdbtypes.c                                               |  599 ++++-
 gdbtypes.h                                               |  146 +
 gnu-v3-abi.c                                             |   18 
 i386-linux-nat.c                                         |   47 
 i386-nat.c                                               |   49 
 i386-nat.h                                               |   17 
 infcall.c                                                |    8 
 infcmd.c                                                 |   34 
 inferior.h                                               |    2 
 infrun.c                                                 |  190 +
 jv-lang.c                                                |    1 
 language.h                                               |    1 
 linespec.c                                               |   73 
 linux-nat.c                                              |   88 
 linux-nat.h                                              |    6 
 m2-lang.c                                                |    1 
 machoread.c                                              |    1 
 main.c                                                   |   80 
 maint.c                                                  |    8 
 mdebugread.c                                             |    2 
 mi/mi-cmd-var.c                                          |    1 
 mi/mi-main.c                                             |    2 
 mipsread.c                                               |    1 
 objfiles.c                                               |   19 
 objfiles.h                                               |   21 
 parse.c                                                  |  154 +
 parser-defs.h                                            |   25 
 ppc-linux-nat.c                                          |   19 
 printcmd.c                                               |   90 
 python/lib/gdb/FrameIterator.py                          |   33 
 python/lib/gdb/FrameWrapper.py                           |  112 
 python/lib/gdb/__init__.py                               |   19 
 python/lib/gdb/backtrace.py                              |   42 
 python/lib/gdb/command/__init__.py                       |    1 
 python/lib/gdb/command/alias.py                          |   59 
 python/lib/gdb/command/backtrace.py                      |  106 
 python/lib/gdb/command/ignore_errors.py                  |   37 
 python/lib/gdb/command/pahole.py                         |   75 
 python/lib/gdb/command/require.py                        |   57 
 python/lib/gdb/command/save_breakpoints.py               |   65 
 python/lib/gdb/command/upto.py                           |  129 +
 python/lib/gdb/function/__init__.py                      |    1 
 python/lib/gdb/function/caller_is.py                     |   58 
 python/lib/gdb/function/in_scope.py                      |   47 
 python/py-block.c                                        |  265 ++
 python/py-breakpoint.c                                   |  665 +++++
 python/py-cmd.c                                          |   17 
 python/py-frame.c                                        |  116 
 python/py-hooks.c                                        |   50 
 python/py-inferior.c                                     |  926 +++++++
 python/py-infthread.c                                    |  285 ++
 python/py-membuf.c                                       |  268 ++
 python/py-param.c                                        |  606 +++++
 python/py-prettyprint.c                                  |   21 
 python/py-symbol.c                                       |  336 ++
 python/py-symtab.c                                       |  322 ++
 python/py-type.c                                         |  170 +
 python/py-utils.c                                        |   46 
 python/py-value.c                                        |   55 
 python/python-internal.h                                 |   69 
 python/python.c                                          |  384 +++
 python/python.h                                          |    4 
 scm-lang.c                                               |    1 
 scm-valprint.c                                           |    4 
 solib-darwin.c                                           |    1 
 solib-spu.c                                              |    7 
 solib-svr4.c                                             |    4 
 solib.c                                                  |    3 
 solist.h                                                 |    2 
 somread.c                                                |    1 
 spu-tdep.c                                               |    2 
 stabsread.c                                              |    4 
 stack.c                                                  |   38 
 symfile.c                                                |   37 
 symfile.h                                                |   12 
 symmisc.c                                                |    4 
 symtab.c                                                 |  321 +-
 symtab.h                                                 |   20 
 target.c                                                 |   20 
 target.h                                                 |   41 
 testsuite/gdb.arch/powerpc-power7.exp                    |  175 +
 testsuite/gdb.arch/powerpc-power7.s                      |  107 
 testsuite/gdb.arch/x86_64-vla-pointer-foo.S              |  457 +++
 testsuite/gdb.arch/x86_64-vla-pointer.c                  |   43 
 testsuite/gdb.arch/x86_64-vla-pointer.exp                |   66 
 testsuite/gdb.arch/x86_64-vla-typedef-foo.S              |  455 +++
 testsuite/gdb.arch/x86_64-vla-typedef.c                  |   43 
 testsuite/gdb.arch/x86_64-vla-typedef.exp                |   64 
 testsuite/gdb.base/arrayidx.c                            |    7 
 testsuite/gdb.base/arrayidx.exp                          |   10 
 testsuite/gdb.base/help.exp                              |    2 
 testsuite/gdb.base/lineno-makeup-func.c                  |   21 
 testsuite/gdb.base/lineno-makeup.c                       |   35 
 testsuite/gdb.base/lineno-makeup.exp                     |   78 
 testsuite/gdb.base/macscp.exp                            |    8 
 testsuite/gdb.base/radix.exp                             |    7 
 testsuite/gdb.base/valgrind-attach.c                     |   28 
 testsuite/gdb.base/valgrind-attach.exp                   |   94 
 testsuite/gdb.base/valgrind-attach.sh                    |   20 
 testsuite/gdb.base/vla-overflow.c                        |   30 
 testsuite/gdb.base/vla-overflow.exp                      |  108 
 testsuite/gdb.base/vla.c                                 |   55 
 testsuite/gdb.base/vla.exp                               |   62 
 testsuite/gdb.base/watchpoint-hw.c                       |    6 
 testsuite/gdb.base/watchpoint-hw.exp                     |   45 
 testsuite/gdb.cp/Makefile.in                             |    2 
 testsuite/gdb.cp/cp-relocate.exp                         |    6 
 testsuite/gdb.cp/cplusfuncs.cc                           |   10 
 testsuite/gdb.cp/cplusfuncs.exp                          |  225 +
 testsuite/gdb.cp/expand-sals.exp                         |    2 
 testsuite/gdb.cp/gdb9593.cc                              |  180 +
 testsuite/gdb.cp/gdb9593.exp                             |  185 +
 testsuite/gdb.cp/member-ptr.cc                           |   17 
 testsuite/gdb.cp/member-ptr.exp                          |   34 
 testsuite/gdb.cp/namespace-multiple-imports.cc           |   20 
 testsuite/gdb.cp/namespace-multiple-imports.exp          |   49 
 testsuite/gdb.cp/namespace-nested-imports.cc             |   36 
 testsuite/gdb.cp/namespace-nested-imports.exp            |   57 
 testsuite/gdb.cp/namespace-no-imports.cc                 |   37 
 testsuite/gdb.cp/namespace-no-imports.exp                |   76 
 testsuite/gdb.cp/namespace-recursive.cc                  |   47 
 testsuite/gdb.cp/namespace-recursive.exp                 |   75 
 testsuite/gdb.cp/namespace-stress-declarations.cc        |   93 
 testsuite/gdb.cp/namespace-stress-declarations.exp       |   50 
 testsuite/gdb.cp/namespace-stress.cc                     |   60 
 testsuite/gdb.cp/namespace-stress.exp                    |   50 
 testsuite/gdb.cp/namespace-using.cc                      |  128 -
 testsuite/gdb.cp/namespace-using.exp                     |  132 +
 testsuite/gdb.cp/namespace.exp                           |   23 
 testsuite/gdb.cp/overload.exp                            |    8 
 testsuite/gdb.cp/ovldbreak.exp                           |   46 
 testsuite/gdb.cp/shadowing.cc                            |   48 
 testsuite/gdb.cp/shadowing.exp                           |   91 
 testsuite/gdb.dwarf2/dw2-aranges.S                       |  140 +
 testsuite/gdb.dwarf2/dw2-aranges.exp                     |   40 
 testsuite/gdb.dwarf2/dw2-stripped.c                      |   42 
 testsuite/gdb.dwarf2/dw2-stripped.exp                    |   79 
 testsuite/gdb.dwarf2/dw2-struct-member-data-location.S   |   83 
 testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp |   37 
 testsuite/gdb.fortran/common-block.exp                   |  101 
 testsuite/gdb.fortran/common-block.f90                   |   67 
 testsuite/gdb.fortran/dwarf-stride.exp                   |   42 
 testsuite/gdb.fortran/dwarf-stride.f90                   |   40 
 testsuite/gdb.fortran/dynamic.exp                        |  145 +
 testsuite/gdb.fortran/dynamic.f90                        |   98 
 testsuite/gdb.fortran/library-module-lib.f90             |   28 
 testsuite/gdb.fortran/library-module-main.f90            |   23 
 testsuite/gdb.fortran/library-module.exp                 |   53 
 testsuite/gdb.fortran/logical.exp                        |   44 
 testsuite/gdb.fortran/logical.f90                        |   33 
 testsuite/gdb.fortran/module.exp                         |   28 
 testsuite/gdb.fortran/module.f90                         |   37 
 testsuite/gdb.fortran/string.exp                         |   59 
 testsuite/gdb.fortran/string.f90                         |   37 
 testsuite/gdb.gdb/selftest.exp                           |    4 
 testsuite/gdb.java/jnpe.exp                              |   77 
 testsuite/gdb.java/jnpe.java                             |   38 
 testsuite/gdb.opt/array-from-register-func.c             |   22 
 testsuite/gdb.opt/array-from-register.c                  |   28 
 testsuite/gdb.opt/array-from-register.exp                |   33 
 testsuite/gdb.opt/fortran-string.exp                     |   41 
 testsuite/gdb.opt/fortran-string.f90                     |   28 
 testsuite/gdb.python/py-cmd.exp                          |   27 
 testsuite/gdb.python/py-frame.exp                        |   48 
 testsuite/gdb.python/py-function.exp                     |   27 
 testsuite/gdb.python/py-inferior.c                       |   49 
 testsuite/gdb.python/py-inferior.exp                     |  201 +
 testsuite/gdb.python/py-infthread.c                      |   14 
 testsuite/gdb.python/py-infthread.exp                    |   58 
 testsuite/gdb.python/py-prettyprint.exp                  |   22 
 testsuite/gdb.python/py-template.exp                     |   25 
 testsuite/gdb.python/py-value.exp                        |   31 
 testsuite/gdb.python/python.exp                          |   27 
 testsuite/gdb.threads/watchpoint-fork-forkoff.c          |  175 +
 testsuite/gdb.threads/watchpoint-fork-mt.c               |  157 +
 testsuite/gdb.threads/watchpoint-fork.c                  |   57 
 testsuite/gdb.threads/watchpoint-fork.exp                |  130 +
 testsuite/gdb.threads/watchthreads-reorder.c             |  366 +++
 testsuite/gdb.threads/watchthreads-reorder.exp           |  105 
 testsuite/lib/cp-support.exp                             |    3 
 testsuite/lib/gdb.exp                                    |    1 
 testsuite/lib/python-support.exp                         |   53 
 thread.c                                                 |   18 
 top.c                                                    |    1 
 typeprint.c                                              |   14 
 typeprint.h                                              |    3 
 ui-file.c                                                |   20 
 ui-file.h                                                |    6 
 utils.c                                                  |    7 
 valarith.c                                               |   45 
 valops.c                                                 |  258 +-
 valprint.c                                               |    4 
 value.c                                                  |  150 +
 value.h                                                  |    8 
 varobj.c                                                 |   76 
 xcoffread.c                                              |    1 
 244 files changed, 19173 insertions(+), 2450 deletions(-)

Index: gdb-archer.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb-archer.patch,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -p -r1.38 -r1.39
--- gdb-archer.patch	7 Dec 2009 18:39:26 -0000	1.38
+++ gdb-archer.patch	14 Dec 2009 18:54:50 -0000	1.39
@@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectAr
 http://sourceware.org/gdb/wiki/ArcherBranchManagement
 
 GIT snapshot:
-commit 16276c1aad1366b92e687c72cab30192280e1906
+commit 200516d5be8a1cab02f0b18d607d1c1fb9cfa3e7
 
 branch `archer' - the merge of branches:
 archer-tromey-call-frame-cfa
@@ -7626,7 +7626,7 @@ index 6e79d4a..198bae3 100644
    default_symfile_offsets,	/* sym_offsets:  Translate ext. to int. relocation */
    elf_symfile_segments,		/* sym_segments: Get segment information from
 diff --git a/gdb/eval.c b/gdb/eval.c
-index 2926465..4c6de78 100644
+index 2926465..b53f895 100644
 --- a/gdb/eval.c
 +++ b/gdb/eval.c
 @@ -39,8 +39,12 @@
@@ -7767,17 +7767,23 @@ index 2926465..4c6de78 100644
  	}
        else if (op == OP_VAR_VALUE)
  	{
-@@ -1549,7 +1601,10 @@ evaluate_subexp_standard (struct type *expect_type,
+@@ -1549,6 +1601,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);
 +      old_chain = make_cleanup (null_cleanup, 0);
 +      object_address_set (value_raw_address (arg1));
        type = check_typedef (value_type (arg1));
-+      do_cleanups (old_chain);
        code = TYPE_CODE (type);
  
-       if (code == TYPE_CODE_PTR)
+@@ -1569,6 +1623,7 @@ evaluate_subexp_standard (struct type *expect_type,
+ 	      code = TYPE_CODE (type);
+ 	    }
+ 	} 
++      do_cleanups (old_chain);
+ 
+       switch (code)
+ 	{
 @@ -1716,6 +1771,37 @@ evaluate_subexp_standard (struct type *expect_type,
  	  error (_("non-pointer-to-member value used in pointer-to-member construct"));
  	}
@@ -7858,7 +7864,10 @@ index 2926465..4c6de78 100644
 -	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 - 1] * offset_item + subscript_array[i - 1];
 +	for (i = ndimensions - 1; i >= 0; --i)
 +	  {
 +	    offset_item *= array_size_array[i];
@@ -7867,10 +7876,7 @@ index 2926465..4c6de78 100644
 +	    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;
  
@@ -7885,7 +7891,74 @@ index 2926465..4c6de78 100644
        }
  
      case BINOP_LOGICAL_AND:
-@@ -2598,7 +2705,7 @@ evaluate_subexp_for_address (struct expression *exp, int *pos,
+@@ -2291,14 +2398,22 @@ 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);
++      old_chain = make_cleanup (null_cleanup, 0);
++      object_address_set (value_raw_address (arg1));
+       type = check_typedef (value_type (arg1));
+       if (TYPE_CODE (type) == TYPE_CODE_METHODPTR
+ 	  || TYPE_CODE (type) == TYPE_CODE_MEMBERPTR)
+ 	error (_("Attempt to dereference pointer to member without an object"));
+       if (noside == EVAL_SKIP)
+-	goto nosideret;
++	{
++	  do_cleanups (old_chain);
++	  goto nosideret;
++	}
+       if (unop_user_defined_p (op, arg1))
+-	return value_x_unop (arg1, op, noside);
++	{
++	  do_cleanups (old_chain);
++	  return value_x_unop (arg1, op, noside);
++	}
+       else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ 	{
+ 	  type = check_typedef (value_type (arg1));
+@@ -2307,12 +2422,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
+ 	    )
+-	    return value_zero (TYPE_TARGET_TYPE (type),
+-			       lval_memory);
++	    {
++	      do_cleanups (old_chain);
++	      return value_zero (TYPE_TARGET_TYPE (type),
++				 lval_memory);
++	    }
+ 	  else if (TYPE_CODE (type) == TYPE_CODE_INT)
+-	    /* GDB allows dereferencing an int.  */
+-	    return value_zero (builtin_type (exp->gdbarch)->builtin_int,
+-			       lval_memory);
++	    {
++	      do_cleanups (old_chain);
++	      /* GDB allows dereferencing an int.  */
++	      return value_zero (builtin_type (exp->gdbarch)->builtin_int,
++				 lval_memory);
++	    }
+ 	  else
+ 	    error (_("Attempt to take contents of a non-pointer value."));
+ 	}
+@@ -2322,9 +2443,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)
+-	return value_at_lazy (builtin_type (exp->gdbarch)->builtin_int,
+-			      (CORE_ADDR) value_as_address (arg1));
+-      return value_ind (arg1);
++	{
++	  do_cleanups (old_chain);
++	  return value_at_lazy (builtin_type (exp->gdbarch)->builtin_int,
++				(CORE_ADDR) value_as_address (arg1));
++	}
++      arg1 = value_ind (arg1);
++      do_cleanups (old_chain);
++      return arg1;
+ 
+     case UNOP_ADDR:
+       /* C++: check for and handle pointer to members.  */
+@@ -2598,7 +2724,7 @@ evaluate_subexp_for_address (struct expression *exp, int *pos,
        (*pos) += 5 + BYTES_TO_EXP_ELEM (tem + 1);
        x = value_aggregate_elt (exp->elts[pc + 1].type,
  			       &exp->elts[pc + 3].string,
@@ -7894,7 +7967,7 @@ index 2926465..4c6de78 100644
        if (x == NULL)
  	error (_("There is no field named %s"), &exp->elts[pc + 3].string);
        return x;
-@@ -2643,7 +2750,7 @@ evaluate_subexp_with_coercion (struct expression *exp,
+@@ -2643,7 +2769,7 @@ evaluate_subexp_with_coercion (struct expression *exp,
  {
    enum exp_opcode op;
    int pc;
@@ -7903,7 +7976,7 @@ index 2926465..4c6de78 100644
    struct symbol *var;
    struct type *type;
  
-@@ -2654,12 +2761,17 @@ evaluate_subexp_with_coercion (struct expression *exp,
+@@ -2654,12 +2780,17 @@ evaluate_subexp_with_coercion (struct expression *exp,
      {
      case OP_VAR_VALUE:
        var = exp->elts[pc + 2].symbol;
@@ -7922,7 +7995,7 @@ index 2926465..4c6de78 100644
  	  return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)),
  			     val);
  	}
-@@ -2711,9 +2823,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos)
+@@ -2711,9 +2842,13 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos)
  
      case OP_VAR_VALUE:
        (*pos) += 4;
@@ -20541,6 +20614,590 @@ index 0000000..98b2e79
 +	.long	0xedc07834	/* 194: frsqrtes f14,f15          */
 +	.long	0xedc07835	/* 198: frsqrtes. f14,f15         */
 +	.long	0x7c43271e	/* 19c: isel    r2,r3,r4,28       */
+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
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
+@@ -0,0 +1,457 @@
++	.file	"x86_64-vla-pointer.c"
++	.section	.debug_abbrev,"", at progbits
++.Ldebug_abbrev0:
++	.section	.debug_info,"", at progbits
++.Ldebug_info0:
++	.section	.debug_line,"", at progbits
++.Ldebug_line0:
++	.text
++.Ltext0:
++.globl foo
++	.type	foo, @function
++foo:
++.LFB2:
++	.file 1 "x86_64-vla-pointer.c"
++	.loc 1 22 0
++	pushq	%rbp
++.LCFI0:
++	movq	%rsp, %rbp
++.LCFI1:
++	subq	$64, %rsp
++.LCFI2:
++	movl	%edi, -36(%rbp)
++	.loc 1 22 0
++	movq	%rsp, %rax
++	movq	%rax, -48(%rbp)
++	.loc 1 23 0
++	movl	-36(%rbp), %edx
++	movslq	%edx,%rax
++	subq	$1, %rax
++	movq	%rax, -24(%rbp)
++	.loc 1 24 0
++	movslq	%edx,%rax
++	addq	$15, %rax
++	addq	$15, %rax
++	shrq	$4, %rax
++	salq	$4, %rax
++	subq	%rax, %rsp
++	movq	%rsp, -56(%rbp)
++	movq	-56(%rbp), %rax
++	addq	$15, %rax
++	shrq	$4, %rax
++	salq	$4, %rax
++	movq	%rax, -56(%rbp)
++	movq	-56(%rbp), %rax
++	movq	%rax, -16(%rbp)
++	.loc 1 27 0
++	movl	$0, -4(%rbp)
++	jmp	.L2
++.L3:
++	.loc 1 28 0
++	movl	-4(%rbp), %esi
++	movl	-4(%rbp), %eax
++	movl	%eax, %ecx
++	movq	-16(%rbp), %rdx
++	movslq	%esi,%rax
++	movb	%cl, (%rdx,%rax)
++	.loc 1 27 0
++	addl	$1, -4(%rbp)
++.L2:
++	movl	-4(%rbp), %eax
++	cmpl	-36(%rbp), %eax
++	jl	.L3
++	.loc 1 30 0
++	.globl	break_here
++break_here:
++	movq	-16(%rbp), %rax
++	movb	$0, (%rax)
++	movq	-48(%rbp), %rsp
++	.loc 1 31 0
++	leave
++	ret
++.LFE2:
++	.size	foo, .-foo
++	.section	.debug_frame,"", at progbits
++.Lframe0:
++	.long	.LECIE0-.LSCIE0
++.LSCIE0:
++	.long	0xffffffff
++	.byte	0x1
++	.string	""
++	.uleb128 0x1
++	.sleb128 -8
++	.byte	0x10
++	.byte	0xc
++	.uleb128 0x7
++	.uleb128 0x8
++	.byte	0x90
++	.uleb128 0x1
++	.align 8
++.LECIE0:
++.LSFDE0:
++	.long	.LEFDE0-.LASFDE0
++.LASFDE0:
++	.long	.Lframe0
++	.quad	.LFB2
++	.quad	.LFE2-.LFB2
++	.byte	0x4
++	.long	.LCFI0-.LFB2
++	.byte	0xe
++	.uleb128 0x10
++	.byte	0x86
++	.uleb128 0x2
++	.byte	0x4
++	.long	.LCFI1-.LCFI0
++	.byte	0xd
++	.uleb128 0x6
++	.align 8
++.LEFDE0:
++	.section	.eh_frame,"a", at progbits
++.Lframe1:
++	.long	.LECIE1-.LSCIE1
++.LSCIE1:
++	.long	0x0
++	.byte	0x1
++	.string	"zR"
++	.uleb128 0x1
++	.sleb128 -8
++	.byte	0x10
++	.uleb128 0x1
++	.byte	0x3
++	.byte	0xc
++	.uleb128 0x7
++	.uleb128 0x8
++	.byte	0x90
++	.uleb128 0x1
++	.align 8
++.LECIE1:
++.LSFDE1:
++	.long	.LEFDE1-.LASFDE1
++.LASFDE1:
++	.long	.LASFDE1-.Lframe1
++	.long	.LFB2
++	.long	.LFE2-.LFB2
++	.uleb128 0x0
++	.byte	0x4
++	.long	.LCFI0-.LFB2
++	.byte	0xe
++	.uleb128 0x10
++	.byte	0x86
++	.uleb128 0x2
++	.byte	0x4
++	.long	.LCFI1-.LCFI0
++	.byte	0xd
++	.uleb128 0x6
++	.align 8
++.LEFDE1:
++	.text
++.Letext0:
++	.section	.debug_loc,"", at progbits
++.Ldebug_loc0:
++.LLST0:
++	.quad	.LFB2-.Ltext0
++	.quad	.LCFI0-.Ltext0
++	.value	0x2
++	.byte	0x77
++	.sleb128 8
++	.quad	.LCFI0-.Ltext0
++	.quad	.LCFI1-.Ltext0
++	.value	0x2
++	.byte	0x77
++	.sleb128 16
++	.quad	.LCFI1-.Ltext0
++	.quad	.LFE2-.Ltext0
++	.value	0x2
++	.byte	0x76
++	.sleb128 16
++	.quad	0x0
++	.quad	0x0
++	.section	.debug_info
++.Ldebug_relative:
++	.long	.Ldebug_end - .Ldebug_start
++.Ldebug_start:
++	.value	0x2
++	.long	.Ldebug_abbrev0
++	.byte	0x8
++	.uleb128 0x1
++	.long	.LASF2
++	.byte	0x1
++	.long	.LASF3
++	.long	.LASF4
++	.quad	.Ltext0
++	.quad	.Letext0
++	.long	.Ldebug_line0
++	.uleb128 0x2
++	.byte	0x1
++	.string	"foo"
++	.byte	0x1
++	.byte	0x16
++	.byte	0x1
++	.quad	.LFB2
++	.quad	.LFE2
++	.long	.LLST0
++	.long	.Ltype_int - .Ldebug_relative
++	.uleb128 0x3
++	.long	.LASF5
++	.byte	0x1
++	.byte	0x15
++	.long	.Ltype_int - .Ldebug_relative
++	.byte	0x2
++	.byte	0x91
++	.sleb128 -52
++.Ltag_pointer:
++	.uleb128 0x4
++	.byte	0x8	/* DW_AT_byte_size */
++	.long	.Ltag_array_type - .debug_info	/* DW_AT_type */
++	.uleb128 0x5	/* Abbrev Number: 5 (DW_TAG_variable) */
++	.long	.LASF0
++	.byte	0x1
++	.byte	0x18
++#if 1
++	.long	.Ltag_pointer - .debug_info
++#else
++	/* Debugging only: Skip the typedef indirection.  */
++	.long	.Ltag_array_type - .debug_info
++#endif
++	/* DW_AT_location: DW_FORM_block1: start */
++	.byte	0x3
++	.byte	0x91
++	.sleb128 -32
++#if 0
++	.byte	0x6	/* DW_OP_deref */
++#else
++	.byte	0x96	/* DW_OP_nop */
++#endif
++	/* DW_AT_location: DW_FORM_block1: end */
++	.uleb128 0x6
++	.string	"i"
++	.byte	0x1
++	.byte	0x19
++	.long	.Ltype_int - .Ldebug_relative
++	.byte	0x2
++	.byte	0x91
++	.sleb128 -20
++	.byte	0x0
++.Ltype_int:
++	.uleb128 0x7
++	.byte	0x4
++	.byte	0x5
++	.string	"int"
++.Ltag_array_type:
++	.uleb128 0x8	/* Abbrev Number: 8 (DW_TAG_array_type) */
++	.long	.Ltype_char - .Ldebug_relative
++	.long	.Ltype_ulong - .Ldebug_relative	/* DW_AT_sibling: DW_FORM_ref4 */
++1:	/* DW_AT_data_location: DW_FORM_block1: start */
++	.byte	2f - 3f	/* length */
++3:
++	.byte	0x97	/* DW_OP_push_object_address */
++#if 1
++	.byte	0x6	/* DW_OP_deref */
++#else
++	.byte	0x96	/* DW_OP_nop */
++#endif
++2:	/* DW_AT_data_location: DW_FORM_block1: end */
++	.uleb128 0x9
++	.long	.Ltype_char - .Ldebug_relative	/* DW_AT_type: DW_FORM_ref4 */
++	.byte	0x3
++	.byte	0x91
++	.sleb128 -40
++	.byte	0x6
++	.byte	0x0
++.Ltype_ulong:
++	.uleb128 0xa
++	.byte	0x8
++	.byte	0x7
++.Ltype_char:
++	.uleb128 0xb
++	.byte	0x1
++	.byte	0x6
++	.long	.LASF1
++	.byte	0x0
++.Ldebug_end:
++	.section	.debug_abbrev
++	.uleb128 0x1
++	.uleb128 0x11
++	.byte	0x1
++	.uleb128 0x25
++	.uleb128 0xe
++	.uleb128 0x13
++	.uleb128 0xb
++	.uleb128 0x3
++	.uleb128 0xe
++	.uleb128 0x1b
++	.uleb128 0xe
++	.uleb128 0x11
++	.uleb128 0x1
++	.uleb128 0x12
++	.uleb128 0x1
++	.uleb128 0x10
++	.uleb128 0x6
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x2
++	.uleb128 0x2e
++	.byte	0x1
++	.uleb128 0x3f
++	.uleb128 0xc
++	.uleb128 0x3
++	.uleb128 0x8
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x27
++	.uleb128 0xc
++	.uleb128 0x11
++	.uleb128 0x1
++	.uleb128 0x12
++	.uleb128 0x1
++	.uleb128 0x40
++	.uleb128 0x6
++	.uleb128 0x1
++	.uleb128 0x13
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0x5
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0xe
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.uleb128 0x2
++	.uleb128 0xa
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x4	/* .Ltag_pointer abbrev */
++	.uleb128 0x0f	/* DW_TAG_pointer_type */
++	.byte	0x0
++	.uleb128 0x0b
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x5
++	.uleb128 0x34
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0xe
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.uleb128 0x2
++	.uleb128 0xa
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x6
++	.uleb128 0x34
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0x8
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.uleb128 0x2
++	.uleb128 0xa
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x7
++	.uleb128 0x24
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0xb
++	.uleb128 0x3e
++	.uleb128 0xb
++	.uleb128 0x3
++	.uleb128 0x8
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x8	/* Abbrev Number: 8 (DW_TAG_array_type) */
++	.uleb128 0x1
++	.byte	0x1
++	.uleb128 0x49	/* DW_AT_type */
++	.uleb128 0x13	/* DW_FORM_ref4 */
++	.uleb128 0x1	/* DW_AT_sibling */
++	.uleb128 0x13	/* DW_FORM_ref4 */
++	.uleb128 0x50	/* DW_AT_data_location */
++	.uleb128 0xa	/* DW_FORM_block1 */
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x9
++	.uleb128 0x21
++	.byte	0x0
++	.uleb128 0x49	/* DW_AT_type */
++	.uleb128 0x13	/* DW_FORM_ref4 */
++	.uleb128 0x2f
++	.uleb128 0xa
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0xa
++	.uleb128 0x24
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0xb
++	.uleb128 0x3e
++	.uleb128 0xb
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0x24
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0xb
++	.uleb128 0x3e
++	.uleb128 0xb
++	.uleb128 0x3
++	.uleb128 0xe
++	.byte	0x0
++	.byte	0x0
++	.byte	0x0
++	.section	.debug_pubnames,"", at progbits
++	.long	0x16
++	.value	0x2
++	.long	.Ldebug_info0
++	.long	0xa8
++	.long	0x2d
++	.string	"foo"
++	.long	0x0
++	.section	.debug_aranges,"", at progbits
++	.long	0x2c
++	.value	0x2
++	.long	.Ldebug_info0
++	.byte	0x8
++	.byte	0x0
++	.value	0x0
++	.value	0x0
++	.quad	.Ltext0
++	.quad	.Letext0-.Ltext0
++	.quad	0x0
++	.quad	0x0
++	.section	.debug_str,"MS", at progbits,1
++.LASF0:
++	.string	"array"
++.LASF5:
++	.string	"size"
++.LASF3:
++	.string	"x86_64-vla-pointer.c"
++.LASF6:
++	.string	"array_t"
++.LASF1:
++	.string	"char"
++.LASF4:
++	.string	"gdb.arch"
++.LASF2:
++	.string	"GNU C 4.3.2 20081105 (Red Hat 4.3.2-7)"
++	.ident	"GCC: (GNU) 4.3.2 20081105 (Red Hat 4.3.2-7)"
++	.section	.note.GNU-stack,"", at progbits
+diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
+new file mode 100644
+index 0000000..fe2c8f7
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
+@@ -0,0 +1,43 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2009 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
++
++#if 0
++
++void
++foo (int size)
++{
++  typedef char array_t[size];
++  array_t array;
++  int i;
++
++  for (i = 0; i < size; i++)
++    array[i] = i;
++
++  array[0] = 0;	/* break-here */
++}
++
++#else
++
++int
++main (void)
++{
++  foo (26);
++  foo (78);
++  return 0;
++}
++
++#endif
+diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
+new file mode 100644
+index 0000000..d243cf1
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
+@@ -0,0 +1,66 @@
++# Copyright 2009 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++if ![istarget "x86_64-*-*"] then {
++    verbose "Skipping over gdb.arch/x86_64-vla-pointer.exp test made only for x86_64."
++    return
++}
++
++set testfile x86_64-vla-pointer
++set srcasmfile ${testfile}-foo.S
++set srcfile ${testfile}.c
++set binfile ${objdir}/${subdir}/${testfile}
++set binobjfile ${objdir}/${subdir}/${testfile}-foo.o
++if  { [gdb_compile "${srcdir}/${subdir}/${srcasmfile}" "${binobjfile}" object {}] != "" } {
++    untested "Couldn't compile test program"
++    return -1
++}
++if  { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${binobjfile}" "${binfile}" executable {debug}] != "" } {
++    untested "Couldn't compile test program"
++    return -1
++}
++
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++gdb_load ${binfile}
++
++if ![runto_main] {
++    untested x86_64-vla-pointer
++    return -1
++}
++
++gdb_breakpoint "break_here"
++
++gdb_continue_to_breakpoint "break_here"
++
++gdb_test "whatis array" "type = char \\(\\*\\)\\\[variable\\\]" "first: whatis array"
++gdb_test "ptype array" "type = char \\(\\*\\)\\\[26\\\]" "first: ptype array"
++
++gdb_test "whatis *array" "type = char \\\[26\\\]" "first: whatis *array"
++gdb_test "ptype *array" "type = char \\\[26\\\]" "first: ptype *array"
++
++gdb_test "p (*array)\[1\]" "\\$\[0-9\] = 1 '\\\\001'"
++gdb_test "p (*array)\[2\]" "\\$\[0-9\] = 2 '\\\\002'"
++gdb_test "p (*array)\[3\]" "\\$\[0-9\] = 3 '\\\\003'"
++gdb_test "p (*array)\[4\]" "\\$\[0-9\] = 4 '\\\\004'"
++
++gdb_continue_to_breakpoint "break_here"
++
++gdb_test "whatis array" "type = char \\(\\*\\)\\\[variable\\\]" "second: whatis array"
++gdb_test "ptype array" "type = char \\(\\*\\)\\\[78\\\]" "second: ptype array"
++
++gdb_test "whatis *array" "type = char \\\[78\\\]" "second: whatis *array"
++gdb_test "ptype *array" "type = char \\\[78\\\]" "second: ptype *array"
 diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S b/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
 new file mode 100644
 index 0000000..66f7a39

gdb-bz538626-bp_location-accel-bp-cond.patch:
 breakpoint.c                     |  158 +++++++++++++++++++--------------------
 testsuite/gdb.base/condbreak.exp |   43 ++++++++++
 2 files changed, 121 insertions(+), 80 deletions(-)

Index: gdb-bz538626-bp_location-accel-bp-cond.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb-bz538626-bp_location-accel-bp-cond.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- gdb-bz538626-bp_location-accel-bp-cond.patch	25 Nov 2009 10:38:24 -0000	1.1
+++ gdb-bz538626-bp_location-accel-bp-cond.patch	14 Dec 2009 18:54:51 -0000	1.2
@@ -1,89 +1,264 @@
-Index: gdb-7.0/gdb/breakpoint.c
-===================================================================
---- gdb-7.0.orig/gdb/breakpoint.c	2009-11-25 10:24:49.000000000 +0100
-+++ gdb-7.0/gdb/breakpoint.c	2009-11-25 10:28:35.000000000 +0100
-@@ -337,14 +337,21 @@ static int executing_startup;
- 	     B ? (TMP=B->next, 1): 0;	\
- 	     B = TMP)
- 
--/* Similar iterator for the low-level breakpoints.  SAFE variant is not
--   provided so update_global_location_list must not be called while executing
--   the block of ALL_BP_LOCATIONS.  */
--
--#define ALL_BP_LOCATIONS(B,BP_TMP)					\
--	for (BP_TMP = bp_location;					\
--	     BP_TMP < bp_location + bp_location_count && (B = *BP_TMP);	\
--	     BP_TMP++)
-+/* Similar iterator for the low-level breakpoints.  This iterator
-+   requires a defined BP_LOCATION array and BP_LOCATION_COUNT.  */
-+
-+#define ALL_BP_LOCATIONS_FROM(B,BP_TMP,BP_LOCATION,BP_LOCATION_COUNT)	\
-+  for (BP_TMP = BP_LOCATION;						\
-+       BP_TMP < BP_LOCATION + BP_LOCATION_COUNT && (B = *BP_TMP);	\
-+       BP_TMP++)
-+
-+/* Iterator that calls ALL_BP_LOCATIONS_FROM with the global
-+   bp_locations and bp_location_count variables.  SAFE variant is not
-+   provided so update_global_location_list must not be called while
-+   executing the block of ALL_BP_LOCATIONS.  */
-+
-+#define ALL_BP_LOCATIONS(B,BP_TMP) \
-+  ALL_BP_LOCATIONS_FROM(B,BP_TMP,bp_location, bp_location_count)
- 
- /* Iterator for tracepoints only.  */
- 
-@@ -3313,6 +3320,7 @@ bpstat_check_breakpoint_conditions (bpst
- bpstat
- bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid)
- {
-+  struct cleanup *old_chain;
-   struct breakpoint *b = NULL;
-   struct bp_location *bl, **blp_tmp;
-   struct bp_location *loc;
-@@ -3322,8 +3330,14 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+http://sourceware.org/ml/gdb-patches/2009-12/msg00180.html
+Subject: [patch] Fix a regression by me on breakpoint-cond-infcall
+
+Hi,
+
+GDB has now a regression since:
+	Re: [patch] Performance optimize large bp_location count
+	http://sourceware.org/ml/gdb-patches/2009-10/msg00632.html
+	=
+	2009-10-25  Jan Kratochvil  <jan.kratochvil at redhat.com>
+	Performance optimize large bp_location count.
+
+on breakpoints with conditions calling inferior.
+
+Bringing the code back to the state before my acceleration patch.
+
+The code before already assumed no breakpoints or their bp_locations can
+change across the inferior call which should be true - trying to do some:
+	break a if b()
+	break b
+	command 1
+	delete 2
+	end
+or similar cannot work as inside "if b()" evaluation no breakpoints can be
+added or removed.
+
+update_global_location_list also does not removed/add `struct bp_location's
+themselves but only pointers to them in the bp_location array.  As the new
+iteration no longer uses the bp_location array it is no longer a problem.
+
+Original problem was found by and fixed differently by Phil Muldoon.
+
+No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
+
+
+Thanks,
+Jan
+
+
+gdb/
+2009-12-13  Jan Kratochvil  <jan.kratochvil at redhat.com>
+
+	* breakpoint.c (bpstat_stop_status): Iterate using ALL_BREAKPOINTS and
+	the B->LOC list.  Remove gdb_assert on B.  Change bp_hardware_watchpoint
+	continue to break.  Remove variable update_locations.  Remove HIT_COUNT
+	increment protection by an ENABLE_STATE check.  Inline the delayed
+	update_global_location_list call.
+
+gdb/testsuite/
+2009-12-13  Jan Kratochvil  <jan.kratochvil at redhat.com>
+	    Phil Muldoon  <pmuldoon at redhat.com>
+
+	* gdb.base/condbreak.exp: Put breakpoint on marker3 and marker4.
+	(bp_location13, bp_location14, bp_location17, bp_location18)
+	(marker3_proto, marker4_proto): New variables.
+	(breakpoint info): Update output.
+	(run until breakpoint at marker3, run until breakpoint at marker4): New
+	tests.
+
+[ Backported for F-12.  ]
+
+--- ./gdb/breakpoint.c	2009-12-14 00:25:55.000000000 +0100
++++ ./gdb/breakpoint.c	2009-12-14 00:32:32.000000000 +0100
+@@ -3298,93 +3298,93 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+   /* Pointer to the last thing in the chain currently.  */
    bpstat bs = root_bs;
    int ix;
-   int need_remove_insert, update_locations = 0;
-+  struct bp_location  **saved_bp_location; 
-+  int saved_bp_location_count = bp_location_count; 
+-  int need_remove_insert, update_locations = 0;
++  int need_remove_insert;
  
 -  ALL_BP_LOCATIONS (bl, blp_tmp)
-+  saved_bp_location = xmalloc (sizeof (*bp_location) * bp_location_count);
-+  memcpy (saved_bp_location, bp_location, sizeof (*bp_location) * bp_location_count);
-+  old_chain = make_cleanup (xfree, saved_bp_location);
-+
-+  ALL_BP_LOCATIONS_FROM (bl, blp_tmp, saved_bp_location, saved_bp_location_count)
-   {
-     bpstat bs_prev = bs;
- 
-@@ -3460,6 +3474,7 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
-       insert_breakpoints ();
-     }
+-  {
+-    bpstat bs_prev = bs;
++  /* ALL_BP_LOCATIONS iteration would break across
++     update_global_location_list possibly executed by
++     bpstat_check_breakpoint_conditions's inferior call.  */
+ 
+-    b = bl->owner;
+-    gdb_assert (b);
+-    if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
+-      continue;
+-
+-    /* For hardware watchpoints, we look only at the first location.
+-       The watchpoint_check function will work on entire expression,
+-       not the individual locations.  For read watchopints, the
+-       watchpoints_triggered function have checked all locations
+-       alrea
+-     */
+-    if (b->type == bp_hardware_watchpoint && bl != b->loc)
+-      continue;
+-
+-    if (!bpstat_check_location (bl, bp_addr))
+-      continue;
+-
+-    /* Come here if it's a watchpoint, or if the break address matches */
+-
+-    bs = bpstat_alloc (bl, bs);	/* Alloc a bpstat to explain stop */
+-    gdb_assert (bs_prev->next == bs);
+-
+-    /* Assume we stop.  Should we find watchpoint that is not actually
+-       triggered, or if condition of breakpoint is false, we'll reset
+-       'stop' to 0.  */
+-    bs->stop = 1;
+-    bs->print = 1;
++  ALL_BREAKPOINTS (b)
++    {
++      if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
++	continue;
+ 
+-    if (!bpstat_check_watchpoint (bs))
+-      {
+-	/* Ensure bpstat_explains_signal stays false if this BL could not be
+-	   the cause of this trap.  */
++      for (bl = b->loc; bl != NULL; bl = bl->next)
++	{
++	  bpstat bs_prev = bs;
++
++	  /* For hardware watchpoints, we look only at the first location.
++	     The watchpoint_check function will work on entire expression,
++	     not the individual locations.  For read watchopints, the
++	     watchpoints_triggered function have checked all locations
++	     alrea
++	   */
++	  if (b->type == bp_hardware_watchpoint && bl != b->loc)
++	    break;
+ 
+-	gdb_assert (bs->print_it == print_it_noop);
+-	gdb_assert (!bs->stop);
+-	xfree (bs);
+-	bs = bs_prev;
+-	bs->next = NULL;
+-	continue;
+-      }
++	  if (!bpstat_check_location (bl, bp_addr))
++	    continue;
+ 
+-    if (b->type == bp_thread_event || b->type == bp_overlay_event
+-	|| b->type == bp_longjmp_master || b->type == bp_exception_master)
+-      /* We do not stop for these.  */
+-      bs->stop = 0;
+-    else
+-      bpstat_check_breakpoint_conditions (bs, ptid);
+-  
+-    if (bs->stop)
+-      {
+-	if (b->enable_state != bp_disabled)
+-	  ++(b->hit_count);
++	  /* Come here if it's a watchpoint, or if the break address matches */
+ 
+-	/* We will stop here */
+-	if (b->disposition == disp_disable)
+-	  {
+-	    if (b->enable_state != bp_permanent)
+-	      b->enable_state = bp_disabled;
+-	    update_locations = 1;
+-	  }
+-	if (b->silent)
+-	  bs->print = 0;
+-	bs->commands = b->commands;
+-	if (bs->commands
+-	    && (strcmp ("silent", bs->commands->line) == 0
+-		|| (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
+-	  {
+-	    bs->commands = bs->commands->next;
+-	    bs->print = 0;
+-	  }
+-	bs->commands = copy_command_lines (bs->commands);
+-      }
++	  bs = bpstat_alloc (bl, bs);	/* Alloc a bpstat to explain stop */
++	  gdb_assert (bs_prev->next == bs);
+ 
+-    /* Print nothing for this entry if we dont stop or if we dont print.  */
+-    if (bs->stop == 0 || bs->print == 0)
+-      bs->print_it = print_it_noop;
+-  }
++	  /* Assume we stop.  Should we find watchpoint that is not actually
++	     triggered, or if condition of breakpoint is false, we'll reset
++	     'stop' to 0.  */
++	  bs->stop = 1;
++	  bs->print = 1;
+ 
+-  /* Delay this call which would break the ALL_BP_LOCATIONS iteration above.  */
+-  if (update_locations)
+-    update_global_location_list (0);
++	  if (!bpstat_check_watchpoint (bs))
++	    {
++	      /* Ensure bpstat_explains_signal stays false if this BL could not be
++		 the cause of this trap.  */
++
++	      gdb_assert (bs->print_it == print_it_noop);
++	      gdb_assert (!bs->stop);
++	      xfree (bs);
++	      bs = bs_prev;
++	      bs->next = NULL;
++	      continue;
++	    }
++
++	  if (b->type == bp_thread_event || b->type == bp_overlay_event
++	      || b->type == bp_longjmp_master || b->type == bp_exception_master)
++	    /* We do not stop for these.  */
++	    bs->stop = 0;
++	  else
++	    bpstat_check_breakpoint_conditions (bs, ptid);
++	
++	  if (bs->stop)
++	    {
++	      ++(b->hit_count);
++
++	      /* We will stop here */
++	      if (b->disposition == disp_disable)
++		{
++		  if (b->enable_state != bp_permanent)
++		    b->enable_state = bp_disabled;
++		  update_global_location_list (0);
++		}
++	      if (b->silent)
++		bs->print = 0;
++	      bs->commands = b->commands;
++	      if (bs->commands
++		  && (strcmp ("silent", bs->commands->line) == 0
++		      || (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
++		{
++		  bs->commands = bs->commands->next;
++		  bs->print = 0;
++		}
++	      bs->commands = copy_command_lines (bs->commands);
++	    }
++
++	  /* Print nothing for this entry if we dont stop or if we dont print.  */
++	  if (bs->stop == 0 || bs->print == 0)
++	    bs->print_it = print_it_noop;
++	}
++    }
  
-+  do_cleanups (old_chain);
-   return root_bs->next;
- }
- 
-Index: gdb-7.0/gdb/testsuite/gdb.base/condbreak.exp
-===================================================================
---- gdb-7.0.orig/gdb/testsuite/gdb.base/condbreak.exp	2009-01-03 06:58:03.000000000 +0100
-+++ gdb-7.0/gdb/testsuite/gdb.base/condbreak.exp	2009-11-25 10:27:50.000000000 +0100
-@@ -68,6 +68,8 @@ set bp_location1  [gdb_get_line_number "
+   for (ix = 0; VEC_iterate (bp_location_p, moribund_locations, ix, loc); ++ix)
+     {
+--- ./gdb/testsuite/gdb.base/condbreak.exp	2009-01-03 06:58:03.000000000 +0100
++++ ./gdb/testsuite/gdb.base/condbreak.exp	2009-12-14 00:27:21.000000000 +0100
+@@ -68,8 +68,12 @@ set bp_location1  [gdb_get_line_number "
  set bp_location6  [gdb_get_line_number "set breakpoint 6 here"]
  set bp_location8  [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
  set bp_location9  [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
-+set bp_location13  [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
-+set bp_location14  [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
++set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
++set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
  set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1]
  set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1]
++set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1]
++set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile1]
  
-@@ -110,15 +112,23 @@ gdb_test "break marker2 if (a==43)" \
+ #
+ # test break at function
+@@ -110,15 +114,29 @@ gdb_test "break marker2 if (a==43)" \
      "Breakpoint.*at.* file .*$srcfile1, line.*"
  
  #
 +# Check break involving inferior function call.
++# Ensure there is at least one additional breakpoint with higher VMA.
 +#
-+gdb_test "break marker4 if (multi_line_if_conditional(1,1,1)==0)" \
++gdb_test "break marker3 if (multi_line_if_conditional(1,1,1)==0)" \
++    "Breakpoint.*at.* file .*$srcfile1, line.*"
++gdb_test "break marker4" \
 +    "Breakpoint.*at.* file .*$srcfile1, line.*"
 +
 +#
@@ -93,42 +268,50 @@ Index: gdb-7.0/gdb/testsuite/gdb.base/co
  if {$hp_aCC_compiler} {
      set marker1_proto "\\(void\\)"
      set marker2_proto "\\(int\\)"
++    # Not checked.
++    set marker3_proto "\\(char \\*, char \\*\\)"
 +    set marker4_proto "\\(long\\)"
  } else {
      set marker1_proto ""
      set marker2_proto ""
++    set marker3_proto ""
 +    set marker4_proto ""
  }
  
  gdb_test "info break" \
-@@ -129,7 +139,9 @@ gdb_test "info break" \
+@@ -129,7 +147,10 @@ gdb_test "info break" \
  \[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*$srcfile:$bp_location1.*
  \[\t \]+stop only if \\(1==1\\).*
  \[0-9\]+\[\t \]+breakpoint     keep y.* in marker2$marker2_proto at .*$srcfile1:($bp_location8|$bp_location9).*
 -\[\t \]+stop only if \\(a==43\\).*" \
 +\[\t \]+stop only if \\(a==43\\).*
-+\[0-9\]+\[\t \]+breakpoint     keep y.* in marker4$marker4_proto at .*$srcfile1:($bp_location13|$bp_location14).*
-+\[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).*" \
++\[0-9\]+\[\t \]+breakpoint     keep y.* in marker3$marker3_proto at .*$srcfile1:($bp_location17|$bp_location18).*
++\[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).*
++\[0-9\]+\[\t \]+breakpoint     keep y.* in marker4$marker4_proto at .*$srcfile1:($bp_location13|$bp_location14).*" \
      "breakpoint info"
  
  
-@@ -220,3 +232,19 @@ gdb_expect {
+@@ -220,3 +241,23 @@ gdb_expect {
  	fail "(timeout) run until breakpoint at marker2"
      }
  }
 +
-+send_gdb "continue\n"
-+gdb_expect {
-+    -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*" {
-+	pass "run until breakpoint at marker4"
++set test "run until breakpoint at marker3"
++gdb_test_multiple "continue" $test {
++    -re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
++	pass $test
 +    }
-+    -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*" {
-+	xfail "run until breakpoint at marker4"
++    -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
++	xfail $test
 +    }
-+    -re "$gdb_prompt $" {
-+	fail "run until breakpoint at marker4"
++}
++
++set test "run until breakpoint at marker4"
++gdb_test_multiple "continue" $test {
++    -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
++	pass $test
 +    }
-+    timeout {
-+	fail "(timeout) run until breakpoint at marker4"
++    -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
++	xfail $test
 +    }
 +}


Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-12/gdb.spec,v
retrieving revision 1.400
retrieving revision 1.401
diff -u -p -r1.400 -r1.401
--- gdb.spec	7 Dec 2009 18:39:26 -0000	1.400
+++ gdb.spec	14 Dec 2009 18:54:51 -0000	1.401
@@ -4,6 +4,18 @@
 # --with upstream: No Fedora specific patches get applied.
 # --without python: No python support.
 
+# RHEL-5 was the last not providing `/etc/rpm/macros.dist'.
+%if 0%{!?dist:1}
+%define rhel 5
+%define dist .el5
+%define el5 1
+%define gnat_version 4.1
+%define gcj_version 7rh
+%else
+%define gnat_version 4.4
+%define gcj_version 10
+%endif
+
 Summary: A GNU source-level debugger for C, C++, Java and other languages
 Name: gdb%{?_with_debug:-debug}
 
@@ -14,7 +26,7 @@ Version: 7.0
 
 # 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: 9%{?_with_upstream:.upstream}%{?dist}
+Release: 10%{?_with_upstream:.upstream}%{dist}
 
 License: GPLv3+
 Group: Development/Debuggers
@@ -372,7 +384,7 @@ Patch385: gdb-bz528668-symfile-multi.pat
 # Support GNU IFUNCs - indirect functions (BZ 539590).
 Patch387: gdb-bz539590-gnu-ifunc.patch
 
-# Fix bp conditionals [bp_location-accel] regression (Phil Muldoon, BZ 538626).
+# Fix bp conditionals [bp_location-accel] regression (BZ 538626).
 Patch388: gdb-bz538626-bp_location-accel-bp-cond.patch
 
 # Fix callback-mode readline-6.0 regression for CTRL-C.
@@ -381,6 +393,9 @@ Patch390: gdb-readline-6.0-signal.patch
 # Fix syscall restarts for amd64->i386 biarch.
 Patch391: gdb-x86_64-i386-syscall-restart.patch
 
+# Fix stepping with OMP parallel Fortran sections (BZ 533176).
+Patch392: gdb-bz533176-fortran-omp-step.patch
+
 BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
 Requires: readline
 BuildRequires: readline-devel
@@ -400,25 +415,34 @@ BuildRequires: libstdc++
 BuildRequires: sharutils dejagnu
 # gcc-objc++ is not covered by the GDB testsuite.
 BuildRequires: gcc gcc-c++ gcc-gfortran gcc-java gcc-objc glibc-static
+# Prelink is broken on sparcv9/sparc64
+%ifnarch sparcv9 sparc64
+BuildRequires: prelink
+%endif
 %if 0%{!?rhel:1}
 BuildRequires: fpc
 %endif
+%if 0%{?el5:1}
+BuildRequires: gcc44 gcc44-gfortran
+%endif
 # Ensure the devel libraries are installed for both multilib arches.
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
 # Copied from gcc-4.1.2-32
 %ifarch %{ix86} x86_64 ia64 ppc alpha
 BuildRequires: gcc-gnat
 %ifarch %{multilib_64_archs} ppc
-BuildRequires: %{_exec_prefix}/lib64/libgnat-4.4.so %{_exec_prefix}/lib/libgnat-4.4.so
+BuildRequires: %{_exec_prefix}/lib64/libgnat-%{gnat_version}.so %{_exec_prefix}/lib/libgnat-%{gnat_version}.so
 %endif
 %endif
 %ifarch %{multilib_64_archs} sparc sparcv9 ppc
 BuildRequires: /lib/libc.so.6 %{_exec_prefix}/lib/libc.so /lib64/libc.so.6 %{_exec_prefix}/lib64/libc.so
 BuildRequires: /lib/libgcc_s.so.1 /lib64/libgcc_s.so.1
 BuildRequires: %{_exec_prefix}/lib/libstdc++.so.6 %{_exec_prefix}/lib64/libstdc++.so.6
-BuildRequires: %{_exec_prefix}/lib64/libgcj.so.10 %{_exec_prefix}/lib/libgcj.so.10
+BuildRequires: %{_exec_prefix}/lib64/libgcj.so.%{gcj_version} %{_exec_prefix}/lib/libgcj.so.%{gcj_version}
 # multilib glibc-static is open Bug 488472:
-#BuildRequires: %{_exec_prefix}/lib64/libc.a %{_exec_prefix}/lib/libc.a
+%if 0%{?el5:1}
+BuildRequires: %{_exec_prefix}/lib64/libc.a %{_exec_prefix}/lib/libc.a
+%endif
 # for gcc-java:
 BuildRequires: %{_exec_prefix}/lib64/libz.so %{_exec_prefix}/lib/libz.so
 %endif
@@ -427,11 +451,6 @@ BuildRequires: %{_exec_prefix}/lib64/lib
 %ifarch ia64
 BuildRequires: libunwind-devel >= 0.99-0.1.frysk20070405cvs
 Requires: libunwind >= 0.99-0.1.frysk20070405cvs
-%else
-# Prelink is broken on sparcv9/sparc64
-%ifnarch sparcv9 sparc64
-BuildRequires: prelink
-%endif
 %endif
 
 Requires(post): /sbin/install-info
@@ -479,6 +498,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc
 %patch383 -p1
 %patch384 -p1
 %patch385 -p1
+%patch388 -p1
 %patch124 -p1
 %patch1 -p1
 %patch3 -p1
@@ -582,10 +602,10 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc
 %patch381 -p1
 %patch382 -p1
 %patch387 -p1
-%patch388 -p1
 %patch389 -p1
 %patch390 -p1
 %patch391 -p1
+%patch392 -p1
 
 find -name "*.orig" | xargs rm -f
 ! find -name "*.rej"	# Should not happen.
@@ -594,6 +614,8 @@ find -name "*.orig" | xargs rm -f
 
 # Change the version that gets printed at GDB startup, so it is Fedora
 # specific.
+# Fedora (%{version}-%{release})
+# Red Hat Enterprise Linux (%{version}-%{release})
 cat > gdb/version.in << _FOO
 Fedora (%{version}-%{release})
 _FOO
@@ -659,9 +681,8 @@ CFLAGS="$CFLAGS -O0 -ggdb2"
 	--without-python				\
 %endif
 $(: Workaround rpm.org#76, BZ 508193 on recent OSes. )	\
-$(: RHEL-5 was the last not providing %{dist}. )	\
 $(: RHEL-5 librpm has incompatible API. )		\
-%if 0%{!?dist:1}
+%if 0%{?el5:1}
 	--without-rpm					\
 %else
 	--with-rpm=librpm.so.0				\
@@ -890,6 +911,13 @@ fi
 %endif
 
 %changelog
+* Mon Dec 14 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.0-10.fc12
+- Make gdb-6.3-rh-testversion-20041202.patch to accept both RHEL and Fedora GDB.
+- Adjust BuildRequires for Fedora-12, RHEL-6 and RHEL-5 builds.
+- [vla] Fix compatibility of dynamic arrays with iFort (BZ 514287).
+- Fix stepping through OMP parallel Fortran sections (BZ 533176).
+- New fix of bp conditionals [bp_location-accel] regression (BZ 538626).
+
 * Mon Dec  7 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.0-9.fc12
 - Replace the PIE (Position Indepdent Executable) support patch by a new one.
 - Drop gdb-6.3-nonthreaded-wp-20050117.patch as fuzzy + redundant.




More information about the scm-commits mailing list