test: multi-dimensional c99 vla.

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

gdb/testsuite:
	* gdb.base/vla-multi.c: New. Test source file
	for testing multi-dimensional VLA's in C.
	* gdb.base/vla-multi.exp: New. Tests ensure
	that multi-dimensional VLA's can be evaluated
	correctly in C.

Change-Id: I2fd81dc113f20eafed363e7a5a0b0a5a6ce155bc
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: evaluate pointers to C99 vla correctly.

2013-10-18  Keven Boell  <keven.boell@intel.com>

gdb/testsuite:
	* gdb.base/vla-ptr.c: New. Test source file
	for testing pointers to VLA's in C.
	* gdb.base/vla-ptr.exp: New. Tests ensure that
	the evaluation of pointers to VLA's work
	correctly in C.

Change-Id: I12695184edc0d9621d658615ea48d783649f813d
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: basic c99 vla tests for C primitives

2013-10-18  Keven Boell  <keven.boell@intel.com>

gdb/testsuite:
	* gdb.base/vla-datatypes.c: New. Test source file
	for VLA datatype checks.
	* gdb.base/vla-datatypes.exp: New. Tests ensure that
	a VLA in C can be evaluated correctly with standard
	C types.

Change-Id: I0517c095522f242deeb00a0f1db31f730dbff228
Signed-off-by: Keven Boell <keven.boell@intel.com>
test: add mi vla test

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

testsuite/gdb.mi/

	* mi-vla-c99.exp: New file.
	* vla.c: New file.

Change-Id: I9827c8b80b3ba33e2ea7a376bc725154e4ece4c6
vla: support for DW_AT_count

This patch adds support for DW_AT_count as requested in the code review:

  https://sourceware.org/ml/gdb-patches/2013-11/msg00200.html

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

	* dwarf2read.c (read_subrange_type): If DW_AT_count is dynamic
	create the following upper bound dwarf expression 'low + count + 1'
	by hand.

Change-Id: I6c2c764c988ab7df3872d111b35486a9761203d5
dwarf: add DW_OP_push_object_address support to dwarf expression

Added a field to hold the address of a variable length array
object to the baton struct in dwarfloc. With DW_OP_push_obj-
ect_address, a callback function is invoked which returns
the address of the object.

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

	* dwarf2expr.c (execute_stack_op): Added case for
	DW_OP_push_object_address opcode which returns the VLA
	object address.
	* dwarf2expr.h (get_object_addr): Added function pointer
	which returns the VLA objects' CORE_ADDR.
	* dwarf2loc.c (dwarf_expr_get_obj_addr): Implemented
	callback function for DW_OP_push_object_address and
	added function to virtual method table.
	* dwarf2loc.h (dwarf2_locexpr_baton): Added field to hold
	the address of our object.
	* dwarf2read.c (dwarf_fetch_die_loc_sect_off): Implemented
	value assignment to new field in dwarf2_loc_expr_baton.
	(dwarf2_read_obj_addr): Function implemented
	which returns an object address, if available.
	* dwarf2loc.c (dwarf_expr_get_addr_index):
	Replace struct dwarf2_locexpr_baton with struct
	dwarf_expr_baton.
	(dwarf2_evaluate_loc_desc_full): Initialize obj_address
	to be 0 to not have random values in it.
	* dwarf2loc.h (dwarf2_read_obj_addr): Remove not needed
	wrapper function prototype.
	(struct dwarf_expr_baton): Remove obj_address field.
	* dwarf2read.c: remove not needed wrapper function to get
	obj_address out of baton.

Change-Id: I4c7472e8fd2b9fa17d98ab849b56f1268cc8e16c
vla: add icc c99 vla support

This patch deals with icc specific dwarf vla entities.

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

	* dwarf2read.c (set_die_type): Parse and save DW_AT_data_location
	attribute.
	* gdbtypes.c (resolve_dynamic_bounds): Evaluate data location baton
	if present and save its value.
	* gdbtypes.h (struct main_type): Add flag_data_location_is_address
	bitflag and union data_location.
	(TYPE_DATA_LOCATION_BATON): New macro.
	(TYPE_DATA_LOCATION_ADDR): New macro.
	(TYPE_DATA_LOCATION_IS_ADDRESS): New macro.
	* value.c: Include dwarf2loc.h.
	(value_fetch_lazy): Use data location addres to read value from
	memory.

Change-Id: I582d709ca6fa50ca216d2bbd49ccaea36d432f16