Fix gdb-vla-intel-fortran-strides.patch rebase regression.

This commit is contained in:
Jan Kratochvil 2017-03-02 11:02:25 +01:00
parent b1807ab4e1
commit 0fffd6c99d
3 changed files with 123 additions and 96 deletions

View File

@ -1,6 +1,8 @@
--- /dev/null 2008-03-23 13:41:46.072650180 +0100
+++ gdb-6.3/gdb/testsuite/gdb.base/focus-cmd-prev.exp 2008-03-23 23:46:45.000000000 +0100
@@ -0,0 +1,25 @@
Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.base/focus-cmd-prev.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.12.50.20170226/gdb/testsuite/gdb.base/focus-cmd-prev.exp 2017-03-02 09:39:14.508461085 +0100
@@ -0,0 +1,43 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
@ -24,5 +26,23 @@
+gdb_exit
+gdb_start
+
+gdb_test "focus cmd"
+gdb_test "focus prev"
+# Do not use gdb_test or \r\n there since:
+# commit d7e747318f4d04af033f16325f9b6d74f67079ec
+# Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
+
+gdb_test_no_output "set width 80"
+gdb_test_no_output "set height 40"
+
+set test "focus cmd"
+gdb_test_multiple $test $test {
+ -re "$gdb_prompt $" {
+ pass $test
+ }
+}
+
+set test "focus prev"
+gdb_test_multiple $test $test {
+ -re "$gdb_prompt $" {
+ pass $test
+ }
+}

View File

