rpms/gdb/F-9 gdb-6.8-bz377541-vla-bound-undefined.patch, NONE, 1.1 gdb-6.8-bz377541-vla-loc-kind.patch, NONE, 1.1 gdb-6.8-bz377541-vla.patch, NONE, 1.1 gdb-6.8-watchpoint-conditionals-test.patch, NONE, 1.1 gdb-6.8-upstream.patch, 1.7, 1.8 gdb.spec, 1.297, 1.298 gdb-6.5-bz196439-valgrind-memcheck-compat-test.patch, 1.1, NONE gdb-6.8-bz377541-fortran-dynamic-arrays.patch, 1.2, NONE

Jan Kratochvil jkratoch at fedoraproject.org
Sun Nov 9 14:03:53 UTC 2008


Author: jkratoch

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

Modified Files:
	gdb-6.8-upstream.patch gdb.spec 
Added Files:
	gdb-6.8-bz377541-vla-bound-undefined.patch 
	gdb-6.8-bz377541-vla-loc-kind.patch gdb-6.8-bz377541-vla.patch 
	gdb-6.8-watchpoint-conditionals-test.patch 
Removed Files:
	gdb-6.5-bz196439-valgrind-memcheck-compat-test.patch 
	gdb-6.8-bz377541-fortran-dynamic-arrays.patch 
Log Message:
* Sun Nov  9 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8-23
- Fix the variable-length-arrays support (BZ 468266, feature BZ 377541).
- Fix the watchpoints conditionals.
- Fix on PPC spurious SIGTRAPs on active watchpoints.


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

--- NEW FILE gdb-6.8-bz377541-vla-bound-undefined.patch ---
http://sourceware.org/ml/gdb-cvs/2008-10/msg00019.html

gdb/
2008-10-02  Jan Kratochvil  <jan.kratochvil at redhat.com>

	Replace TYPE_ARRAY_{UPPER,LOWER}_BOUND_TYPE by a bit if {un,}defined.
	* c-typeprint.c (c_type_print_varspec_suffix), m2-typeprint.c
	(m2_array), p-typeprint.c (pascal_type_print_varspec_prefix),
	valops.c (value_cast), varobj.c (c_number_of_children): Replace
	TYPE_ARRAY_UPPER_BOUND_TYPE compared to BOUND_CANNOT_BE_DETERMINED by
	TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	* parse.c (follow_types): Use TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	* f-valprint.c (f77_get_dynamic_upperbound): Replace with ...
	(f77_get_upperbound): ... this function handling now only
	TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	(f77_get_dynamic_lowerbound): Replace with ...
	(f77_get_lowerbound): ... this function handling now only
	TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED.
	(f77_get_dynamic_length_of_aggregate, f77_create_arrayprint_offset_tbl):
	Update their callers.
	* eval.c (evaluate_subexp_standard): Update their callers.
	* f-lang.h (f77_get_dynamic_upperbound, f77_get_upperbound)
	(f77_get_dynamic_lowerbound, f77_get_lowerbound): Update their
	prototypes.
	(BOUND_FETCH_OK, BOUND_FETCH_ERROR): Remove.
	* f-typeprint.c (f_type_print_varspec_suffix, f_type_print_base): Remove
	the lower_bound_was_default variable.  Update the
	f77_get_dynamic_upperbound, f77_get_upperbound and
	TYPE_ARRAY_UPPER_BOUND_TYPE calls.
	* gdbtypes.c (print_bound_type): Remove the function.
	(recursive_dump_type): Remove its calls printing UPPER_BOUND_TYPE and
	LOWER_BOUND_TYPE.
	* gdbtypes.h (enum array_bound_type): Remove.
	(struct main_type): Remove the fields upper_bound_type and
	lower_bound_type.  Comment the new overload of the field artificial.
	(TYPE_ARRAY_UPPER_BOUND_TYPE): Replace by ...
	(TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED): ... this macro.
	(TYPE_ARRAY_LOWER_BOUND_TYPE): Replace by ...
	(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): ... this macro.

gdb/testsuite/
2008-10-02  Jan Kratochvil  <jan.kratochvil at redhat.com>

	* gdb.base/maint.exp (maint print type): Remove printing
	UPPER_BOUND_TYPE and LOWER_BOUND_TYPE.

[ Ported to gdb-6.8fedora.  ]

