[patch] Delete FIELD_LOC_KIND_DWARF_BLOCK, unused.

Jan Kratochvil jan.kratochvil@redhat.com
Mon Jun 28 15:57:00 GMT 2010


On Sun, 27 Jun 2010 18:55:40 +0200, Doug Evans wrote:
> This patch is strictly cleanup.
> It deletes FIELD_LOC_KIND_DWARF_BLOCK as it is unused.

Just a background for it why it was introduced and why it is no longer needed
even for future additions.

It has been introduced a s part of VLA (Variable Length Arrays) patch series
importing which I never finished that time (and should start again soon).
	Re: [patch] static_kind -> bit0, bit1 [Re: [gdb] Fortran dynamic arrays]
	http://sourceware.org/ml/gdb-patches/2008-09/msg00425.html
	# The first goal, as I understand it, is to be able to extend range
	# types so that the bounds can be DWARF blocks.

Just in the meantime this FIELD_LOC_KIND_* is no longer used for array bounds
as new TYPE_RANGE_DATA different field of the union in the former place of
TYPE_FIELDS has been introduced:
	[COMMIT] 64-bit range types in GDB
	http://sourceware.org/ml/gdb-patches/2009-12/msg00181.html

The current FSF GDB HEAD uses just `LONGEST low, high;' for the bounds.
archer-jankratochvil-vla therefore has ported this FIELD_LOC_KIND_DWARF_BLOCK
to:

      struct
        {
          union
            {
              LONGEST constant;
              struct dwarf2_locexpr_baton *dwarf_block;
              struct
                {
                  struct dwarf2_loclist_baton *loclist;
                  struct type *type;
                }
              dwarf_loclist;
            }
          u;
          enum range_bound_kind
            {
              RANGE_BOUND_KIND_CONSTANT,
              RANGE_BOUND_KIND_DWARF_BLOCK,
              RANGE_BOUND_KIND_DWARF_LOCLIST
            }
          kind;
        }
      /* Low bound of range. */
      low,
      /* High bound of range. */
      high,
      /* Byte stride of range. */
      byte_stride;

But that is not currently submitted for a review.


> I will commit this in a few days if there are no objections.

BTW I agree.


Thanks,
Jan



More information about the Gdb-patches mailing list