On Sun, 2009-10-04 at 16:17 +0200, Jan Kratochvil wrote: > On Wed, 30 Sep 2009 17:59:34 +0200, Joost van der Sluis wrote: > > Attached it the new patch. > > Please write GNU style ChangeLog entry for it. I am sorry I did not write the > entries myself in the log (as a partial excuse it was not reviewed by anyone > that time). I've done my best, see below. > > I tested it and I have no regressions anymore. > > Getting a lot of regressions included below. > * Some fortran failures only happen with `ulimit -v 500000'. > * Are the new Pascal testcase FAILures expected? If a more recent fpc is > required the testcase should XFAIL, not FAIL. > You need to have installed at least gcc-gfortran + gcc-gnat with > ln -s /usr/bin/gfortran src-toplevel-dir/g77 > > @@ -197,6 +198,13 @@ struct value > > /* If value is a variable, is it initialized or not. */ > > int initialized; > > > > + CORE_ADDR data_address; > > + > > + char calc_length; > > + long length; > > + char checked_dynamics; > > + long lower_bound; > > + long upper_bound; > > > Still I do not like duplicating the information already present in `struct > main_type'. I find right you have changed passing some `struct type *' to > `struct value *' instead but that new `struct value' just could use > copy_type_recursive on that linked `struct type'. I've reworked the patch and removed these duplicates. It does not try to do some things fully dynamic anymore. I think this patch is more suitable to be included in FSF GDB. I think you'll like it. I've added some tests to the pascal-tests so they XFail when an older version of fpc is installed, and the tests aren't runned at all when gpc is used as pascal-compiler. I've tested for regressions, this time with ada and fortran enabled and didn't have any regressions. Here's the changelog: 2009-10-28 Joost van der Sluis * tekhex.c (move_section_contents): fixed usage of offset parameter * cp-valprint.c (cp_print_value_fields): when the address is 0, do not pass the 0 value increased with some offset to val_print, but pass 0 instead * gdbtypes.c, gdbtypes.h (check_typedef, check_typedef_target) Added check_typedef_target which resolves the target type without doing a full check_typedef * p-valprint.c (pascal_val_print) Do not Handle arrays of integers as strings * p-valprint.c (pascal_val_print) When printing array-elements use the original passed type, and not one which is handled by check_typedef * arrays.exp New tests for arrays in fpc * pascal.exp Added variables fpcversion_major, fpcversion_minor and fpcversion_release with the version of the used compiler * valprint.c, valprint.h (get_array_bounds) Changed first parameter from struct type into struct value * valprint.c (val_print_array_elements) Calculate the amount of elements in an array always by substracting the upper and lower bound * valprint.c (val_print_array_elements) For each element in the array, create a new struct value and print it using common_val_print, so that all elements are properly evaluated * value.c, value.h (struct value) Added data_address to struct value. Added the functions data_address and set_data_address * value.c, value.h (set_value_address) Use object_address_get_data to set data_addr * value.c, value.h (value_lower_bound, value_upper_bound, get_bound) Added these functions to get the lower and upper bound of an value struct containing an array 2009 Jan Kratochvil > * ada-valprint.c (print_optional_low_bound): no idea