16 May 2010 19:23
Re: Patch for pascal-dynamic arrays
On Sun, 16 May 2010 19:04:27 +0200, Joost van der Sluis wrote: > That's because type_length_get() (gdbtypes.c) does not return 0 when the > high and low-bound are equal to each other. That's correct. Both DW_AT_lower_bound and DW_AT_upper_bound express the boundaries inclusively. Array of length 0 must have DW_AT_upper_bound equal to DW_AT_lower_bound minus one. If you do not feel confortable with DW_AT_upper_bound that way you can also use DW_AT_lower_bound and DW_AT_count with value 0. > There's also a second problem. The lower bound is 1 for strings. With > Jonas' patch for fpc the upper bound of strings is 0 when not allocated. That looks correct. > Leading to a size of -1. That should lead to a size of 0. I am not sure where is a problem there but GDB handles non-pascal arrays of length zero right AFAIK. Thanks, Jan
RSS Feed