vla: changed string length semantic.

This patch changes the semantic of the Dwarf string length
attribute to reflect the standard. This serves as pre-work
to get variable strings in Fortran work.

2013-10-25  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

	* dwarf2read.c (read_tag_string_type): changed
	semantic of DW_AT_string_length to be able to
	handle Dwarf blocks as well. Support for
	DW_AT_byte_length added to get correct length
	if specified in combination with
	DW_AT_string_length.
	* dwarf2read.c (attr_to_locexprbaton): added
	functionality to add Dwarf operators to baton
	data attribute.

Change-Id: Icf27ab9f6a2aa763fbc366e265752e19102a9550
Signed-off-by: Keven Boell <keven.boell@intel.com>
vla: get Fortran dynamic strings working.

2013-08-23  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

	* gdbtypes.c (resolve_dynamic_values): Add string
	conditions.
	(is_dynamic_type): Follow pointer if detected a
	string type, as Fortran strings are represented
	as pointers to strings internally.

Change-Id: I24e1a869884c7d090e78c9633d657a675afb3c83
Signed-off-by: Keven Boell <keven.boell@intel.com>

Conflicts:

	gdb/gdbtypes.c
vla: add stride support fortran arrays.

2013-11-05  Sanimir Agovic  <sanimir.agovic@intel.com>
            Keven Boell  <keven.boell@intel.com>

	* dwarf2read.c (read_subrange_type):
	* gdbtypes.c (create_range_type_1): Add stride parameter.
	(create_range_type): Pass default stride parameter.
	(resolve_dynamic_values_1): Evaluate stride baton.
	* gdbtypes.h (TYPE_BYTE_STRIDE): New macro.
	(TYPE_BYTE_STRIDE_BLOCK): New macro.
	(TYPE_BYTE_STRIDE_LOCLIST): New macro.
	(TYPE_BYTE_STRIDE_KIND): New macro.
	(create_range_type_1): Add stride parameter.
	* valarith.c (value_subscripted_rvalue): Use stride.

Change-Id: I695b726b83196cd9dd35c561d8ace8bfc1760c71

Conflicts:

	gdb/gdbtypes.c
	gdb/gdbtypes.h
test: basic tests for VLA evaluation in Fortran.

2013-10-28  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.fortran/:

	* vla.f90: Test source file for testing
	evaluations of VLA's.
	* vla-value.exp: Tests ensure that values
	of Fortran VLA's can be evaluated correctly
	in various ways.

Change-Id: I98cfcb3955ba4de66c4e35a1bf99d69ae666bde9
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: evaluate Fortran VLA's of types.

2013-10-28  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.fortran/:

	* vla-type.exp: Tests ensure that VLA's of various
	Fortran datatypes can be evaluated correctly.
	* vla-type.f90: Test source file for testing Fortran
	datatypes used in VLA's.

Change-Id: Iae888b111977d128183485c4b9ab083aa9f06b24
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: evaluate VLA's using Fortran datatypes.

2013-10-28  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.fortran/:

	* vla-datatypes.f90: Test source file for checking
	Fortran primitives used in VLA's.
	* vla-datatypes.exp: Tests ensure that Fortran
	primitives can be evaluated correctly when used as a VLA.

Change-Id: Id3dafd239f03ea391b140a9d6a2b05274a61c535
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: VLA's passed to subroutines.

Tests for VLA's passed to subroutines and handled
in different ways inside the routine.

2013-10-28  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.fortran/:

	* vla-sub.f90: Test source file for VLA's in
	subroutines.
	* vla-ptype-sub.exp: Check ptype of VLA's in
	subroutine.
	* vla-value-sub-arbitrary.exp: Check values of
	VLA's passed to subroutine and handled as
	arbitrary VLA in subroutine.
	* vla-value-sub-finish.exp: Check value of VLA
	when going the one up using finish.
	* vla-value-sub.exp: Check value of VLA's in
	subroutine.

Change-Id: I18f5f2bb3d365e61f0fe9af9b96f3c3e97c53360
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: correct ptype of VLA's in Fortran.

2013-10-28  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.fortran/:

	* vla-ptype.exp: Tests ensure that the ptype
	of VLA's in Fortran can be printed in GDB
	correctly.

Change-Id: I7c8a0d04752e0d029df0b4e54b9b4efdad5faef0
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: evaluating allocated and de-allocated VLA's.

2013-10-28  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.fortran/:

	* vla-alloc-assoc.exp: Tests ensure that allocated
	and de-allocated VLA's can be evaluated and do not
	crash.

Change-Id: I9b2daeffbe5d24c960a9e6fade8995df2334d101
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: VLA's passed to functions.

Tests for VLA's passed to Fortran functions and returned
from Fortran functions.

2013-10-28  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.fortran/:

	* vla-func.f90: Test source file for VLA usage
	in Fortran functions.
	* vla-func.exp: Tests ensure that VLA's can be
	handled in Fortran functions correctly.

Change-Id: I75810ed35b7785317429ca5b23eac31a453d12ee
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: accessing VLA history values.

2013-10-28  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.fortran/:

	* vla-history.exp: tests if the history values
        of vla prints can be accessed and printed again.

Change-Id: I07fbe5af45410a02ef270d64250156a3e199d272
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: dynamic string evaluations.

2013-10-28  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.fortran/:

	* vla-strings.f90: Test source file for dynamic
	Fortran strings.
	* vla-strings.exp: Tests various dynamic string
	evaluations.

Change-Id: I1705819a8ff19f4647a918ceb1ab1429cceafe2a
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: basic MI test for the Fortran VLA support.

2013-10-28  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.mi/:

	* mi-vla-fortran.exp: Tests VLA evaluations
	using MI protocol.
	* vla.f90: Test source file using Fortran VLA's.

Change-Id: Iefa47c98a5d34aae4a9e63964be2446136c915ca
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: test sizeof for dynamic fortran arrays.

2013-11-05  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/gdb.fortran/:

	* vla-sizeof.exp: Tests sizeof output of
	dynamic arrays in various states.

Change-Id: Ic6014c8fc943cbf5d3b6d76ae387999ea3abff4d
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: stride support for dynamic arrays.

2013-11-05  Sanimir Agovic  <sanimir.agovic@intel.com>
            Keven Boell  <keven.boell@intel.com>

testsuite/gdb.fortran/:

	* vla-stride.exp: New file.
	* vla-stride.f90: New file.

Change-Id: Ia045af01ed5c2b7eecd80f09a138c0f3189df106