test: disable array subscripts with unspecified bound aka ":"

2013-09-17  Sanimir Agovic  <sanimir.agovic@intel.com>

	* vla-func.exp: Comment out array subscripts with unspecified bounds
	specifier.

Change-Id: I8df1e3813291e18bee89fefaf963e34a2d3ef32b
test: remove tests relying on allocate/associate heuristic

2013-09-17  Sanimir Agovic  <sanimir.agovic@intel.com>

	* vla-strings.exp: Comment out allocate/associate tests.

Change-Id: Ia3246ba839f63347994deb2948b904d4d8f97cc0
test: allocated/associated predicates do not work before variable assignment.

2013-09-17  Sanimir Agovic  <sanimir.agovic@intel.com>

	* vla-alloc-assoc.exp: Remove allocated tests as they do not work
	before the variable is initialized.

Change-Id: If7406cbf26bc83d9b64b622e6cc9bb4251faa369
test: make array-element.exp pass

Test fails as the breakpoint set on the continue statement gets bound to
the next line. Unfortunately this line is bound after the loop body and
thus will hit only once.

2013-09-17  Sanimir Agovic  <sanimir.agovic@intel.com>

	* array-element.f: Move breakpoint marker after the array assignment.
	* array-element.exp: Make test messages uniqe. Workaround
	debugger/compilerbug as breakpoint got bound to the wrong
	line/address.

Change-Id: Ia543a4a188f32937e8f388b9f3f9af52191fdf4d
history: preserve printing history state

2013-09-17  Sanimir Agovic  <sanimir.agovic@intel.com>

	* valprint.c (value_check_printable): Check for allocated/associated
	predicates.

Change-Id: I2f6bce8f68e9005dd5868611159788ee305afff4
type: allow types to be copied as often as needed.

Previously a copied type could not be copied anymore, removed this restriction
and allow for multiple copied of the same type. This is e.g. needed for
recursive type definitions.

2013-24-09  Sanimir Agovic  <sanimir.agovic@intel.com>

	* gdbtypes.c (copy_type_recursive_1): New function.
	(copy_type_recursive): Moved function body to copy_type_recursive_1.
	(resolve_dynamic_values): Replace calls to copy_type_recursive with
	copy_type_recursive_1.

Change-Id: I0519c779473cac49ac4bca263e1ab43520371718
type: negate ALLOCATION/ASSOCIATION flag

2013-09-24  Sanimir Agovic  <sanimir.agovic@intel.com>

	* gdbtypes.h (struct main_type): Rename flag_associated and
	flag_allocated to flag_not_associated, flag_not_allocated.
	(TYPE_ASSOCIATED): Rename to TYPE_NOT_ASSOCIATED.
	(TYPE_ALLOCATED): Rename to TYPE_NOT_ALLOCATED.
	* dwarf2loc.c (dwarf2_address_data_valid): Reflect uses.
	* f-typeprint.c (f_print_type): Reflect uses.
	* gdbtypes.c (resolve_dynamic_values_1): Reflect uses.
	* valarith.c (value_subscripted_rvalue): Reflect uses.
	* valprint.c (valprint_check_validity): Reflect uses.

Change-Id: I12fb485676f568989dca3c5f6629e4bed5bd0c27
type: copy c++ specfic type attributes

This is a shallow copy only to fix the regression in c++ code. To support in vla
one must do a deep copy of these attributes.

2013-09-27  Sanimir Agovic  <sanimir.agovic@intel.com>

	* gdbtypes.c (copy_type_recursive_1): Copy c++ type attributes.

Change-Id: I144ae1c8e79574df015cdc4a8ed3f515421f96aa
value: make field selection work with vla

In Fortran vla are pointers to arrays. Thus a type only contains a pointer
to such array and we need to re-read the field to retrieve the correct vla.

2013-09-30  Sanimir Agovic  <sanimir.agovic@intel.com>

	* value.c (value_primitive_field): Re-evaluate field value to get the
	actual value.

Change-Id: I176fa8f4054178350036dba6fdc2c1f1de79e929
cleanup: restructure code

2013-09-30  Sanimir Agovic  <sanimir.agovic@intel.com>

	* value.c (value_fetch_lazy): Restructured code.

Change-Id: I1e00296f7b4b03f9de63abbf2d41adfb4964427b
value: refetch type from constructed value

