Initial Fortran VLA support.

gdb/

2013-08-12  Keven Boell  <keven.boell@intel.com>

	* value.c (set_value_component_location): For dynamic
	types compute the address of the component value
	location in sub range types based on the location of
	the sub range type, if not being an internal GDB variable
	or parts of it.  (value_fetch_lazy): Set computed address
	to read value from memory.

Change-Id: I57478252f70632e4fd599a6a4b6c11284ece2051
Signed-off-by: Keven Boell <keven.boell@intel.com>
Resolve dynamic data location to static value.

gdb/

2013-08-12  Keven Boell  <keven.boell@intel.com>

	* gdbtypes.c (resolve_dynamic_values): Resolve
	dynamic data location to static value.

Change-Id: I39d59bd664b7dda5f86ce2114934f29db6e04dd9
Signed-off-by: Keven Boell <keven.boell@intel.com>
Fixed wrong indentation.

gdb/

2013-08-12  Keven Boell  <keven.boell@intel.com>

	* gdbtypes.c (resolve_dynamic_values): fixed wrong
	indentation of some lines.

Change-Id: I7a3e7a346c393cd9cb2e7373bccdec7a3e8675eb
Signed-off-by: Keven Boell <keven.boell@intel.com>
Add check for invalid data location

gdb/

2013-08-12  Keven Boell  <keven.boell@intel.com>

	* dwarf2loc.h (dwarf2_address_data_valid): New function.
	* dwarf2loc.c (dwarf2_address_data_valid): New function.
	* value.c (value_fetch_lazy): Add check for invalid
	data location.

Change-Id: Ie7f61142ab0b36afb7e3f9d8a1f5ef066762fdef
Signed-off-by: Keven Boell <keven.boell@intel.com>
Fixed wrong indentation.

gdb/

2013-08-13  Keven Boell  <keven.boell@intel.com>

	* gdbtypes.c (check_typedef): fixed wrong
	indentation of some lines. Replace tabs with
	spaces.

Change-Id: Id957946e54187dcd116dcbbb6141d2afe162a398
Signed-off-by: Keven Boell <keven.boell@intel.com>
Resolve dynamic attributes of target type

gdb/

2013-08-13  Keven Boell  <keven.boell@intel.com>

	* gdbtypes.c (resolve_dynamic_values): Add recursive
	resolving of dynamic attributes to static ones for target
	types, which enables multidimensional Fortran arrays to work
	with the current implementation. Otherwise the bounds are
	still dynamic in later check_typedef calls and thus the size
	cannot be calculated correctly, which leads to wrong output
	of the VLA (wrong values, wrong dimension).

Change-Id: I6748ae6c2c92854cc262a53efffa603a3998e66a
Signed-off-by: Keven Boell <keven.boell@intel.com>
Fix for ICC VLA dwarf representation

gdb/

2013-08-14  Keven Boell  <keven.boell@intel.com>

	* value.h (resolve_value_type): New function.
	* value.c (resolve_value_type): New function.
	(value_from_contents_and_address): Added call to
	resolve_value_type.
	* findvar.c (default_read_var_value): Added call
	to resolve_value_type to resolve type of value.

Change-Id: Ida433689903888c674875d87312f0b955272c92a
Signed-off-by: Keven Boell <keven.boell@intel.com>
Added register reading.

gdb/

2013-08-16  Keven Boell  <keven.boell@intel.com>

	* dwarf2loc.c (dwarf2_locexpr_baton_eval): Read from
	register based what was givent by the last element on
	the stack.

Change-Id: I494fd6d21d4457a8f70a822ba961bd2106ee4be4
Signed-off-by: Keven Boell <keven.boell@intel.com>
Refactored dynamic type length calculation.

gdb/

2013-08-16  Keven Boell  <keven.boell@intel.com>

	* gdbtypes.h (get_type_length): New function.
	* gdbtypes.c (check_typedef): Moved dynamic type
	size calculation to function.
	(get_type_length): New function.

Change-Id: I79156b2a93090151e25dbe7af14521af5f99d780
Signed-off-by: Keven Boell <keven.boell@intel.com>
Support for associated flag and emit a message accordingly

gdb/

2013-08-19  Keven Boell  <keven.boell@intel.com>

	* dwarf2loc.c (dwarf2_locexpr_baton_eval): Added check
	for associated flag.
	* gdbtypes.c (resolve_dynamic_values): Added associated
	flag for type resolving.
	(get_type_length): Added check
	for valid types.
	* valprint.c (valprint_check_validity): Emit not associated
	message.
	(val_print_not_associated): New function.

Change-Id: Ia2b2d2994bfbc775f6bcdcb424fba5af4b73c8e9
Signed-off-by: Keven Boell <keven.boell@intel.com>
Support for associated flag and emit a message accordingly

gdb/

2013-08-19  Keven Boell  <keven.boell@intel.com>

	* dwarf2loc.c (dwarf2_locexpr_baton_eval): Added check
	for associated flag.
	* gdbtypes.c (resolve_dynamic_values): Added associated
	flag for type resolving.
	(get_type_length): Added check
	for valid types.
	* valprint.c (valprint_check_validity): Emit not associated
	message.
	(val_print_not_associated): New function.

Change-Id: Ia2b2d2994bfbc775f6bcdcb424fba5af4b73c8e9
Signed-off-by: Keven Boell <keven.boell@intel.com>
Added allocated/associated message to type print in Fortran.

gdb/

2013-08-20  Keven Boell  <keven.boell@intel.com>

	* f-typeprint.c (f_print_type): Emit not allocated
	and not associated messages accordingly.
	* valprint.h (val_print_not_allocated): Moved
	prototype of function to header and made extern instead
	of static.  (val_print_not_associated): Moved
	prototype of function to header and made extern instead
	of static.
	* valprint.c (val_print_not_allocated): Turned static
	function to extern.  (val_print_not_associated): Turned
	static function to extern.

Change-Id: Idad57ca35e9994505e60ee139666ab67fa35dba8
Signed-off-by: Keven Boell <keven.boell@intel.com>
Emit nicer message when VLA element is not allocated/associated

gdb/

2013-08-20  Keven Boell  <keven.boell@intel.com>

	* valarith.c (value_subscripted_rvalue): Added nicer
	message when trying to access sub-script of not
	allocated/associated VLA.

Change-Id: I1c900c8e4483311392ea87f610b2f0108ffc5948
Signed-off-by: Keven Boell <keven.boell@intel.com>
Adapted test regular expressions to new message output.

gdb/testsuite/gdb.fortran

2013-08-20  Keven Boell  <keven.boell@intel.com>

	* vla-alloc-assoc.exp: Adapted regex.
	* vla-history.exp: Adapted regex.
	* vla-ptype.exp: Adapted regex.
	* vla-type.exp: Adapted regex.
	* vla-value.exp: Adapted regex.

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

gdb/

2013-08-23  Keven Boell  <keven.boell@intel.com>

	* gdbtypes.c (resolve_dynamic_values): Removed
	dynamic property check after resolved type
	creation. Otherwhise nested dynamic types will
	not get resolved correctly, which leads to wrong
	attributes.
	(check_typedef): Changed condition
	for variable length creation to array and string
	types.

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