@ -26,11 +26,11 @@ dbfd7140bf4c0500d1f5d192be781f83f78f7922
gdb/value.h | 2 +
23 files changed, 1242 insertions(+), 183 deletions(-)
Index: gdb-7.12.50.20170207/gdb/dwarf2loc.c
Index: gdb-7.12.50.20170226/gdb/dwarf2loc.c
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/dwarf2loc.c 2017-02-07 20:47:32.161026214 +0100
+++ gdb-7.12.50.20170207/gdb/dwarf2loc.c 2017-02-07 20:47:33.115033460 +0100
@@ -2542,11 +2542,14 @@
--- gdb-7.12.50.20170226.orig/gdb/dwarf2loc.c 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/dwarf2loc.c 2017-03-01 22:38:05.803017176 +0100
@@ -2607,11 +2607,14 @@
/* See dwarf2loc.h. */
int
@ -47,7 +47,7 @@ Index: gdb-7.12.50.20170207/gdb/dwarf2loc.c
if (prop == NULL)
return 0;
@@ -2570,7 +2573,7 @@
@@ -2635,7 +2638,7 @@
*value = value_as_address (val);
}
@ -56,7 +56,7 @@ Index: gdb-7.12.50.20170207/gdb/dwarf2loc.c
}
}
break;
@@ -2592,7 +2595,7 @@
@@ -2657,7 +2660,7 @@
if (!value_optimized_out (val))
{
*value = value_as_address (val);
@ -65,7 +65,7 @@ Index: gdb-7.12.50.20170207/gdb/dwarf2loc.c
}
}
}
@@ -2600,8 +2603,8 @@
@@ -2665,8 +2668,8 @@
case PROP_CONST:
*value = prop->data.const_val;
@ -76,7 +76,7 @@ Index: gdb-7.12.50.20170207/gdb/dwarf2loc.c
case PROP_ADDR_OFFSET:
{
struct dwarf2_property_baton *baton
@@ -2622,11 +2625,38 @@
@@ -2687,11 +2690,38 @@
val = value_at (baton->offset_info.type,
pinfo->addr + baton->offset_info.offset);
*value = value_as_address (val);
@ -117,11 +117,11 @@ Index: gdb-7.12.50.20170207/gdb/dwarf2loc.c
}
/* See dwarf2loc.h. */
Index: gdb-7.12.50.20170207/gdb/dwarf2loc.h
Index: gdb-7.12.50.20170226/gdb/dwarf2loc.h
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/dwarf2loc.h 2017-02-07 20:47:32.162026222 +0100
+++ gdb-7.12.50.20170207/gdb/dwarf2loc.h 2017-02-07 20:47:33.115033460 +0100
@@ -138,6 +138,12 @@
--- gdb-7.12.50.20170226.orig/gdb/dwarf2loc.h 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/dwarf2loc.h 2017-03-01 22:38:05.803017176 +0100
@@ -140,6 +140,12 @@
struct property_addr_info *addr_stack,
CORE_ADDR *value);
@ -134,11 +134,11 @@ Index: gdb-7.12.50.20170207/gdb/dwarf2loc.h
/* A helper for the compiler interface that compiles a single dynamic
property to C code.
Index: gdb-7.12.50.20170207/gdb/dwarf2read.c
Index: gdb-7.12.50.20170226/gdb/dwarf2read.c
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/dwarf2read.c 2017-02-07 20:47:32.168026268 +0100
+++ gdb-7.12.50.20170207/gdb/dwarf2read.c 2017-02-07 20:47:33.120033498 +0100
@@ -14924,7 +14924,7 @@
--- gdb-7.12.50.20170226.orig/gdb/dwarf2read.c 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/dwarf2read.c 2017-03-01 22:38:05.807017204 +0100
@@ -15178,7 +15178,7 @@
struct type *base_type, *orig_base_type;
struct type *range_type;
struct attribute *attr;
@ -147,7 +147,7 @@ Index: gdb-7.12.50.20170207/gdb/dwarf2read.c
int low_default_is_valid;
int high_bound_is_count = 0;
const char *name;
@@ -14944,7 +14944,9 @@
@@ -15198,7 +15198,9 @@
low.kind = PROP_CONST;
high.kind = PROP_CONST;
@ -157,7 +157,7 @@ Index: gdb-7.12.50.20170207/gdb/dwarf2read.c
/* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow
omitting DW_AT_lower_bound. */
@@ -14977,6 +14979,13 @@
@@ -15231,6 +15233,13 @@
break;
}
@ -171,7 +171,7 @@ Index: gdb-7.12.50.20170207/gdb/dwarf2read.c
attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
if (attr)
attr_to_dynamic_prop (attr, die, cu, &low);
@@ -15053,7 +15062,7 @@
@@ -15307,7 +15316,7 @@
&& !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask))
high.data.const_val |= negative_mask;
@ -180,10 +180,10 @@ Index: gdb-7.12.50.20170207/gdb/dwarf2read.c
if (high_bound_is_count)
TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1;
Index: gdb-7.12.50.20170207/gdb/eval.c
Index: gdb-7.12.50.20170226/gdb/eval.c
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/eval.c 2017-02-07 20:47:32.170026283 +0100
+++ gdb-7.12.50.20170207/gdb/eval.c 2017-02-07 20:47:33.121033506 +0100
--- gdb-7.12.50.20170226.orig/gdb/eval.c 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/eval.c 2017-03-01 22:38:05.808017211 +0100
@@ -379,29 +379,325 @@
return index;
}
@ -608,10 +608,10 @@ Index: gdb-7.12.50.20170207/gdb/eval.c
if ((TYPE_CODE (array_type) != TYPE_CODE_ARRAY))
error (_("Can't get dimensions for a non-array type"));
Index: gdb-7.12.50.20170207/gdb/expprint.c
Index: gdb-7.12.50.20170226/gdb/expprint.c
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/expprint.c 2017-02-07 20:47:32.170026283 +0100
+++ gdb-7.12.50.20170207/gdb/expprint.c 2017-02-07 20:47:33.121033506 +0100
--- gdb-7.12.50.20170226.orig/gdb/expprint.c 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/expprint.c 2017-03-01 22:38:05.809017218 +0100
@@ -568,12 +568,10 @@
*pos += 2;
@ -662,10 +662,10 @@ Index: gdb-7.12.50.20170207/gdb/expprint.c
elt = dump_subexp (exp, stream, elt);
}
break;
Index: gdb-7.12.50.20170207/gdb/expression.h
Index: gdb-7.12.50.20170226/gdb/expression.h
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/expression.h 2017-02-07 20:47:32.170026283 +0100
+++ gdb-7.12.50.20170207/gdb/expression.h 2017-02-07 20:47:33.121033506 +0100
--- gdb-7.12.50.20170226.orig/gdb/expression.h 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/expression.h 2017-03-01 22:38:05.809017218 +0100
@@ -154,17 +154,17 @@
struct ui_file *, char *);
extern void dump_prefix_expression (struct expression *, struct ui_file *);
@ -693,10 +693,10 @@ Index: gdb-7.12.50.20170207/gdb/expression.h
};
#endif /* !defined (EXPRESSION_H) */
Index: gdb-7.12.50.20170207/gdb/f-exp.y
Index: gdb-7.12.50.20170226/gdb/f-exp.y
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/f-exp.y 2017-02-07 20:47:32.171026290 +0100
+++ gdb-7.12.50.20170207/gdb/f-exp.y 2017-02-07 20:47:33.121033506 +0100
--- gdb-7.12.50.20170226.orig/gdb/f-exp.y 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/f-exp.y 2017-03-01 22:38:05.809017218 +0100
@@ -254,31 +254,63 @@
arglist : arglist ',' exp %prec ABOVE_COMMA
@ -766,10 +766,10 @@ Index: gdb-7.12.50.20170207/gdb/f-exp.y
write_exp_elt_opcode (pstate, OP_RANGE); }
;
Index: gdb-7.12.50.20170207/gdb/f-valprint.c
Index: gdb-7.12.50.20170226/gdb/f-valprint.c
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/f-valprint.c 2017-02-07 20:47:32.171026290 +0100
+++ gdb-7.12.50.20170207/gdb/f-valprint.c 2017-02-07 20:47:33.122033513 +0100
--- gdb-7.12.50.20170226.orig/gdb/f-valprint.c 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/f-valprint.c 2017-03-01 22:38:05.809017218 +0100
@@ -121,8 +121,14 @@
if (nss != ndimensions)
@ -786,10 +786,10 @@ Index: gdb-7.12.50.20170207/gdb/f-valprint.c
for (i = lowerbound;
(i < upperbound + 1 && (*elts) < options->print_max);
Index: gdb-7.12.50.20170207/gdb/gdbtypes.c
Index: gdb-7.12.50.20170226/gdb/gdbtypes.c
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/gdbtypes.c 2017-02-07 20:47:32.173026306 +0100
+++ gdb-7.12.50.20170207/gdb/gdbtypes.c 2017-02-07 20:47:33.123033521 +0100
--- gdb-7.12.50.20170226.orig/gdb/gdbtypes.c 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/gdbtypes.c 2017-03-01 22:38:05.810017224 +0100
@@ -836,7 +836,8 @@
struct type *
create_range_type (struct type *result_type, struct type *index_type,
@ -898,10 +898,10 @@ Index: gdb-7.12.50.20170207/gdb/gdbtypes.c
TYPE_RANGE_DATA (static_range_type)->flag_bound_evaluated = 1;
return static_range_type;
}
Index: gdb-7.12.50.20170207/gdb/gdbtypes.h
Index: gdb-7.12.50.20170226/gdb/gdbtypes.h
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/gdbtypes.h 2017-02-07 20:47:32.173026306 +0100
+++ gdb-7.12.50.20170207/gdb/gdbtypes.h 2017-02-07 20:47:33.123033521 +0100
--- gdb-7.12.50.20170226.orig/gdb/gdbtypes.h 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/gdbtypes.h 2017-03-01 22:38:05.811017231 +0100
@@ -550,6 +550,10 @@
struct dynamic_prop high;
@ -921,7 +921,7 @@ Index: gdb-7.12.50.20170207/gdb/gdbtypes.h
} flds_bnds;
/* * Slot to point to additional language-specific fields of this
@@ -1224,6 +1227,15 @@
@@ -1222,6 +1225,15 @@
TYPE_RANGE_DATA(range_type)->high.kind
#define TYPE_LOW_BOUND_KIND(range_type) \
TYPE_RANGE_DATA(range_type)->low.kind
@ -937,7 +937,7 @@ Index: gdb-7.12.50.20170207/gdb/gdbtypes.h
/* Property accessors for the type data location. */
#define TYPE_DATA_LOCATION(thistype) \
@@ -1258,6 +1270,9 @@
@@ -1256,6 +1268,9 @@
TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
#define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \
TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
@ -947,7 +947,7 @@ Index: gdb-7.12.50.20170207/gdb/gdbtypes.h
#define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \
(TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype))))
@@ -1767,6 +1782,7 @@
@@ -1765,6 +1780,7 @@
extern struct type *create_range_type (struct type *, struct type *,
const struct dynamic_prop *,
@ -955,10 +955,10 @@ Index: gdb-7.12.50.20170207/gdb/gdbtypes.h
const struct dynamic_prop *);
extern struct type *create_array_type (struct type *, struct type *,
Index: gdb-7.12.50.20170207/gdb/parse.c
Index: gdb-7.12.50.20170226/gdb/parse.c
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/parse.c 2017-02-07 20:47:32.174026313 +0100
+++ gdb-7.12.50.20170207/gdb/parse.c 2017-02-07 20:47:33.124033529 +0100
--- gdb-7.12.50.20170226.orig/gdb/parse.c 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/parse.c 2017-03-01 22:38:05.811017231 +0100
@@ -1007,22 +1007,20 @@
case OP_RANGE:
@ -993,10 +993,10 @@ Index: gdb-7.12.50.20170207/gdb/parse.c
break;
Index: gdb-7.12.50.20170207/gdb/rust-exp.y
Index: gdb-7.12.50.20170226/gdb/rust-exp.y
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/rust-exp.y 2017-02-07 20:47:32.174026313 +0100
+++ gdb-7.12.50.20170207/gdb/rust-exp.y 2017-02-07 20:47:33.124033529 +0100
--- gdb-7.12.50.20170226.orig/gdb/rust-exp.y 2017-03-01 22:37:44.045867416 +0100
+++ gdb-7.12.50.20170226/gdb/rust-exp.y 2017-03-01 22:38:05.811017231 +0100
@@ -2409,23 +2409,17 @@
case OP_RANGE:
@ -1024,11 +1024,11 @@ Index: gdb-7.12.50.20170207/gdb/rust-exp.y
}
write_exp_elt_opcode (state, OP_RANGE);
write_exp_elt_longcst (state, kind);
Index: gdb-7.12.50.20170207/gdb/rust-lang.c
Index: gdb-7.12.50.20170226/gdb/rust-lang.c
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/rust-lang.c 2017-02-07 20:47:32.175026321 +0100
+++ gdb-7.12.50.20170207/gdb/rust-lang.c 2017-02-07 20:47:33.125033536 +0100
@@ -1315,9 +1315,9 @@
--- gdb-7.12.50.20170226.orig/gdb/rust-lang.c 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/rust-lang.c 2017-03-01 22:38:05.812017238 +0100
@@ -1314,9 +1314,9 @@
kind = (enum range_type) longest_to_int (exp->elts[*pos + 1].longconst);
*pos += 3;
@ -1040,7 +1040,7 @@ Index: gdb-7.12.50.20170207/gdb/rust-lang.c
high = evaluate_subexp (NULL_TYPE, exp, pos, noside);
if (noside == EVAL_SKIP)
@@ -1406,7 +1406,7 @@
@@ -1405,7 +1405,7 @@
*low = 0;
*high = 0;
@ -1049,7 +1049,7 @@ Index: gdb-7.12.50.20170207/gdb/rust-lang.c
if (TYPE_NFIELDS (type) == 0)
return;
@@ -1414,15 +1414,14 @@
@@ -1413,15 +1413,14 @@
i = 0;
if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0)
{
@ -1067,7 +1067,7 @@ Index: gdb-7.12.50.20170207/gdb/rust-lang.c
*high = value_as_long (value_field (range, i));
}
}
@@ -1437,7 +1436,7 @@
@@ -1436,7 +1435,7 @@
struct type *rhstype;
LONGEST low, high_bound;
/* Initialized to appease the compiler. */
@ -1076,7 +1076,7 @@ Index: gdb-7.12.50.20170207/gdb/rust-lang.c
LONGEST high = 0;
int want_slice = 0;
@@ -1499,7 +1498,7 @@
@@ -1498,7 +1497,7 @@
error (_("Cannot subscript non-array type"));
if (want_slice
@ -1085,7 +1085,7 @@ Index: gdb-7.12.50.20170207/gdb/rust-lang.c
low = low_bound;
if (low < 0)
error (_("Index less than zero"));
@@ -1517,7 +1516,7 @@
@@ -1516,7 +1515,7 @@
CORE_ADDR addr;
struct value *addrval, *tem;
@ -1094,10 +1094,10 @@ Index: gdb-7.12.50.20170207/gdb/rust-lang.c
high = high_bound;
if (high < 0)
error (_("High index less than zero"));
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/static-arrays.exp
Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/static-arrays.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/static-arrays.exp 2017-02-07 20:47:33.125033536 +0100
+++ gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/static-arrays.exp 2017-03-01 22:38:05.812017238 +0100
@@ -0,0 +1,421 @@
+# Copyright 2015 Free Software Foundation, Inc.
+#
@ -1520,10 +1520,10 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/static-arrays.exp
+gdb_test "print ar1\(3:7\) = 42" \
+ "Invalid cast." \
+ "Assignment of value to subarray"
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/static-arrays.f90
Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/static-arrays.f90
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/static-arrays.f90 2017-02-07 20:47:33.125033536 +0100
+++ gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/static-arrays.f90 2017-03-01 22:38:05.812017238 +0100
@@ -0,0 +1,55 @@
+! Copyright 2015 Free Software Foundation, Inc.
+!
@ -1580,10 +1580,10 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/static-arrays.f90
+program testprog
+ call sub
+end
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-ptype.exp
Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/vla-ptype.exp
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.fortran/vla-ptype.exp 2017-02-07 20:47:32.176026328 +0100
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-ptype.exp 2017-02-07 20:47:33.125033536 +0100
--- gdb-7.12.50.20170226.orig/gdb/testsuite/gdb.fortran/vla-ptype.exp 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/vla-ptype.exp 2017-03-01 22:38:05.813017245 +0100
@@ -98,3 +98,7 @@
gdb_test "ptype vla2(5, 45, 20)" \
"no such vector element \\\(vector not allocated\\\)" \
@ -1592,10 +1592,10 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-ptype.exp
+gdb_breakpoint [gdb_get_line_number "vla1-neg-bounds"]
+gdb_continue_to_breakpoint "vla1-neg-bounds"
+gdb_test "ptype vla1" "type = $real \\(-2:1,-5:4,-3:-1\\)" "ptype vla1 negative bounds"
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-sizeof.exp
Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/vla-sizeof.exp
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.fortran/vla-sizeof.exp 2017-02-07 20:47:32.176026328 +0100
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-sizeof.exp 2017-02-07 20:47:33.126033544 +0100
--- gdb-7.12.50.20170226.orig/gdb/testsuite/gdb.fortran/vla-sizeof.exp 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/vla-sizeof.exp 2017-03-01 22:38:05.813017245 +0100
@@ -44,3 +44,7 @@
gdb_breakpoint [gdb_get_line_number "pvla-associated"]
gdb_continue_to_breakpoint "pvla-associated"
@ -1604,10 +1604,10 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-sizeof.exp
+gdb_breakpoint [gdb_get_line_number "vla1-neg-bounds"]
+gdb_continue_to_breakpoint "vla1-neg-bounds"
+gdb_test "print sizeof(vla1)" " = 480" "print sizeof vla1 negative bounds"
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-stride.exp
Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/vla-stride.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-stride.exp 2017-02-07 20:47:33.126033544 +0100
+++ gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/vla-stride.exp 2017-03-01 22:38:05.813017245 +0100
@@ -0,0 +1,44 @@
+# Copyright 2016 Free Software Foundation, Inc.
+
@ -1653,10 +1653,10 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-stride.exp
+gdb_continue_to_breakpoint "single-element"
+gdb_test "print pvla" " = \\\(5\\\)" "print single-element"
+gdb_test "print pvla(1)" " = 5" "print one single-element"
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-stride.f90
Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/vla-stride.f90
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-stride.f90 2017-02-07 20:47:33.126033544 +0100
+++ gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/vla-stride.f90 2017-03-01 22:38:05.813017245 +0100
@@ -0,0 +1,29 @@
+! Copyright 2016 Free Software Foundation, Inc.
+!
@ -1687,10 +1687,10 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-stride.f90
+
+ pvla => null() ! single-element
+end program vla_stride
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla.f90
Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/vla.f90
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.fortran/vla.f90 2017-02-07 20:47:32.176026328 +0100
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla.f90 2017-02-07 20:47:33.126033544 +0100
--- gdb-7.12.50.20170226.orig/gdb/testsuite/gdb.fortran/vla.f90 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/testsuite/gdb.fortran/vla.f90 2017-03-01 22:38:05.813017245 +0100
@@ -54,4 +54,14 @@
allocate (vla3 (2,2)) ! vla2-deallocated
@ -1706,10 +1706,10 @@ Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla.f90
+ l = allocated(vla1)
+
end program vla
Index: gdb-7.12.50.20170207/gdb/valarith.c
Index: gdb-7.12.50.20170226/gdb/valarith.c
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/valarith.c 2017-02-07 20:47:33.126033544 +0100
+++ gdb-7.12.50.20170207/gdb/valarith.c 2017-02-07 20:48:29.114458788 +0100
--- gdb-7.12.50.20170226.orig/gdb/valarith.c 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/valarith.c 2017-03-01 22:38:05.813017245 +0100
@@ -193,10 +193,16 @@
struct type *array_type = check_typedef (value_type (array));
struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
@ -1729,11 +1729,11 @@ Index: gdb-7.12.50.20170207/gdb/valarith.c
{
if (type_not_associated (array_type))
error (_("no such vector element (vector not associated)"));
Index: gdb-7.12.50.20170207/gdb/valops.c
Index: gdb-7.12.50.20170226/gdb/valops.c
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/valops.c 2017-02-07 20:47:33.127033551 +0100
+++ gdb-7.12.50.20170207/gdb/valops.c 2017-02-07 20:50:24.909338275 +0100
@@ -3782,55 +3782,190 @@
--- gdb-7.12.50.20170226.orig/gdb/valops.c 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/valops.c 2017-03-01 23:27:02.466929147 +0100
@@ -3782,55 +3782,194 @@
struct value *
value_slice (struct value *array, int lowbound, int length)
{
@ -1865,9 +1865,7 @@ Index: gdb-7.12.50.20170207/gdb/valops.c
- slice_range_type);
- TYPE_CODE (slice_type) = TYPE_CODE (array_type);
+ struct type *element_type;
- if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
- slice = allocate_value_lazy (slice_type);
+
+ /* When both CALL_COUNT and STRIDE_LENGTH equal 1, we can use the legacy
+ code for subarrays. */
+ if (call_count == 1 && stride_length == 1)
@ -1889,7 +1887,9 @@ Index: gdb-7.12.50.20170207/gdb/valops.c
+ value_embedded_offset (array) + elt_offs,
+ elt_size * longest_to_int (length));
+ }
+
- if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
- slice = allocate_value_lazy (slice_type);
+ }
+ /* With a CALL_COUNT or STRIDE_LENGTH are greater than 1 we are working
+ on a range of ranges. So we copy the relevant elements into the
@ -1947,7 +1947,11 @@ Index: gdb-7.12.50.20170207/gdb/valops.c
- set_value_component_location (slice, array);
- set_value_offset (slice, value_offset (array) + offset);
+ set_value_component_location (v, array);
+ VALUE_REGNUM (v) = VALUE_REGNUM (array);
+ if (VALUE_LVAL (v) == lval_register)
+ {
+ VALUE_REGNUM (v) = VALUE_REGNUM (array);
+ VALUE_NEXT_FRAME_ID (v) = VALUE_NEXT_FRAME_ID (array);
+ }
+ set_value_offset (v, value_offset (array) + elt_offs);
}
@ -1956,10 +1960,10 @@ Index: gdb-7.12.50.20170207/gdb/valops.c
}
/* Create a value for a FORTRAN complex number. Currently most of the
Index: gdb-7.12.50.20170207/gdb/value.h
Index: gdb-7.12.50.20170226/gdb/value.h
===================================================================
--- gdb-7.12.50.20170207.orig/gdb/value.h 2017-02-07 20:47:32.178026343 +0100
+++ gdb-7.12.50.20170207/gdb/value.h 2017-02-07 20:47:33.128033559 +0100
--- gdb-7.12.50.20170226.orig/gdb/value.h 2017-03-01 22:37:44.046867423 +0100
+++ gdb-7.12.50.20170226/gdb/value.h 2017-03-01 22:38:05.815017259 +0100
@@ -1106,6 +1106,8 @@
extern struct value *value_slice (struct value *, int, int);

View File

@ -26,7 +26,7 @@ Version: 7.12.50.%{snapsrc}
# 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: 3%{?dist}
Release: 4%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
Group: Development/Debuggers
@ -1578,6 +1578,9 @@ then
fi
%changelog
* Thu Mar 2 2017 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12.50.20170226-4.fc26
- Fix gdb-vla-intel-fortran-strides.patch rebase regression.
* Tue Feb 28 2017 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12.50.20170226-3.fc26
- Fix gdb.arch/amd64-entry-value-paramref.exp rebase regression.