--- ./gdb/c-typeprint.c	2008-01-01 23:53:09.000000000 +0100
+++ ./gdb/c-typeprint.c	2008-10-29 10:55:07.000000000 +0100
@@ -542,7 +542,7 @@ c_type_print_varspec_suffix (struct type
 
       fprintf_filtered (stream, "[");
       if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
-	&& TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
+	&& !TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
 	fprintf_filtered (stream, "%d",
 			  (TYPE_LENGTH (type)
 			   / TYPE_LENGTH (TYPE_TARGET_TYPE (type))));
--- ./gdb/eval.c	2008-10-29 10:50:23.000000000 +0100
+++ ./gdb/eval.c	2008-10-29 10:55:07.000000000 +0100
@@ -1674,13 +1674,8 @@ evaluate_subexp_standard (struct type *e
 	/* Internal type of array is arranged right to left */
 	for (i = 0; i < nargs; i++)
 	  {
-	    retcode = f77_get_dynamic_upperbound (tmp_type, &upper);
-	    if (retcode == BOUND_FETCH_ERROR)
-	      error (_("Cannot obtain dynamic upper bound"));
-
-	    retcode = f77_get_dynamic_lowerbound (tmp_type, &lower);
-	    if (retcode == BOUND_FETCH_ERROR)
-	      error (_("Cannot obtain dynamic lower bound"));
+	    upper = f77_get_upperbound (tmp_type);
+	    lower = f77_get_lowerbound (tmp_type);
 
 	    array_size_array[nargs - i - 1] = upper - lower + 1;
 
--- ./gdb/f-lang.h	2008-10-29 10:50:23.000000000 +0100
+++ ./gdb/f-lang.h	2008-10-29 10:55:07.000000000 +0100
@@ -83,9 +83,6 @@ extern SAVED_F77_COMMON_PTR find_common_
 #define BLANK_COMMON_NAME_MF77     "__BLNK__"	/* MF77 assigned  */
 #define BLANK_COMMON_NAME_LOCAL    "__BLANK"	/* Local GDB */
 
-#define BOUND_FETCH_OK 1
-#define BOUND_FETCH_ERROR -999
-
 /* When reasonable array bounds cannot be fetched, such as when 
    you ask to 'mt print symbols' and there is no stack frame and 
    therefore no way of knowing the bounds of stack-based arrays, 
@@ -97,9 +94,9 @@ extern SAVED_F77_COMMON_PTR find_common_
 extern char *real_main_name;	/* Name of main function */
 extern int real_main_c_value;	/* C_value field of main function */
 
-extern int f77_get_dynamic_upperbound (struct type *, int *);
+extern int f77_get_upperbound (struct type *);
 
-extern int f77_get_dynamic_lowerbound (struct type *, int *);
+extern int f77_get_lowerbound (struct type *);
 
 extern void f77_get_dynamic_array_length (struct type *);
 
--- ./gdb/f-typeprint.c	2008-10-29 10:50:23.000000000 +0100
+++ ./gdb/f-typeprint.c	2008-10-29 10:55:07.000000000 +0100
@@ -150,7 +150,6 @@ f_type_print_varspec_suffix (struct type
 			     int show, int passed_a_ptr, int demangled_args)
 {
   int upper_bound, lower_bound;
-  int lower_bound_was_default = 0;
   static int arrayprint_recurse_level = 0;
   int retcode;
 
@@ -173,35 +172,19 @@ f_type_print_varspec_suffix (struct type
       if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY)
 	f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
 
-      retcode = f77_get_dynamic_lowerbound (type, &lower_bound);
-
-      lower_bound_was_default = 0;
-
-      if (retcode == BOUND_FETCH_ERROR)
-	fprintf_filtered (stream, "???");
-      else if (lower_bound == 1)	/* The default */
-	lower_bound_was_default = 1;
-      else
-	fprintf_filtered (stream, "%d", lower_bound);
-
-      if (lower_bound_was_default)
-	lower_bound_was_default = 0;
-      else
-	fprintf_filtered (stream, ":");
+      lower_bound = f77_get_lowerbound (type);
+      if (lower_bound != 1)	/* Not the default.  */
+	fprintf_filtered (stream, "%d:", lower_bound);
 
       /* Make sure that, if we have an assumed size array, we
          print out a warning and print the upperbound as '*' */
 
-      if (TYPE_ARRAY_UPPER_BOUND_TYPE (type) == BOUND_CANNOT_BE_DETERMINED)
+      if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
 	fprintf_filtered (stream, "*");
       else
 	{
-	  retcode = f77_get_dynamic_upperbound (type, &upper_bound);
-
-	  if (retcode == BOUND_FETCH_ERROR)
-	    fprintf_filtered (stream, "???");
-	  else
-	    fprintf_filtered (stream, "%d", upper_bound);
+	  upper_bound = f77_get_upperbound (type);
+	  fprintf_filtered (stream, "%d", upper_bound);
 	}
 
       if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
@@ -351,16 +334,12 @@ f_type_print_base (struct type *type, st
     case TYPE_CODE_STRING:
       /* Strings may have dynamic upperbounds (lengths) like arrays. */
 
-      if (TYPE_ARRAY_UPPER_BOUND_TYPE (type) == BOUND_CANNOT_BE_DETERMINED)
+      if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
 	fprintfi_filtered (level, stream, "character*(*)");
       else
 	{
-	  retcode = f77_get_dynamic_upperbound (type, &upper_bound);
-
-	  if (retcode == BOUND_FETCH_ERROR)
-	    fprintf_filtered (stream, "character*???");
-	  else
-	    fprintf_filtered (stream, "character*%d", upper_bound);
+	  upper_bound = f77_get_upperbound (type);
+	  fprintf_filtered (stream, "character*%d", upper_bound);
 	}
       break;
 
--- ./gdb/f-valprint.c	2008-10-29 10:50:23.000000000 +0100
+++ ./gdb/f-valprint.c	2008-10-29 20:48:30.000000000 +0100
@@ -61,130 +61,28 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIM
 #define F77_DIM_OFFSET(n) (f77_array_offset_tbl[n][0])
 
 int
-f77_get_dynamic_lowerbound (struct type *type, int *lower_bound)
+f77_get_lowerbound (struct type *type)
 {
-  struct frame_info *frame;
-  CORE_ADDR current_frame_addr;
-  CORE_ADDR ptr_to_lower_bound;
-
-  switch (TYPE_ARRAY_LOWER_BOUND_TYPE (type))
-    {
-    case BOUND_BY_VALUE_ON_STACK:
-      frame = deprecated_safe_get_selected_frame ();
-      current_frame_addr = get_frame_base (frame);
-      if (current_frame_addr > 0)
-	{
-	  *lower_bound =
-	    read_memory_integer (current_frame_addr +
-				 TYPE_ARRAY_LOWER_BOUND_VALUE (type),
-				 4);
-	}
-      else
-	{
-	  *lower_bound = DEFAULT_LOWER_BOUND;
-	  return BOUND_FETCH_ERROR;
-	}
-      break;
-
-    case BOUND_SIMPLE:
-      *lower_bound = TYPE_ARRAY_LOWER_BOUND_VALUE (type);
-      break;
-
-    case BOUND_CANNOT_BE_DETERMINED:
-      error (_("Lower bound may not be '*' in F77"));
-      break;
-
-    case BOUND_BY_REF_ON_STACK:
-      frame = deprecated_safe_get_selected_frame ();
-      current_frame_addr = get_frame_base (frame);
-      if (current_frame_addr > 0)
-	{
-	  ptr_to_lower_bound =
-	    read_memory_typed_address (current_frame_addr +
-				       TYPE_ARRAY_LOWER_BOUND_VALUE (type),
-				       builtin_type_void_data_ptr);
-	  *lower_bound = read_memory_integer (ptr_to_lower_bound, 4);
-	}
-      else
-	{
-	  *lower_bound = DEFAULT_LOWER_BOUND;
-	  return BOUND_FETCH_ERROR;
-	}
-      break;
+  if (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED (type))
+    error (_("Lower bound may not be '*' in F77"));
 
-    case BOUND_BY_REF_IN_REG:
-    case BOUND_BY_VALUE_IN_REG:
-    default:
-      error (_("??? unhandled dynamic array bound type ???"));
-      break;
-    }
-  return BOUND_FETCH_OK;
+  return TYPE_ARRAY_LOWER_BOUND_VALUE (type);
 }
 
 int
-f77_get_dynamic_upperbound (struct type *type, int *upper_bound)
+f77_get_upperbound (struct type *type)
 {
-  struct frame_info *frame;
-  CORE_ADDR current_frame_addr = 0;
-  CORE_ADDR ptr_to_upper_bound;
-
-  switch (TYPE_ARRAY_UPPER_BOUND_TYPE (type))
-    {
-    case BOUND_BY_VALUE_ON_STACK:
-      frame = deprecated_safe_get_selected_frame ();
-      current_frame_addr = get_frame_base (frame);
-      if (current_frame_addr > 0)
-	{
-	  *upper_bound =
-	    read_memory_integer (current_frame_addr +
-				 TYPE_ARRAY_UPPER_BOUND_VALUE (type),
-				 4);
-	}
-      else
-	{
-	  *upper_bound = DEFAULT_UPPER_BOUND;
-	  return BOUND_FETCH_ERROR;
-	}
-      break;
-
-    case BOUND_SIMPLE:
-      *upper_bound = TYPE_ARRAY_UPPER_BOUND_VALUE (type);
-      break;
-
-    case BOUND_CANNOT_BE_DETERMINED:
-      /* we have an assumed size array on our hands. Assume that 
-         upper_bound == lower_bound so that we show at least 
-         1 element.If the user wants to see more elements, let 
-         him manually ask for 'em and we'll subscript the 
-         array and show him */
-      f77_get_dynamic_lowerbound (type, upper_bound);
-      break;
-
-    case BOUND_BY_REF_ON_STACK:
-      frame = deprecated_safe_get_selected_frame ();
-      current_frame_addr = get_frame_base (frame);
-      if (current_frame_addr > 0)
-	{
-	  ptr_to_upper_bound =
-	    read_memory_typed_address (current_frame_addr +
-				       TYPE_ARRAY_UPPER_BOUND_VALUE (type),
-				       builtin_type_void_data_ptr);
-	  *upper_bound = read_memory_integer (ptr_to_upper_bound, 4);
-	}
-      else
-	{
-	  *upper_bound = DEFAULT_UPPER_BOUND;
-	  return BOUND_FETCH_ERROR;
-	}
-      break;
+  if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
+    {
+      /* We have an assumed size array on our hands.  Assume that
+	 upper_bound == lower_bound so that we show at least 1 element.
+	 If the user wants to see more elements, let him manually ask for 'em
+	 and we'll subscript the array and show him.  */
 
-    case BOUND_BY_REF_IN_REG:
-    case BOUND_BY_VALUE_IN_REG:
-    default:
-      error (_("??? unhandled dynamic array bound type ???"));
-      break;
+      return f77_get_lowerbound (type);
     }
-  return BOUND_FETCH_OK;
+
+  return TYPE_ARRAY_UPPER_BOUND_VALUE (type);
 }
 
 /* Obtain F77 adjustable array dimensions */
@@ -210,13 +108,8 @@ f77_get_dynamic_length_of_aggregate (str
     f77_get_dynamic_length_of_aggregate (TYPE_TARGET_TYPE (type));
 
   /* Recursion ends here, start setting up lengths.  */
-  retcode = f77_get_dynamic_lowerbound (type, &lower_bound);
-  if (retcode == BOUND_FETCH_ERROR)
-    error (_("Cannot obtain valid array lower bound"));
-
-  retcode = f77_get_dynamic_upperbound (type, &upper_bound);
-  if (retcode == BOUND_FETCH_ERROR)
-    error (_("Cannot obtain valid array upper bound"));
+  lower_bound = f77_get_lowerbound (type);
+  upper_bound = f77_get_upperbound (type);
 
   /* Patch in a valid length value. */
 
@@ -239,16 +132,8 @@ f77_create_arrayprint_offset_tbl (struct
 
   while ((TYPE_CODE (tmp_type) == TYPE_CODE_ARRAY))
     {
-      if (TYPE_ARRAY_UPPER_BOUND_TYPE (tmp_type) == BOUND_CANNOT_BE_DETERMINED)
-	fprintf_filtered (stream, "<assumed size array> ");
-
-      retcode = f77_get_dynamic_upperbound (tmp_type, &upper);
-      if (retcode == BOUND_FETCH_ERROR)
-	error (_("Cannot obtain dynamic upper bound"));
-
-      retcode = f77_get_dynamic_lowerbound (tmp_type, &lower);
-      if (retcode == BOUND_FETCH_ERROR)
-	error (_("Cannot obtain dynamic lower bound"));
+      upper = f77_get_upperbound (tmp_type);
+      lower = f77_get_lowerbound (tmp_type);
 
       F77_DIM_SIZE (ndimen) = upper - lower + 1;
 
--- ./gdb/gdbtypes.c	2008-10-29 10:50:23.000000000 +0100
+++ ./gdb/gdbtypes.c	2008-10-29 10:55:07.000000000 +0100
@@ -2529,35 +2529,6 @@ print_cplus_stuff (struct type *type, in
     }
 }
 
-static void
-print_bound_type (int bt)
-{
-  switch (bt)
-    {
-    case BOUND_CANNOT_BE_DETERMINED:
-      printf_filtered ("(BOUND_CANNOT_BE_DETERMINED)");
-      break;
-    case BOUND_BY_REF_ON_STACK:
-      printf_filtered ("(BOUND_BY_REF_ON_STACK)");
-      break;
-    case BOUND_BY_VALUE_ON_STACK:
-      printf_filtered ("(BOUND_BY_VALUE_ON_STACK)");
-      break;
-    case BOUND_BY_REF_IN_REG:
-      printf_filtered ("(BOUND_BY_REF_IN_REG)");
-      break;
-    case BOUND_BY_VALUE_IN_REG:
-      printf_filtered ("(BOUND_BY_VALUE_IN_REG)");
-      break;
-    case BOUND_SIMPLE:
-      printf_filtered ("(BOUND_SIMPLE)");
-      break;
-    default:
-      printf_filtered (_("(unknown bound type)"));
-      break;
-    }
-}
-
 static struct obstack dont_print_type_obstack;
 
 void
@@ -2692,14 +2663,6 @@ recursive_dump_type (struct type *type, 
     }
   puts_filtered ("\n");
   printfi_filtered (spaces, "length %d\n", TYPE_LENGTH (type));
-  printfi_filtered (spaces, "upper_bound_type 0x%x ",
-		    TYPE_ARRAY_UPPER_BOUND_TYPE (type));
-  print_bound_type (TYPE_ARRAY_UPPER_BOUND_TYPE (type));
-  puts_filtered ("\n");
-  printfi_filtered (spaces, "lower_bound_type 0x%x ",
-		    TYPE_ARRAY_LOWER_BOUND_TYPE (type));
-  print_bound_type (TYPE_ARRAY_LOWER_BOUND_TYPE (type));
-  puts_filtered ("\n");
   printfi_filtered (spaces, "objfile ");
   gdb_print_host_address (TYPE_OBJFILE (type), gdb_stdout);
   printf_filtered ("\n");
@@ -2942,10 +2942,6 @@ copy_type_recursive (struct objfile *obj
 
   /* Copy the common fields of types.  */
   TYPE_CODE (new_type) = TYPE_CODE (type);
-  TYPE_ARRAY_UPPER_BOUND_TYPE (new_type) = 
-    TYPE_ARRAY_UPPER_BOUND_TYPE (type);
-  TYPE_ARRAY_LOWER_BOUND_TYPE (new_type) = 
-    TYPE_ARRAY_LOWER_BOUND_TYPE (type);
   if (TYPE_NAME (type))
     TYPE_NAME (new_type) = xstrdup (TYPE_NAME (type));
   if (TYPE_TAG_NAME (type))
--- ./gdb/gdbtypes.h	2008-10-29 10:50:23.000000000 +0100
+++ ./gdb/gdbtypes.h	2008-10-29 10:56:05.000000000 +0100
@@ -310,17 +310,6 @@ enum type_code
 #define TYPE_FLAG_NOTTEXT	(1 << 17)
 #define TYPE_NOTTEXT(t)		(TYPE_FLAGS (t) & TYPE_FLAG_NOTTEXT)
 
-/*  Array bound type.  */
-enum array_bound_type
-{
-  BOUND_SIMPLE = 0,
-  BOUND_BY_VALUE_IN_REG,
-  BOUND_BY_REF_IN_REG,
-  BOUND_BY_VALUE_ON_STACK,
-  BOUND_BY_REF_ON_STACK,
-  BOUND_CANNOT_BE_DETERMINED
-};
-
 /* This structure is space-critical.
    Its layout has been tweaked to reduce the space used.  */
 
@@ -330,12 +319,6 @@ struct main_type
 
   ENUM_BITFIELD(type_code) code : 8;
 
-  /* Array bounds.  These fields appear at this location because
-     they pack nicely here.  */
-
-  ENUM_BITFIELD(array_bound_type) upper_bound_type : 4;
-  ENUM_BITFIELD(array_bound_type) lower_bound_type : 4;
-
   /* Name of this type, or NULL if none.
 
      This is used for printing only, except by poorly designed C++ code.
@@ -437,7 +420,8 @@ struct main_type
 
     /* For a function or member type, this is 1 if the argument is marked
        artificial.  Artificial arguments should not be shown to the
-       user.  */
+       user.  For TYPE_CODE_RANGE it is set if the specific bound is not
+       defined.  */
     unsigned int artificial : 1;
 
     /* This flag is zero for non-static fields, 1 for fields whose location
@@ -802,10 +786,10 @@ extern void allocate_cplus_struct_type (
 
 /* Moto-specific stuff for FORTRAN arrays */
 
-#define TYPE_ARRAY_UPPER_BOUND_TYPE(thistype) \
-	TYPE_MAIN_TYPE(thistype)->upper_bound_type
-#define TYPE_ARRAY_LOWER_BOUND_TYPE(thistype) \
-	TYPE_MAIN_TYPE(thistype)->lower_bound_type
+#define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype) \
+   (TYPE_FIELD_ARTIFICIAL((TYPE_FIELD_TYPE((arraytype),0)),1))
+#define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \
+   (TYPE_FIELD_ARTIFICIAL((TYPE_FIELD_TYPE((arraytype),0)),0))
 
 #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \
    (TYPE_FIELD_BITPOS((TYPE_FIELD_TYPE((arraytype),0)),1))
--- ./gdb/m2-typeprint.c	2008-01-01 23:53:11.000000000 +0100
+++ ./gdb/m2-typeprint.c	2008-10-29 10:55:12.000000000 +0100
@@ -202,7 +202,7 @@ static void m2_array (struct type *type,
 {
   fprintf_filtered (stream, "ARRAY [");
   if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
-      && TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
+      && !TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
     {
       if (TYPE_INDEX_TYPE (type) != 0)
 	{
--- ./gdb/p-typeprint.c	2008-01-01 23:53:12.000000000 +0100
+++ ./gdb/p-typeprint.c	2008-10-29 10:55:12.000000000 +0100
@@ -251,7 +251,7 @@ pascal_type_print_varspec_prefix (struct
 	fprintf_filtered (stream, "(");
       fprintf_filtered (stream, "array ");
       if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
-	&& TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
+	&& !TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
 	fprintf_filtered (stream, "[%d..%d] ",
 			  TYPE_ARRAY_LOWER_BOUND_VALUE (type),
 			  TYPE_ARRAY_UPPER_BOUND_VALUE (type)
--- ./gdb/parse.c	2008-10-29 10:47:18.000000000 +0100
+++ ./gdb/parse.c	2008-10-29 10:55:12.000000000 +0100
@@ -1175,8 +1175,7 @@ follow_types (struct type *follow_type)
 	  create_array_type ((struct type *) NULL,
 			     follow_type, range_type);
 	if (array_size < 0)
-	  TYPE_ARRAY_UPPER_BOUND_TYPE (follow_type)
-	    = BOUND_CANNOT_BE_DETERMINED;
+	  TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (follow_type) = 1;
 	break;
       case tp_function:
 	/* FIXME-type-allocation: need a way to free this type when we are
--- ./gdb/testsuite/gdb.base/maint.exp	2008-01-28 19:06:59.000000000 +0100
+++ ./gdb/testsuite/gdb.base/maint.exp	2008-10-29 20:50:33.000000000 +0100
@@ -404,7 +404,7 @@ gdb_expect  {
 
 send_gdb "maint print type argc\n"
 gdb_expect  {
-        -re "type node $hex\r\nname .int. \\($hex\\)\r\ntagname .<NULL>. \\($hex\\)\r\ncode $hex \\(TYPE_CODE_INT\\)\r\nlength \[24\]\r\nupper_bound_type $hex \\(BOUND_SIMPLE\\)\r\nlower_bound_type $hex \\(BOUND_SIMPLE\\)\r\nobjfile $hex\r\ntarget_type $hex\r\npointer_type $hex\r\nreference_type $hex\r\ntype_chain $hex\r\ninstance_flags $hex\r\nflags $hex\r\nnfields 0 $hex\r\nvptr_basetype $hex\r\nvptr_fieldno -1\r\ntype_specific $hex\r\n$gdb_prompt $"\
+        -re "type node $hex\r\nname .int. \\($hex\\)\r\ntagname .<NULL>. \\($hex\\)\r\ncode $hex \\(TYPE_CODE_INT\\)\r\nlength \[24\]\r\nobjfile $hex\r\ntarget_type $hex\r\npointer_type $hex\r\nreference_type $hex\r\ntype_chain $hex\r\ninstance_flags $hex\r\nflags $hex\r\nnfields 0 $hex\r\nvptr_basetype $hex\r\nvptr_fieldno -1\r\ntype_specific $hex\r\n$gdb_prompt $"\
                         { pass "maint print type" }
         -re ".*$gdb_prompt $"       { fail "maint print type" }
         timeout         { fail "(timeout) maint print type" }
--- ./gdb/valops.c	2008-10-29 10:50:23.000000000 +0100
+++ ./gdb/valops.c	2008-10-29 10:55:12.000000000 +0100
@@ -291,8 +291,7 @@ value_cast (struct type *type, struct va
     {
       struct type *element_type = TYPE_TARGET_TYPE (type);
       unsigned element_length = TYPE_LENGTH (check_typedef (element_type));
-      if (element_length > 0
-	&& TYPE_ARRAY_UPPER_BOUND_TYPE (type) == BOUND_CANNOT_BE_DETERMINED)
+      if (element_length > 0 && TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
 	{
 	  struct type *range_type = TYPE_INDEX_TYPE (type);
 	  int val_length = TYPE_LENGTH (type2);
--- ./gdb/varobj.c	2008-10-29 10:47:21.000000000 +0100
+++ ./gdb/varobj.c	2008-10-29 10:55:12.000000000 +0100
@@ -1988,7 +1988,7 @@ c_number_of_children (struct varobj *var
     {
     case TYPE_CODE_ARRAY:
       if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (target) > 0
-	  && TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
+	  && !TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
 	children = TYPE_LENGTH (type) / TYPE_LENGTH (target);
       else
 	/* If we don't know how many elements there are, don't display

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

--- NEW FILE gdb-6.8-bz377541-vla-loc-kind.patch ---
http://sourceware.org/ml/gdb-cvs/2008-10/msg00099.html

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

	Convert static_kind into loc_kind enum.
	* gdbtypes.h (enum field_loc_kind): New.
	(union field_location): New field dwarf_block.
	(struct field): Rename static_kind as loc_kind.
	(FIELD_STATIC_KIND): Rename to ...
	(FIELD_LOC_KIND): ... here.
	(TYPE_FIELD_STATIC_KIND): Rename to ...
	(TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND.
	(TYPE_FIELD_STATIC_HAS_ADDR): Remove.
	(TYPE_FIELD_STATIC): Remove.
	(TYPE_FIELD_BITPOS): Reformat.
	(SET_FIELD_BITPOS): New.
	(FIELD_PHYSADDR): Rename to ...
	(FIELD_STATIC_PHYSADDR): ... here.
	(TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename.
	(SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND.
	(FIELD_PHYSNAME): Rename to ...
	(FIELD_STATIC_PHYSNAME): ... here.
	(TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename.
	(SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND.
	(FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New.
	(field_is_static): New declaration.
	* gdbtypes.c (field_is_static): New function.
	(copy_type_recursive): Update throughout.
	* amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c,
	eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c,
	p-valprint.c, valops.c, value.c, varobj.c: Update throughout.

[ Ported to gdb-6.8fedora.  ]

--- ./gdb/amd64-tdep.c	2008-10-29 10:47:21.000000000 +0100
+++ ./gdb/amd64-tdep.c	2008-10-29 20:56:57.000000000 +0100
@@ -317,7 +317,7 @@ amd64_classify_aggregate (struct type *t
 	  enum amd64_reg_class subclass[2];
 
 	  /* Ignore static fields.  */
-	  if (TYPE_FIELD_STATIC (type, i))
+	  if (field_is_static (&TYPE_FIELD (type, i)))
 	    continue;
 
 	  gdb_assert (pos == 0 || pos == 1);
--- ./gdb/c-typeprint.c	2008-10-29 10:55:07.000000000 +0100
+++ ./gdb/c-typeprint.c	2008-10-29 20:56:57.000000000 +0100
@@ -872,14 +872,12 @@ c_type_print_base (struct type *type, st
 		}
 
 	      print_spaces_filtered (level + 4, stream);
-	      if (TYPE_FIELD_STATIC (type, i))
-		{
-		  fprintf_filtered (stream, "static ");
-		}
+	      if (field_is_static (&TYPE_FIELD (type, i)))
+		fprintf_filtered (stream, "static ");
 	      c_print_type (TYPE_FIELD_TYPE (type, i),
 			    TYPE_FIELD_NAME (type, i),
 			    stream, show - 1, level + 4);
-	      if (!TYPE_FIELD_STATIC (type, i)
+	      if (!field_is_static (&TYPE_FIELD (type, i))
 		  && TYPE_FIELD_PACKED (type, i))
 		{
 		  /* It is a bitfield.  This code does not attempt
--- ./gdb/coffread.c	2008-01-16 12:21:42.000000000 +0100
+++ ./gdb/coffread.c	2008-10-29 20:58:56.000000000 +0100
@@ -1946,9 +1946,8 @@ coff_read_struct_type (int index, int le
 			  strlen (name),
 			  &current_objfile->objfile_obstack);
 	  FIELD_TYPE (list->field) = decode_type (ms, ms->c_type, &sub_aux);
-	  FIELD_BITPOS (list->field) = 8 * ms->c_value;
+	  SET_FIELD_BITPOS (list->field, 8 * ms->c_value);
 	  FIELD_BITSIZE (list->field) = 0;
-	  FIELD_STATIC_KIND (list->field) = 0;
 	  nfields++;
 	  break;
 
@@ -1965,9 +1964,8 @@ coff_read_struct_type (int index, int le
 			  strlen (name),
 			  &current_objfile->objfile_obstack);
 	  FIELD_TYPE (list->field) = decode_type (ms, ms->c_type, &sub_aux);
-	  FIELD_BITPOS (list->field) = ms->c_value;
+	  SET_FIELD_BITPOS (list->field, ms->c_value);
 	  FIELD_BITSIZE (list->field) = sub_aux.x_sym.x_misc.x_lnsz.x_size;
-	  FIELD_STATIC_KIND (list->field) = 0;
 	  nfields++;
 	  break;
 
@@ -2083,11 +2081,10 @@ coff_read_enum_type (int index, int leng
 	  struct symbol *xsym = syms->symbol[j];
 	  SYMBOL_TYPE (xsym) = type;
 	  TYPE_FIELD_NAME (type, n) = DEPRECATED_SYMBOL_NAME (xsym);
-	  TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym);
+	  SET_FIELD_BITPOS (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym));
 	  if (SYMBOL_VALUE (xsym) < 0)
 	    unsigned_enum = 0;
 	  TYPE_FIELD_BITSIZE (type, n) = 0;
-	  TYPE_FIELD_STATIC_KIND (type, n) = 0;
 	}
       if (syms == osyms)
 	break;
--- ./gdb/cp-valprint.c	2008-01-01 23:53:09.000000000 +0100
+++ ./gdb/cp-valprint.c	2008-10-29 20:56:57.000000000 +0100
@@ -192,7 +192,8 @@ cp_print_value_fields (struct type *type
       for (i = n_baseclasses; i < len; i++)
 	{
 	  /* If requested, skip printing of static fields.  */
-	  if (!static_field_print && TYPE_FIELD_STATIC (type, i))
+	  if (!static_field_print
+	      && field_is_static (&TYPE_FIELD (type, i)))
 	    continue;
 
 	  if (fields_seen)
@@ -225,7 +226,7 @@ cp_print_value_fields (struct type *type
 		fputs_filtered ("\"( ptr \"", stream);
 	      else
 		fputs_filtered ("\"( nodef \"", stream);
-	      if (TYPE_FIELD_STATIC (type, i))
+	      if (field_is_static (&TYPE_FIELD (type, i)))
 		fputs_filtered ("static ", stream);
 	      fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
 				       current_language->la_language,
@@ -240,7 +241,7 @@ cp_print_value_fields (struct type *type
 	    {
 	      annotate_field_begin (TYPE_FIELD_TYPE (type, i));
 
-	      if (TYPE_FIELD_STATIC (type, i))
+	      if (field_is_static (&TYPE_FIELD (type, i)))
 		fputs_filtered ("static ", stream);
 	      fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
 				       current_language->la_language,
@@ -252,7 +253,8 @@ cp_print_value_fields (struct type *type
 	      annotate_field_value ();
 	    }
 
-	  if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
+	  if (!field_is_static (&TYPE_FIELD (type, i))
+	      && TYPE_FIELD_PACKED (type, i))
 	    {
 	      struct value *v;
 
@@ -277,7 +279,7 @@ cp_print_value_fields (struct type *type
 		{
 		  fputs_filtered ("<optimized out or zero length>", stream);
 		}
-	      else if (TYPE_FIELD_STATIC (type, i))
+	      else if (field_is_static (&TYPE_FIELD (type, i)))
 		{
 		  struct value *v = value_static_field (type, i);
 		  if (v == NULL)
--- ./gdb/dwarf2read.c	2008-10-29 10:50:56.000000000 +0100
+++ ./gdb/dwarf2read.c	2008-10-29 20:56:57.000000000 +0100
@@ -3492,7 +3492,7 @@ dwarf2_add_field (struct field_info *fip
       /* Get type of field.  */
       fp->type = die_type (die, cu);
 
-      FIELD_STATIC_KIND (*fp) = 0;
+      SET_FIELD_BITPOS (*fp, 0);
 
       /* Get bit size of field (zero if none).  */
       attr = dwarf2_attr (die, DW_AT_bit_size, cu);
@@ -3521,10 +3521,8 @@ dwarf2_add_field (struct field_info *fip
           else
             byte_offset = decode_locdesc (DW_BLOCK (attr), cu);
 
-          FIELD_BITPOS (*fp) = byte_offset * bits_per_byte;
+          SET_FIELD_BITPOS (*fp, byte_offset * bits_per_byte);
 	}
-      else
-	FIELD_BITPOS (*fp) = 0;
       attr = dwarf2_attr (die, DW_AT_bit_offset, cu);
       if (attr)
 	{
@@ -3617,10 +3615,9 @@ dwarf2_add_field (struct field_info *fip
       /* C++ base class field.  */
       attr = dwarf2_attr (die, DW_AT_data_member_location, cu);
       if (attr)
-	FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), cu)
-			      * bits_per_byte);
+	SET_FIELD_BITPOS (*fp, decode_locdesc (DW_BLOCK (attr), cu)
+			       * bits_per_byte);
       FIELD_BITSIZE (*fp) = 0;
-      FIELD_STATIC_KIND (*fp) = 0;
       FIELD_TYPE (*fp) = die_type (die, cu);
       FIELD_NAME (*fp) = type_name_no_tag (fp->type);
       fip->nbaseclasses++;
@@ -4379,9 +4376,8 @@ process_enumeration_scope (struct die_in
 
 		  FIELD_NAME (fields[num_fields]) = DEPRECATED_SYMBOL_NAME (sym);
 		  FIELD_TYPE (fields[num_fields]) = NULL;
-		  FIELD_BITPOS (fields[num_fields]) = SYMBOL_VALUE (sym);
+		  SET_FIELD_BITPOS (fields[num_fields], SYMBOL_VALUE (sym));
 		  FIELD_BITSIZE (fields[num_fields]) = 0;
-		  FIELD_STATIC_KIND (fields[num_fields]) = 0;
 
 		  num_fields++;
 		}
--- ./gdb/eval.c	2008-10-29 10:55:07.000000000 +0100
+++ ./gdb/eval.c	2008-10-29 20:56:57.000000000 +0100
@@ -288,7 +288,8 @@ evaluate_struct_tuple (struct value *str
 		  fieldno++;
 		  /* Skip static fields.  */
 		  while (fieldno < TYPE_NFIELDS (struct_type)
-			 && TYPE_FIELD_STATIC_KIND (struct_type, fieldno))
+			 && field_is_static (&TYPE_FIELD (struct_type,
+							  fieldno)))
 		    fieldno++;
 		  subfieldno = fieldno;
 		  if (fieldno >= TYPE_NFIELDS (struct_type))
--- ./gdb/gdbtypes.c	2008-10-29 10:55:07.000000000 +0100
+++ ./gdb/gdbtypes.c	2008-10-29 20:56:57.000000000 +0100
@@ -2407,6 +2407,20 @@ print_arg_types (struct field *args, int
     }
 }
 
+int
+field_is_static (struct field *f)
+{
+  /* "static" fields are the fields whose location is not relative
+     to the address of the enclosing struct.  It would be nice to
+     have a dedicated flag that would be set for static fields when
+     the type is being created.  But in practice, checking the field
+     loc_kind should give us an accurate answer (at least as long as
+     we assume that DWARF block locations are not going to be used
+     for static fields).  FIXME?  */
+  return (FIELD_LOC_KIND (*f) == FIELD_LOC_KIND_PHYSNAME
+	  || FIELD_LOC_KIND (*f) == FIELD_LOC_KIND_PHYSADDR);
+}
+
 static void
 dump_fn_fieldlists (struct type *type, int spaces)
 {
@@ -2939,18 +2953,25 @@ copy_type_recursive (struct objfile *obj
 	  if (TYPE_FIELD_NAME (type, i))
 	    TYPE_FIELD_NAME (new_type, i) = 
 	      xstrdup (TYPE_FIELD_NAME (type, i));
-	  if (TYPE_FIELD_STATIC_HAS_ADDR (type, i))
-	    SET_FIELD_PHYSADDR (TYPE_FIELD (new_type, i),
-				TYPE_FIELD_STATIC_PHYSADDR (type, i));
-	  else if (TYPE_FIELD_STATIC (type, i))
-	    SET_FIELD_PHYSNAME (TYPE_FIELD (new_type, i),
-				xstrdup (TYPE_FIELD_STATIC_PHYSNAME (type, 
-								     i)));
-	  else
+	  switch (TYPE_FIELD_LOC_KIND (type, i))
 	    {
-	      TYPE_FIELD_BITPOS (new_type, i) = 
-		TYPE_FIELD_BITPOS (type, i);
-	      TYPE_FIELD_STATIC_KIND (new_type, i) = 0;
+	    case FIELD_LOC_KIND_BITPOS:
+	      SET_FIELD_BITPOS (TYPE_FIELD (new_type, i),
+				TYPE_FIELD_BITPOS (type, i));
+	      break;
+	    case FIELD_LOC_KIND_PHYSADDR:
+	      SET_FIELD_PHYSADDR (TYPE_FIELD (new_type, i),
+				  TYPE_FIELD_STATIC_PHYSADDR (type, i));
+	      break;
+	    case FIELD_LOC_KIND_PHYSNAME:
+	      SET_FIELD_PHYSNAME (TYPE_FIELD (new_type, i),
+				  xstrdup (TYPE_FIELD_STATIC_PHYSNAME (type,
+								       i)));
+	      break;
+	    default:
+	      internal_error (__FILE__, __LINE__,
+			      _("Unexpected type field location kind: %d"),
+			      TYPE_FIELD_LOC_KIND (type, i));
 	    }
 	}
     }
--- ./gdb/gdbtypes.h	2008-10-29 10:56:05.000000000 +0100
+++ ./gdb/gdbtypes.h	2008-10-29 20:56:57.000000000 +0100
@@ -310,6 +310,16 @@ enum type_code
 #define TYPE_FLAG_NOTTEXT	(1 << 17)
 #define TYPE_NOTTEXT(t)		(TYPE_FLAGS (t) & TYPE_FLAG_NOTTEXT)
 
+/* Determine which field of the union main_type.fields[x].loc is used.  */
+
+enum field_loc_kind
+  {
+    FIELD_LOC_KIND_BITPOS,	/* bitpos */
+    FIELD_LOC_KIND_PHYSADDR,	/* physaddr */
+    FIELD_LOC_KIND_PHYSNAME,	/* physname */
+    FIELD_LOC_KIND_DWARF_BLOCK	/* dwarf_block */
+  };
+
 /* This structure is space-critical.
    Its layout has been tweaked to reduce the space used.  */
 
@@ -415,6 +425,12 @@ struct main_type
 
       CORE_ADDR physaddr;
       char *physname;
+
+      /* The field location can be computed by evaluating the following DWARF
+	 block.  This can be used in Fortran variable-length arrays, for
+	 instance.  */
+
+      struct dwarf2_locexpr_baton *dwarf_block;
     }
     loc;
 
@@ -424,11 +440,8 @@ struct main_type
        defined.  */
     unsigned int artificial : 1;
 
-    /* This flag is zero for non-static fields, 1 for fields whose location
-       is specified by the label loc.physname, and 2 for fields whose location
-       is specified by loc.physaddr.  */
-
-    unsigned int static_kind : 2;
+    /* Discriminant for union field_location.  */
+    ENUM_BITFIELD(field_loc_kind) loc_kind : 2;
 
     /* Size of this field, in bits, or zero if not packed.
        For an unpacked field, the field's type's length
@@ -824,20 +837,34 @@ extern void allocate_cplus_struct_type (
 
 #define FIELD_TYPE(thisfld) ((thisfld).type)
 #define FIELD_NAME(thisfld) ((thisfld).name)
+#define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
 #define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
+#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
+#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
+#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
+#define SET_FIELD_BITPOS(thisfld, bitpos)			\
+  (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS,		\
+   FIELD_BITPOS (thisfld) = (bitpos))
+#define SET_FIELD_PHYSNAME(thisfld, name)			\
+  (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME,		\
+   FIELD_STATIC_PHYSNAME (thisfld) = (name))
+#define SET_FIELD_PHYSADDR(thisfld, addr)			\
+  (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR,		\
+   FIELD_STATIC_PHYSADDR (thisfld) = (addr))
+#define SET_FIELD_DWARF_BLOCK(thisfld, addr)			\
+  (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_DWARF_BLOCK,	\
+   FIELD_DWARF_BLOCK (thisfld) = (addr))
 #define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial)
 #define FIELD_BITSIZE(thisfld) ((thisfld).bitsize)
-#define FIELD_STATIC_KIND(thisfld) ((thisfld).static_kind)
-#define FIELD_PHYSNAME(thisfld) ((thisfld).loc.physname)
-#define FIELD_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
-#define SET_FIELD_PHYSNAME(thisfld, name) \
-  ((thisfld).static_kind = 1, FIELD_PHYSNAME(thisfld) = (name))
-#define SET_FIELD_PHYSADDR(thisfld, name) \
-  ((thisfld).static_kind = 2, FIELD_PHYSADDR(thisfld) = (name))
+
 #define TYPE_FIELD(thistype, n) TYPE_MAIN_TYPE(thistype)->fields[n]
 #define TYPE_FIELD_TYPE(thistype, n) FIELD_TYPE(TYPE_FIELD(thistype, n))
 #define TYPE_FIELD_NAME(thistype, n) FIELD_NAME(TYPE_FIELD(thistype, n))
-#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS(TYPE_FIELD(thistype,n))
+#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))
+#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
+#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (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))
 #define TYPE_FIELD_PACKED(thistype, n) (FIELD_BITSIZE(TYPE_FIELD(thistype,n))!=0)
@@ -873,12 +900,6 @@ extern void allocate_cplus_struct_type (
   (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
     : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n)))
 
-#define TYPE_FIELD_STATIC(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].static_kind != 0)
-#define TYPE_FIELD_STATIC_KIND(thistype, n) TYPE_MAIN_TYPE (thistype)->fields[n].static_kind
-#define TYPE_FIELD_STATIC_HAS_ADDR(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].static_kind == 2)
-#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_PHYSNAME(TYPE_FIELD(thistype, n))
-#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_PHYSADDR(TYPE_FIELD(thistype, n))
-
 #define TYPE_FN_FIELDLISTS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists
 #define TYPE_FN_FIELDLIST(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n]
 #define TYPE_FN_FIELDLIST1(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n].fn_fields
@@ -1331,6 +1352,8 @@ extern int rank_one_type (struct type *,
 
 extern void recursive_dump_type (struct type *, int);
 
+extern int field_is_static (struct field *);
+
 /* printcmd.c */
 
 extern void print_scalar_formatted (const void *, struct type *, int, int,
--- ./gdb/jv-typeprint.c	2008-01-01 23:53:11.000000000 +0100
+++ ./gdb/jv-typeprint.c	2008-10-29 20:56:57.000000000 +0100
@@ -185,7 +185,7 @@ java_type_print_base (struct type *type,
 		    fprintf_filtered (stream, "public ");
 		}
 
-	      if (TYPE_FIELD_STATIC (type, i))
+	      if (field_is_static (&TYPE_FIELD (type, i)))
 		fprintf_filtered (stream, "static ");
 
 	      java_print_type (TYPE_FIELD_TYPE (type, i),
--- ./gdb/jv-valprint.c	2008-01-01 23:53:11.000000000 +0100
+++ ./gdb/jv-valprint.c	2008-10-29 20:56:57.000000000 +0100
@@ -302,7 +302,7 @@ java_print_value_fields (struct type *ty
       for (i = n_baseclasses; i < len; i++)
 	{
 	  /* If requested, skip printing of static fields.  */
-	  if (TYPE_FIELD_STATIC (type, i))
+	  if (field_is_static (&TYPE_FIELD (type, i)))
 	    {
 	      char *name = TYPE_FIELD_NAME (type, i);
 	      if (!static_field_print)
@@ -340,7 +340,7 @@ java_print_value_fields (struct type *ty
 		fputs_filtered ("\"( ptr \"", stream);
 	      else
 		fputs_filtered ("\"( nodef \"", stream);
-	      if (TYPE_FIELD_STATIC (type, i))
+	      if (field_is_static (&TYPE_FIELD (type, i)))
 		fputs_filtered ("static ", stream);
 	      fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
 				       language_cplus,
@@ -355,7 +355,7 @@ java_print_value_fields (struct type *ty
 	    {
 	      annotate_field_begin (TYPE_FIELD_TYPE (type, i));
 
-	      if (TYPE_FIELD_STATIC (type, i))
+	      if (field_is_static (&TYPE_FIELD (type, i)))
 		fputs_filtered ("static ", stream);
 	      fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
 				       language_cplus,
@@ -365,7 +365,8 @@ java_print_value_fields (struct type *ty
 	      annotate_field_value ();
 	    }
 
-	  if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
+	  if (!field_is_static (&TYPE_FIELD (type, i))
+	      && TYPE_FIELD_PACKED (type, i))
 	    {
 	      struct value *v;
 
@@ -389,7 +390,7 @@ java_print_value_fields (struct type *ty
 		{
 		  fputs_filtered ("<optimized out or zero length>", stream);
 		}
-	      else if (TYPE_FIELD_STATIC (type, i))
+	      else if (field_is_static (&TYPE_FIELD (type, i)))
 		{
 		  struct value *v = value_static_field (type, i);
 		  if (v == NULL)
--- ./gdb/mdebugread.c	2008-01-01 23:53:12.000000000 +0100
+++ ./gdb/mdebugread.c	2008-10-29 20:56:57.000000000 +0100
@@ -1053,11 +1053,10 @@ parse_symbol (SYMR *sh, union aux_ext *a
 		if (tsym.st != stMember)
 		  break;
 
-		FIELD_BITPOS (*f) = tsym.value;
+		SET_FIELD_BITPOS (*f, tsym.value);
 		FIELD_TYPE (*f) = t;
 		FIELD_NAME (*f) = debug_info->ss + cur_fdr->issBase + tsym.iss;
 		FIELD_BITSIZE (*f) = 0;
-		FIELD_STATIC_KIND (*f) = 0;
 
 		enum_sym = ((struct symbol *)
 			    obstack_alloc (&current_objfile->objfile_obstack,
@@ -1247,11 +1246,10 @@ parse_symbol (SYMR *sh, union aux_ext *a
     case stMember:		/* member of struct or union */
       f = &TYPE_FIELDS (top_stack->cur_type)[top_stack->cur_field++];
       FIELD_NAME (*f) = name;
-      FIELD_BITPOS (*f) = sh->value;
+      SET_FIELD_BITPOS (*f, sh->value);
       bitsize = 0;
       FIELD_TYPE (*f) = parse_type (cur_fd, ax, sh->index, &bitsize, bigend, name);
       FIELD_BITSIZE (*f) = bitsize;
-      FIELD_STATIC_KIND (*f) = 0;
       break;
 
     case stIndirect:		/* forward declaration on Irix5 */
--- ./gdb/p-typeprint.c	2008-10-29 10:55:12.000000000 +0100
+++ ./gdb/p-typeprint.c	2008-10-29 20:56:57.000000000 +0100
@@ -575,14 +575,12 @@ pascal_type_print_base (struct type *typ
 		}
 
 	      print_spaces_filtered (level + 4, stream);
-	      if (TYPE_FIELD_STATIC (type, i))
-		{
-		  fprintf_filtered (stream, "static ");
-		}
+	      if (field_is_static (&TYPE_FIELD (type, i)))
+		fprintf_filtered (stream, "static ");
 	      pascal_print_type (TYPE_FIELD_TYPE (type, i),
 				 TYPE_FIELD_NAME (type, i),
 				 stream, show - 1, level + 4);
-	      if (!TYPE_FIELD_STATIC (type, i)
+	      if (!field_is_static (&TYPE_FIELD (type, i))
 		  && TYPE_FIELD_PACKED (type, i))
 		{
 		  /* It is a bitfield.  This code does not attempt
--- ./gdb/p-valprint.c	2008-01-01 23:53:12.000000000 +0100
+++ ./gdb/p-valprint.c	2008-10-29 20:56:57.000000000 +0100
@@ -671,7 +671,8 @@ pascal_object_print_value_fields (struct
       for (i = n_baseclasses; i < len; i++)
 	{
 	  /* If requested, skip printing of static fields.  */
-	  if (!pascal_static_field_print && TYPE_FIELD_STATIC (type, i))
+	  if (!pascal_static_field_print
+	      && field_is_static (&TYPE_FIELD (type, i)))
 	    continue;
 	  if (fields_seen)
 	    fprintf_filtered (stream, ", ");
@@ -703,7 +704,7 @@ pascal_object_print_value_fields (struct
 		fputs_filtered ("\"( ptr \"", stream);
 	      else
 		fputs_filtered ("\"( nodef \"", stream);
-	      if (TYPE_FIELD_STATIC (type, i))
+	      if (field_is_static (&TYPE_FIELD (type, i)))
 		fputs_filtered ("static ", stream);
 	      fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
 				       language_cplus,
@@ -718,7 +719,7 @@ pascal_object_print_value_fields (struct
 	    {
 	      annotate_field_begin (TYPE_FIELD_TYPE (type, i));
 
-	      if (TYPE_FIELD_STATIC (type, i))
+	      if (field_is_static (&TYPE_FIELD (type, i)))
 		fputs_filtered ("static ", stream);
 	      fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
 				       language_cplus,
@@ -728,7 +729,8 @@ pascal_object_print_value_fields (struct
 	      annotate_field_value ();
 	    }
 
-	  if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
+	  if (!field_is_static (&TYPE_FIELD (type, i))
+	      && TYPE_FIELD_PACKED (type, i))
 	    {
 	      struct value *v;
 
@@ -752,7 +754,7 @@ pascal_object_print_value_fields (struct
 		{
 		  fputs_filtered ("<optimized out or zero length>", stream);
 		}
-	      else if (TYPE_FIELD_STATIC (type, i))
+	      else if (field_is_static (&TYPE_FIELD (type, i)))
 		{
 		  /* struct value *v = value_static_field (type, i); v4.17 specific */
 		  struct value *v;
--- ./gdb/valops.c	2008-10-29 10:55:12.000000000 +0100
+++ ./gdb/valops.c	2008-10-29 20:56:57.000000000 +0100
@@ -1269,7 +1269,7 @@ search_struct_field (char *name, struct 
 	if (t_field_name && (strcmp_iw (t_field_name, name) == 0))
 	  {
 	    struct value *v;
-	    if (TYPE_FIELD_STATIC (type, i))
+	    if (field_is_static (&TYPE_FIELD (type, i)))
 	      {
 		v = value_static_field (type, i);
 		if (v == 0)
@@ -2382,7 +2382,7 @@ value_struct_elt_for_reference (struct t
 
       if (t_field_name && strcmp (t_field_name, name) == 0)
 	{
-	  if (TYPE_FIELD_STATIC (t, i))
+	  if (field_is_static (&TYPE_FIELD (t, i)))
 	    {
 	      v = value_static_field (t, i);
 	      if (v == NULL)
--- ./gdb/value.c	2008-10-29 10:47:18.000000000 +0100
+++ ./gdb/value.c	2008-10-29 20:56:57.000000000 +0100
@@ -1261,7 +1261,7 @@ value_static_field (struct type *type, i
 {
   struct value *retval;
 
-  if (TYPE_FIELD_STATIC_HAS_ADDR (type, fieldno))
+  if (TYPE_FIELD_LOC_KIND (type, fieldno) == FIELD_LOC_KIND_PHYSADDR)
     {
       retval = value_at (TYPE_FIELD_TYPE (type, fieldno),
 			 TYPE_FIELD_STATIC_PHYSADDR (type, fieldno));
--- ./gdb/varobj.c	2008-10-29 10:55:12.000000000 +0100
+++ ./gdb/varobj.c	2008-10-29 20:56:57.000000000 +0100
@@ -2050,7 +2050,7 @@ value_struct_element_index (struct value
 
   TRY_CATCH (e, RETURN_MASK_ERROR)
     {
-      if (TYPE_FIELD_STATIC (type, type_index))
+      if (field_is_static (&TYPE_FIELD (type, type_index)))
 	result = value_static_field (type, type_index);
       else
 	result = value_primitive_field (value, 0, type_index, type);

gdb-6.8-bz377541-vla.patch:

--- NEW FILE gdb-6.8-bz377541-vla.patch ---
Based on:
http://people.redhat.com/jkratoch/vla/
fortran-dynamic-arrays-HEAD-l.patch

--- ./gdb/c-typeprint.c	2008-11-08 22:46:06.000000000 +0100
+++ ./gdb/c-typeprint.c	2008-11-08 22:39:57.000000000 +0100
@@ -541,7 +541,12 @@ c_type_print_varspec_suffix (struct type
 	fprintf_filtered (stream, ")");
 
       fprintf_filtered (stream, "[");
-      if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
+      if (TYPE_ARRAY_BOUND_IS_DWARF_BLOCK (type, 1))
+	{
+	  /* No _() - printed sources should not be locale dependent.  */
+	  fprintf_filtered (stream, "variable");
+	}
+      else if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
 	&& !TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
 	fprintf_filtered (stream, "%d",
 			  (TYPE_LENGTH (type)
--- ./gdb/dwarf2expr.c	2008-11-08 22:46:06.000000000 +0100
+++ ./gdb/dwarf2expr.c	2008-11-08 22:39:57.000000000 +0100
@@ -750,6 +750,13 @@ execute_stack_op (struct dwarf_expr_cont
 	  ctx->initialized = 0;
 	  goto no_push;
 
+	case DW_OP_push_object_address:
+	  if (ctx->get_object_address == NULL)
+	    error (_("DWARF-2 expression error: DW_OP_push_object_address must "
+	           "have a value to push."));
+	  result = (ctx->get_object_address) (ctx->baton);
+	  break;
+
 	default:
 	  error (_("Unhandled dwarf expression opcode 0x%x"), op);
 	}
--- ./gdb/dwarf2expr.h	2008-11-08 22:46:06.000000000 +0100
+++ ./gdb/dwarf2expr.h	2008-11-08 22:39:57.000000000 +0100
@@ -61,10 +61,10 @@ struct dwarf_expr_context
      The result must be live until the current expression evaluation
      is complete.  */
   unsigned char *(*get_subr) (void *baton, off_t offset, size_t *length);
+#endif
 
   /* Return the `object address' for DW_OP_push_object_address.  */
   CORE_ADDR (*get_object_address) (void *baton);
-#endif
 
   /* The current depth of dwarf expression recursion, via DW_OP_call*,
      DW_OP_fbreg, DW_OP_push_object_address, etc., and the maximum
--- ./gdb/dwarf2loc.c	2008-11-08 22:46:06.000000000 +0100
+++ ./gdb/dwarf2loc.c	2008-11-08 22:39:57.000000000 +0100
@@ -105,6 +105,9 @@ struct dwarf_expr_baton
 {
   struct frame_info *frame;
   struct objfile *objfile;
+  /* From DW_TAG_variable's DW_AT_location (not DW_TAG_type's
+     DW_AT_data_location) for DW_OP_push_object_address.  */
+  CORE_ADDR object_address;
 };
 
 /* Helper functions for dwarf2_evaluate_loc_desc.  */
@@ -160,22 +163,32 @@ dwarf_expr_frame_base (void *baton, gdb_
       *start = find_location_expression (symbaton, length,
 					 get_frame_address_in_block (frame));
     }
-  else
+  else if (SYMBOL_OPS (framefunc) == &dwarf2_locexpr_funcs)
     {
       struct dwarf2_locexpr_baton *symbaton;
+
       symbaton = SYMBOL_LOCATION_BATON (framefunc);
-      if (symbaton != NULL)
-	{
-	  *length = symbaton->size;
-	  *start = symbaton->data;
-	}
-      else
-	*start = NULL;
+      gdb_assert (symbaton != NULL);
+      *start = symbaton->data;
+      *length = symbaton->size;
     }
+  else if (SYMBOL_OPS (framefunc) == &dwarf2_missing_funcs)
+    {
+      struct dwarf2_locexpr_baton *symbaton;
+
+      symbaton = SYMBOL_LOCATION_BATON (framefunc);
+      gdb_assert (symbaton == NULL);
+      *start = NULL;
+      *length = 0;	/* unused */
+    }
+  else
+    internal_error (__FILE__, __LINE__,
+		    _("Unsupported SYMBOL_OPS %p for \"%s\""),
+		    SYMBOL_OPS (framefunc), SYMBOL_PRINT_NAME (framefunc));
 
   if (*start == NULL)
     error (_("Could not find the frame base for \"%s\"."),
-	   SYMBOL_NATURAL_NAME (framefunc));
+	   SYMBOL_PRINT_NAME (framefunc));
 }
 
 /* Using the objfile specified in BATON, find the address for the
@@ -188,6 +201,117 @@ dwarf_expr_tls_address (void *baton, COR
   return target_translate_tls_address (debaton->objfile, offset);
 }
 
+static CORE_ADDR
+dwarf_expr_object_address (void *baton)
+{
+  struct dwarf_expr_baton *debaton = baton;
+
+  /* The message is suppressed in DWARF_BLOCK_EXEC.  */
+  if (debaton->object_address == 0)
+    error (_("Cannot resolve DW_OP_push_object_address for a missing object"));
+
+  return debaton->object_address;
+}
+
+/* Address of the variable we are currently referring to.  It is set from
+   DW_TAG_variable's DW_AT_location (not DW_TAG_type's DW_AT_data_location) for
+   DW_OP_push_object_address.  */
+
+static CORE_ADDR object_address;
+
+/* Callers use object_address_set while their callers use the result set so we
+   cannot run the cleanup at the local block of our direct caller.  Still we
+   should reset OBJECT_ADDRESS at least for the next GDB command.  */
+
+static void
+object_address_cleanup (void *prev_save_voidp)
+{
+  CORE_ADDR *prev_save = prev_save_voidp;
+
+  object_address = *prev_save;
+  xfree (prev_save);
+}
+
+/* Set the base address - DW_AT_location - of a variable.  It is being later
+   used to derive other object addresses by DW_OP_push_object_address.
+
+   It would be useful to sanity check ADDRESS - such as for some objects with
+   unset VALUE_ADDRESS - but some valid addresses may be zero (such as first
+   objects in relocatable .o files).  */
+
+void
+object_address_set (CORE_ADDR address)
+{
+  CORE_ADDR *prev_save;
+
+  prev_save = xmalloc (sizeof *prev_save);
+  *prev_save = object_address;
+  make_cleanup (object_address_cleanup, prev_save);
+
+  object_address = address;
+}
+
+/* Evaluate DWARF expression at DATA ... DATA + SIZE with its result readable
+   by dwarf_expr_fetch (RETVAL, 0).  FRAME parameter can be NULL to call
+   get_selected_frame to find it.  Returned dwarf_expr_context freeing is
+   pushed on the cleanup chain.  */
+
+static struct dwarf_expr_context *
+dwarf_expr_prep_ctx (struct frame_info *frame, gdb_byte *data,
+		     unsigned short size, struct objfile *objfile)
+{
+  struct dwarf_expr_context *ctx;
+  struct dwarf_expr_baton baton;
+
+  if (!frame)
+    frame = get_selected_frame (NULL);
+
+  baton.frame = frame;
+  baton.objfile = objfile;
+  baton.object_address = object_address;
+
+  ctx = new_dwarf_expr_context ();
+  ctx->baton = &baton;
+  ctx->read_reg = dwarf_expr_read_reg;
+  ctx->read_mem = dwarf_expr_read_mem;
+  ctx->get_frame_base = dwarf_expr_frame_base;
+  ctx->get_tls_address = dwarf_expr_tls_address;
+  ctx->get_object_address = dwarf_expr_object_address;
+
+  make_cleanup ((make_cleanup_ftype *) free_dwarf_expr_context, ctx);
+
+  dwarf_expr_eval (ctx, data, size);
+
+  /* It was used only during dwarf_expr_eval.  */
+  ctx->baton = NULL;
+
+  return ctx;
+}
+
+/* Evaluate DWARF expression at DLBATON expecting it produces exactly one
+   CORE_ADDR result on the DWARF stack stack.  */
+
+CORE_ADDR
[...3212 lines suppressed...]
     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)).  */
 
-static struct value *
-value_subscripted_rvalue (struct value *array, struct value *idx, int lowerbound)
+struct value *
+value_subscripted_rvalue (struct value *array, CORE_ADDR offset)
 {
   struct type *array_type = check_typedef (value_type (array));
   struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
-  unsigned int elt_size = TYPE_LENGTH (elt_type);
-  LONGEST index = value_as_long (idx);
-  unsigned int elt_offs = elt_size * longest_to_int (index - lowerbound);
   struct value *v;
 
-  if (index < lowerbound || 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_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);
+    }
 
   if (VALUE_LVAL (array) == lval_internalvar)
     VALUE_LVAL (v) = lval_internalvar_component;
   else
     VALUE_LVAL (v) = VALUE_LVAL (array);
+
   VALUE_ADDRESS (v) = VALUE_ADDRESS (array);
+  /* We need to already adjust the address according to the former type as
+     V will have a different type (ELT_TYPE) which may no longer contain the
+     adjustment code like TYPE_FORTRAN_ARRAY_DATA_LOCATION.  */
+  object_address_get_data (array_type, &VALUE_ADDRESS (v));
+
   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;
 }
 
--- ./gdb/valops.c	2008-11-08 22:46:06.000000000 +0100
+++ ./gdb/valops.c	2008-11-08 22:39:57.000000000 +0100
@@ -37,6 +37,7 @@
 #include "dictionary.h"
 #include "cp-support.h"
 #include "dfp.h"
+#include "dwarf2loc.h"
 
 #include <errno.h>
 #include "gdb_string.h"
@@ -504,6 +505,49 @@ value_one (struct type *type, enum lval_
   return val;
 }
 
+/* object_address_set must be already called before this function.  */
+
+const char *
+object_address_data_not_valid (struct type *type)
+{
+  /* DW_AT_associated has a preference over DW_AT_allocated.  */
+  if (TYPE_ASSOCIATED (type) != NULL
+      && 0 == dwarf_locexpr_baton_eval (TYPE_ASSOCIATED (type)))
+    return N_("object is not associated");
+
+  if (TYPE_ALLOCATED (type) != NULL
+      && 0 == dwarf_locexpr_baton_eval (TYPE_ALLOCATED (type)))
+    return N_("object is not allocated");
+
+  return NULL;
+}
+
+/* Return non-zero if the variable is valid.  If it is valid the function
+   may store the data address (DW_AT_DATA_LOCATION) of TYPE at *ADDRESS_RETURN.
+   You must set *ADDRESS_RETURN as VALUE_ADDRESS (VAL) before calling this
+   function.  If no DW_AT_DATA_LOCATION is present for TYPE the address at
+   *ADDRESS_RETURN is left unchanged.  ADDRESS_RETURN must not be NULL, use
+   object_address_data_not_valid () for just the data validity check.  */
+
+int
+object_address_get_data (struct type *type, CORE_ADDR *address_return)
+{
+  gdb_assert (address_return != NULL);
+
+  object_address_set (*address_return);
+  if (object_address_data_not_valid (type) != NULL)
+    {
+      /* Do not try to evaluate DW_AT_data_location as it may even crash
+	 (it would just return the value zero in the gfortran case).  */
+      return 0;
+    }
+
+  if (TYPE_DATA_LOCATION (type) != NULL)
+    *address_return = dwarf_locexpr_baton_eval (TYPE_DATA_LOCATION (type));
+
+  return 1;
+}
+
 /* Return a value with type TYPE located at ADDR.
 
    Call value_at only if the data needs to be fetched immediately;
@@ -570,12 +614,21 @@ value_at_lazy (struct type *type, CORE_A
 int
 value_fetch_lazy (struct value *val)
 {
-  CORE_ADDR addr = VALUE_ADDRESS (val) + value_offset (val);
-  int length = TYPE_LENGTH (value_enclosing_type (val));
+  CORE_ADDR addr;
+  int length;
 
-  struct type *type = value_type (val);
-  if (length)
-    read_memory (addr, value_contents_all_raw (val), length);
+  addr = VALUE_ADDRESS (val);
+  if (object_address_get_data (value_type (val), &addr))
+    {
+      struct type *type = value_enclosing_type (val);
+      int length = TYPE_LENGTH (check_typedef (type));
+
+      if (length)
+	{
+	  addr += value_offset (val);
+	  read_memory (addr, value_contents_all_raw (val), length);
+	}
+    }
 
   set_value_lazy (val, 0);
   return 0;
@@ -887,12 +940,17 @@ struct value *
 value_coerce_array (struct value *arg1)
 {
   struct type *type = check_typedef (value_type (arg1));
+  CORE_ADDR address;
 
   if (VALUE_LVAL (arg1) != lval_memory)
     error (_("Attempt to take address of value not located in memory."));
 
+  address = VALUE_ADDRESS (arg1);
+  if (!object_address_get_data (type, &address))
+    error (_("Attempt to take address of non-valid value."));
+
   return value_from_pointer (lookup_pointer_type (TYPE_TARGET_TYPE (type)),
-			     (VALUE_ADDRESS (arg1) + value_offset (arg1)));
+			     address + value_offset (arg1));
 }
 
 /* Given a value which is a function, return a value which is a pointer
--- ./gdb/value.h	2008-11-08 22:46:06.000000000 +0100
+++ ./gdb/value.h	2008-11-08 22:46:45.000000000 +0100
@@ -284,6 +284,10 @@ extern struct value *value_from_decfloat
 					  const gdb_byte *decbytes);
 extern struct value *value_from_string (char *string);
 
+extern const char *object_address_data_not_valid (struct type *type);
+extern int object_address_get_data (struct type *type,
+				    CORE_ADDR *address_return);
+
 extern struct value *value_at (struct type *type, CORE_ADDR addr);
 extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr);
 
@@ -522,9 +526,9 @@ extern int common_val_print (struct valu
 extern int val_print_string (CORE_ADDR addr, int len, int width,
 			     struct ui_file *stream);
 
-extern void print_variable_value (struct symbol *var,
-				  struct frame_info *frame,
-				  struct ui_file *stream);
+extern void print_variable_value_nl (struct symbol *var,
+				     struct frame_info *frame,
+				     struct ui_file *stream);
 
 extern int check_field (struct value *, const char *);
 
@@ -554,4 +558,7 @@ extern struct value *value_allocate_spac
 
 extern struct value *value_of_local (const char *name, int complain);
 
+extern struct value *value_subscripted_rvalue (struct value *array,
+					       CORE_ADDR offset);
+
 #endif /* !defined (VALUE_H) */

gdb-6.8-watchpoint-conditionals-test.patch:

--- NEW FILE gdb-6.8-watchpoint-conditionals-test.patch ---
For:
http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html

--- /dev/null	2008-11-04 06:31:10.599601840 +0100
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint-cond.exp	2008-11-04 06:43:29.000000000 +0100
@@ -0,0 +1,37 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set testfile watchpoint-cond
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+    untested "Couldn't compile test program"
+    return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if { [runto_main] < 0 } {
+    untested watchpoint-cond
+    return -1
+}
+
+gdb_test "watch i if i < 20" "atchpoint \[0-9\]+: i"
+gdb_test "cont" "atchpoint \[0-9\]+: i.*Old value = 20.*New value = 19.*"
--- /dev/null	2008-11-04 06:31:10.599601840 +0100
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint-cond.c	2008-11-04 06:42:48.000000000 +0100
@@ -0,0 +1,31 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2008 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+   Please email any bugs, comments, and/or additions to this file to:
+   bug-gdb at prep.ai.mit.edu  */
+
+int
+main (int argc, char **argv)
+{
+  static int i = 0; /* `static' to start initialized.  */
+  int j = 2;
+
+  for (j = 0; j < 30; j++)
+    i = 30 - j;
+
+  return 0;
+}

gdb-6.8-upstream.patch:

Index: gdb-6.8-upstream.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-9/gdb-6.8-upstream.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gdb-6.8-upstream.patch	1 Aug 2008 14:31:40 -0000	1.7
+++ gdb-6.8-upstream.patch	9 Nov 2008 14:03:53 -0000	1.8
@@ -1638,3 +1638,321 @@
        /* Shared library handling.  */
        set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);
        set_solib_svr4_fetch_link_map_offsets
+
+
+
+http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
+http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html
+
+2008-04-17  Marc Khouzam  <marc.khouzam at ericsson.com>
+
+	* breakpoint.c (update_watchpoint): Always reparse
+	condition.
+
+===================================================================
+RCS file: /cvs/src/src/gdb/breakpoint.c,v
+retrieving revision 1.309
+retrieving revision 1.310
+diff -u -r1.309 -r1.310
+--- src/gdb/breakpoint.c	2008/04/17 22:43:17	1.309
++++ src/gdb/breakpoint.c	2008/04/18 00:41:28	1.310
+@@ -994,14 +994,13 @@
+ 	    value_free (v);
+ 	}
+ 
+-      if (reparse && b->cond_string != NULL)
++      /* We just regenerated the list of breakpoint locations.
++         The new location does not have its condition field set to anything
++         and therefore, we must always reparse the cond_string, independently
++         of the value of the reparse flag.  */
++      if (b->cond_string != NULL)
+ 	{
+ 	  char *s = b->cond_string;
+-	  if (b->loc->cond)
+-	    {
+-	      xfree (b->loc->cond);
+-	      b->loc->cond = NULL;
+-	    }
+ 	  b->loc->cond = parse_exp_1 (&s, b->exp_valid_block, 0);
+ 	}
+     }
+
+
+
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=196439
+http://sourceware.org/ml/gdb-patches/2008-04/msg00628.html
+http://sourceware.org/ml/gdb-cvs/2008-05/msg00051.html
+
+Testcase:
+gdb-6.5-bz196439-valgrind-memcheck-compat-test.patch
+
+2008-05-04  Jan Kratochvil  <jan.kratochvil at redhat.com>
+
+	* dwarf2loc.c (dwarf_expr_frame_base): Error out on missing
+	SYMBOL_LOCATION_BATON.
+
+===================================================================
+RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
+retrieving revision 1.50
+retrieving revision 1.51
+diff -u -r1.50 -r1.51
+--- src/gdb/dwarf2loc.c	2008/03/26 14:53:28	1.50
++++ src/gdb/dwarf2loc.c	2008/05/04 12:44:16	1.51
+@@ -166,8 +166,13 @@
+     {
+       struct dwarf2_locexpr_baton *symbaton;
+       symbaton = SYMBOL_LOCATION_BATON (framefunc);
+-      *length = symbaton->size;
+-      *start = symbaton->data;
++      if (symbaton != NULL)
++	{
++	  *length = symbaton->size;
++	  *start = symbaton->data;
++	}
++      else
++	*start = NULL;
+     }
+ 
+   if (*start == NULL)
+
+
+
+http://sourceware.org/ml/gdb-patches/2008-04/msg00508.html
+http://sourceware.org/ml/gdb-cvs/2008-05/msg00017.html
+
+Test applicable from:
+gdb-6.8-watchpoint-conditionals-test.patch
+
+gdb/
+2008-05-02  Andreas Schwab  <schwab at suse.de>
+
+	* target.h (struct target_ops): Add
+	to_watchpoint_addr_within_range.
+	(target_watchpoint_addr_within_range): New function.
+	* target.c (update_current_target): Inherit
+	to_watchpoint_addr_within_range, defaulting to
+	default_watchpoint_addr_within_range.
+	(default_watchpoint_addr_within_range): New function.
+	(debug_to_watchpoint_addr_within_range): New function.
+	(setup_target_debug): Set to_watchpoint_addr_within_range.
+	* ppc-linux-nat.c (ppc_linux_watchpoint_addr_within_range):
+	New function.
+	(_initialize_ppc_linux_nat): Set to_watchpoint_addr_within_range.
+	* breakpoint.c (watchpoints_triggered): Use
+	target_watchpoint_addr_within_range.
+
+gdb/doc/
+2008-05-02  Andreas Schwab  <schwab at suse.de>
+
+	* gdbint.texinfo (Algorithms): Describe
+	target_watchpoint_addr_within_range.
+
+===================================================================
+RCS file: /cvs/src/src/gdb/target.h,v
+retrieving revision 1.117
+retrieving revision 1.118
+diff -u -r1.117 -r1.118
+--- src/gdb/target.h	2008/05/01 19:31:51	1.117
++++ src/gdb/target.h	2008/05/02 11:07:25	1.118
+@@ -367,6 +367,8 @@
+     int to_have_steppable_watchpoint;
+     int to_have_continuable_watchpoint;
+     int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *);
++    int (*to_watchpoint_addr_within_range) (struct target_ops *,
++					    CORE_ADDR, CORE_ADDR, int);
+     int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, int);
+     void (*to_terminal_init) (void);
+     void (*to_terminal_inferior) (void);
+@@ -1093,6 +1095,9 @@
+ #define target_stopped_data_address_p(CURRENT_TARGET) (1)
+ #endif
+ 
++#define target_watchpoint_addr_within_range(target, addr, start, length) \
++  (*target.to_watchpoint_addr_within_range) (target, addr, start, length)
++
+ extern const struct target_desc *target_read_description (struct target_ops *);
+ 
+ /* Command logging facility.  */
+===================================================================
+RCS file: /cvs/src/src/gdb/target.c,v
+retrieving revision 1.160
+retrieving revision 1.161
+diff -u -r1.160 -r1.161
+--- src/gdb/target.c	2008/04/24 10:21:44	1.160
++++ src/gdb/target.c	2008/05/02 11:07:25	1.161
+@@ -49,6 +49,9 @@
+ 
+ static void default_terminal_info (char *, int);
+ 
++static int default_watchpoint_addr_within_range (struct target_ops *,
++						 CORE_ADDR, CORE_ADDR, int);
++
+ static int default_region_ok_for_hw_watchpoint (CORE_ADDR, int);
+ 
+ static int nosymbol (char *, CORE_ADDR *);
+@@ -131,6 +134,9 @@
+ 
+ static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
+ 
++static int debug_to_watchpoint_addr_within_range (struct target_ops *,
++						  CORE_ADDR, CORE_ADDR, int);
++
+ static int debug_to_region_ok_for_hw_watchpoint (CORE_ADDR, int);
+ 
+ static void debug_to_terminal_init (void);
+@@ -416,9 +422,10 @@
+       INHERIT (to_insert_watchpoint, t);
+       INHERIT (to_remove_watchpoint, t);
+       INHERIT (to_stopped_data_address, t);
+-      INHERIT (to_stopped_by_watchpoint, t);
+       INHERIT (to_have_steppable_watchpoint, t);
+       INHERIT (to_have_continuable_watchpoint, t);
++      INHERIT (to_stopped_by_watchpoint, t);
++      INHERIT (to_watchpoint_addr_within_range, t);
+       INHERIT (to_region_ok_for_hw_watchpoint, t);
+       INHERIT (to_terminal_init, t);
+       INHERIT (to_terminal_inferior, t);
+@@ -544,6 +551,8 @@
+   de_fault (to_stopped_data_address,
+ 	    (int (*) (struct target_ops *, CORE_ADDR *))
+ 	    return_zero);
++  de_fault (to_watchpoint_addr_within_range,
++	    default_watchpoint_addr_within_range);
+   de_fault (to_region_ok_for_hw_watchpoint,
+ 	    default_region_ok_for_hw_watchpoint);
+   de_fault (to_terminal_init,
+@@ -1881,6 +1890,14 @@
+ }
+ 
+ static int
++default_watchpoint_addr_within_range (struct target_ops *target,
++				      CORE_ADDR addr,
++				      CORE_ADDR start, int length)
++{
++  return addr >= start && addr < start + length;
++}
++
++static int
+ return_zero (void)
+ {
+   return 0;
+@@ -2448,6 +2465,23 @@
+ }
+ 
+ static int
++debug_to_watchpoint_addr_within_range (struct target_ops *target,
++				       CORE_ADDR addr,
++				       CORE_ADDR start, int length)
++{
++  int retval;
++
++  retval = debug_target.to_watchpoint_addr_within_range (target, addr,
++							 start, length);
++
++  fprintf_filtered (gdb_stdlog,
++		    "target_watchpoint_addr_within_range (0x%lx, 0x%lx, %d) = %d\n",
++		    (unsigned long) addr, (unsigned long) start, length,
++		    retval);
++  return retval;
++}
++
++static int
+ debug_to_insert_hw_breakpoint (struct bp_target_info *bp_tgt)
+ {
+   int retval;
+@@ -2790,6 +2824,7 @@
+   current_target.to_remove_watchpoint = debug_to_remove_watchpoint;
+   current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint;
+   current_target.to_stopped_data_address = debug_to_stopped_data_address;
++  current_target.to_watchpoint_addr_within_range = debug_to_watchpoint_addr_within_range;
+   current_target.to_region_ok_for_hw_watchpoint = debug_to_region_ok_for_hw_watchpoint;
+   current_target.to_terminal_init = debug_to_terminal_init;
+   current_target.to_terminal_inferior = debug_to_terminal_inferior;
+===================================================================
+RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v
+retrieving revision 1.78
+retrieving revision 1.79
+diff -u -r1.78 -r1.79
+--- src/gdb/ppc-linux-nat.c	2008/01/16 04:48:55	1.78
++++ src/gdb/ppc-linux-nat.c	2008/05/02 11:07:25	1.79
+@@ -889,6 +889,16 @@
+   return ppc_linux_stopped_data_address (&current_target, &addr);
+ }
+ 
++static int
++ppc_linux_watchpoint_addr_within_range (struct target_ops *target,
++					CORE_ADDR addr,
++					CORE_ADDR start, int length)
++{
++  addr &= ~7;
++  /* Check whether [start, start+length-1] intersects [addr, addr+7]. */
++  return start <= addr + 7 && start + length - 1 >= addr;
++}
++
+ static void
+ ppc_linux_store_inferior_registers (struct regcache *regcache, int regno)
+ {
+@@ -997,6 +1007,7 @@
+   t->to_remove_watchpoint = ppc_linux_remove_watchpoint;
+   t->to_stopped_by_watchpoint = ppc_linux_stopped_by_watchpoint;
+   t->to_stopped_data_address = ppc_linux_stopped_data_address;
++  t->to_watchpoint_addr_within_range = ppc_linux_watchpoint_addr_within_range;
+ 
+   t->to_read_description = ppc_linux_read_description;
+ 
+===================================================================
+RCS file: /cvs/src/src/gdb/breakpoint.c,v
+retrieving revision 1.317
+retrieving revision 1.318
+diff -u -r1.317 -r1.318
+--- src/gdb/breakpoint.c	2008/05/01 20:35:33	1.317
++++ src/gdb/breakpoint.c	2008/05/02 11:07:25	1.318
+@@ -2616,8 +2616,9 @@
+ 	for (loc = b->loc; loc; loc = loc->next)
+ 	  /* Exact match not required.  Within range is
+ 	     sufficient.  */
+-	  if (addr >= loc->address
+-	      && addr < loc->address + loc->length)
++	  if (target_watchpoint_addr_within_range (&current_target,
++						   addr, loc->address,
++						   loc->length))
+ 	    {
+ 	      b->watchpoint_triggered = watch_triggered_yes;
+ 	      break;
+===================================================================
+RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
+retrieving revision 1.282
+retrieving revision 1.283
+diff -u -r1.282 -r1.283
+--- src/gdb/doc/gdbint.texinfo	2008/04/30 21:16:46	1.282
++++ src/gdb/doc/gdbint.texinfo	2008/05/02 11:07:25	1.283
+@@ -9,7 +9,7 @@
+ @ifinfo
+ This file documents the internals of the GNU debugger @value{GDBN}.
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001,
+-   2002, 2003, 2004, 2005, 2006
++   2002, 2003, 2004, 2005, 2006, 2008
+    Free Software Foundation, Inc.
+ Contributed by Cygnus Solutions.  Written by John Gilmore.
+ Second Edition by Stan Shebs.
+@@ -711,10 +711,19 @@
+ resuming, this method should clear it.  For instance, the x86 debug
+ control register has sticky triggered flags.
+ 
++ at findex target_watchpoint_addr_within_range
++ at item target_watchpoint_addr_within_range (@var{target}, @var{addr}, @var{start}, @var{length})
++Check whether @var{addr} (as returned by @code{target_stopped_data_address})
++lies within the hardware-defined watchpoint region described by
++ at var{start} and @var{length}.  This only needs to be provided if the
++granularity of a watchpoint is greater than one byte, i.e., if the
++watchpoint can also trigger on nearby addresses outside of the watched
++region.
++
+ @findex HAVE_STEPPABLE_WATCHPOINT
+ @item HAVE_STEPPABLE_WATCHPOINT
+ If defined to a non-zero value, it is not necessary to disable a
+-watchpoint to step over it.    Like @code{gdbarch_have_nonsteppable_watchpoint},
++watchpoint to step over it.  Like @code{gdbarch_have_nonsteppable_watchpoint},
+ this is usually set when watchpoints trigger at the instruction
+ which will perform an interesting read or write.  It should be
+ set if there is a temporary disable bit which allows the processor


Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-9/gdb.spec,v
retrieving revision 1.297
retrieving revision 1.298
diff -u -r1.297 -r1.298
--- gdb.spec	2 Sep 2008 00:31:01 -0000	1.297
+++ gdb.spec	9 Nov 2008 14:03:53 -0000	1.298
@@ -16,7 +16,7 @@
 
 # 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: 22%{?_with_upstream:.upstream}%{?dist}
+Release: 23%{?_with_upstream:.upstream}%{?dist}
 
 License: GPLv3+
 Group: Development/Debuggers
@@ -195,9 +195,6 @@
 # ia32el.
 Patch179: gdb-6.3-ia32el-fix-waitpid-20060615.patch
 
-# Testcase for corrupted or missing location list information (BZ 196439).
-Patch187: gdb-6.5-bz196439-valgrind-memcheck-compat-test.patch
-
 # Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661).
 Patch188: gdb-6.5-bz203661-emit-relocs.patch
 
@@ -344,7 +341,10 @@
 Patch304: gdb-6.7-kernel-headers-compat.patch
 
 # Fix/implement the Fortran dynamic arrays support (BZ 377541).
-Patch305: gdb-6.8-bz377541-fortran-dynamic-arrays.patch
+# Fix the variable-length-arrays support (BZ 468266, feature BZ 377541).
+Patch345: gdb-6.8-bz377541-vla-bound-undefined.patch
+Patch346: gdb-6.8-bz377541-vla-loc-kind.patch
+Patch305: gdb-6.8-bz377541-vla.patch
 
 # Backport fix of a segfault + PIE regression since 6.7.1 on PIE executables.
 Patch306: gdb-6.8-watchpoint-inaccessible-memory.patch
@@ -395,6 +395,9 @@
 # Fix occasional crash on a removed watchpoint.
 Patch338: gdb-6.8-breakpoint-gone.patch
 
+# Test the watchpoints conditionals works.
+Patch343: gdb-6.8-watchpoint-conditionals-test.patch
+
 BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
 BuildRequires: flex bison sharutils expat-devel
 Requires: readline
@@ -518,7 +521,6 @@
 %patch177 -p1
 %patch178 -p1
 %patch179 -p1
-%patch187 -p1
 %patch188 -p1
 %patch190 -p1
 %patch194 -p1
@@ -568,6 +570,8 @@
 %patch298 -p1
 %patch301 -p1
 %patch304 -p1
+%patch345 -p1
+%patch346 -p1
 %patch305 -p1
 %patch306 -p1
 %patch309 -p1
@@ -586,6 +590,7 @@
 %patch336 -p1
 %patch337 -p1
 %patch338 -p1
+%patch343 -p1
 %patch124 -p1
 
 find -name "*.orig" | xargs rm -f
@@ -838,6 +843,11 @@
 %endif
 
 %changelog
+* Sun Nov  9 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8-23
+- Fix the variable-length-arrays support (BZ 468266, feature BZ 377541).
+- Fix the watchpoints conditionals.
+- Fix on PPC spurious SIGTRAPs on active watchpoints.
+
 * Tue Sep  2 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8-22
 - Fix PIE patch regression for loading binaries from valgrind (BZ 460319).
 


--- gdb-6.5-bz196439-valgrind-memcheck-compat-test.patch DELETED ---


--- gdb-6.8-bz377541-fortran-dynamic-arrays.patch DELETED ---




More information about the scm-commits mailing list