2013-09-30  Sanimir Agovic  <sanimir.agovic@intel.com>

	* valops.c (value_ind):  Refetch type from value as it might
	change during construction.

Change-Id: Ib32239b116ea1813f394821bbcc5b3faae4ef2f3
print: reconstruct value to compute bounds of target type

Printing a pointer to an array, gdb tries to print the target type including its
bounds. To follow this semantic with vla, this patch re-constructs the value to
resolve the bounds of the target type.

2013-09-30  Sanimir Agovic  <sanimir.agovic@intel.com>

	* typeprint.c (whatis_exp): Re-construct value to compute bounds
	of target type.
	* c-valprint.c (c_value_print): Re-construct value to compute bounds
	of target type.

Change-Id: Ib970cc46a33903cdcdd11e8b50ba6cb3f91e1da1
general refactoring

Simplify code dealing with the gdb typesystem. Instead of checking for
string/array/others we traverse the field elements. This saves a lot of
checks and makes code more compact.

2013-09-30  Sanimir Agovic  <sanimir.agovic@intel.com>

	* gdbtypes.c (is_dynamic_type): Make function more generic and simpler
	by not differenciating between array/string/other but rather by
	traversing field elements.
	(resolved_type_p): Remove function.
	(type_contains_dynamic_types): Remove function.
	(resolve_dynamic_values): Bail out if type is not dynamic or not owned
	by an objectfile.
	(resolve_dynamic_values_1): Reset pointer/reference type as we modify
	Simplify code by not differenciating between array/string/other but
	rather by traversing field elements.
	attributes and need to be re-created instead of re-used.
	(copy_type_recursive_1): Do not bail out if type is dynamic.
	* gdbtypes.h (is_dynamic_type): Extern function.

Change-Id: I4e29d1777a19ee80a923d6738a9cbf3d20631400
value: do not overwerite type value

Temporaly removed the call to deprecated_set_value_type. It does not break
any tests but it looks wired to me why this call is needed.

2013-09-30  Sanimir Agovic  <sanimir.agovic@intel.com>

	* value.c (readjust_indirect_value_type):

Change-Id: I867e75081ec9b756e578c920dadd92b8a63f5caf
print: use value constructor instead of raw-buffer manipulation

2013-09-30  Sanimir Agovic  <sanimir.agovic@intel.com>

	* f-valprint.c (f77_create_arrayprint_offset_tbl): Remove function.
	(F77_DIM_SIZE, F77_DIM_OFFSET): Remove macro.
	(f77_print_array_1): Use value_subscript to subscript a value array.
	(f77_print_array): Remove call to f77_create_arrayprint_offset_tbl.
	(f_val_print): Use value_field to construct a field value.

Change-Id: I4e9b27cffa64dbd850cde0c7822d1899a7095dae
vla: allow sizeof to deduce the size of a vla

2013-09-27  Sanimir Agovic  <sanimir.agovic@intel.com>

	* eval.c (evaluate_subexp_for_sizeof): Remove case for OP_VAR_VALUE
	and deal with it in the default case.

Change-Id: Idd1bf948249f6428094ce1f221ff468fa4865e18
vla: enable sizeof for dereferenced pointers

2013-09-30  Sanimir Agovic  <sanimir.agovic@intel.com>

	* eval.c (evaluate_subexp_for_sizeof): If target type points to a
	dynamic type re-evaluate to correctly compute its bounds.

Change-Id: I957dda4b6af8434af74198b7a4440faa7c307a2e
type: arrays with static bounds are falsly recognized as a dynamic type

2013-10-02  Sanimir Agovic  <sanimir.agovic@intel.com>

	* gdbtypes.c (is_dynamic_type): Use *_BOUND_KIND() macros to check
	explicit for DWARF_CONST.

Change-Id: Ifa4ce0d04f59576572702a15399ea496459d4e68
lang: initial fortran specific la_value_print routine

2013-09-30  Sanimir Agovic  <sanimir.agovic@intel.com>

	* f-lang.c (f_language_defn): Assign fortran print handler f_value_print
	to la_value_print.
	* f-lang.h (f_value_print): New function prototype.
	* f-lang.c (f_value_print): New function.

Change-Id: I78ab03ab5201f6bbd62b8fbde965f133582bf4b5