Re: [PATCH 1/3] Add support for DW_OP_GNU_variable_value

Tom Tromey
2018-08-03T18:43:38Z

>>>>> "Kevin" == Kevin Buettner <kevinb@redhat.com> writes:

I forgot a note earlier...

Kevin> + /* Note: Things still work when the following test is removed. This
Kevin> + test and error is here to conform to the proposed specification. */
Kevin> + if (!is_scalar_type (die_type) || TYPE_CODE (die_type) == TYPE_CODE_VOID)
Kevin> + error (_("Type of DW_OP_GNU_variable_value DIE must be an integer or pointer."));

I suspect is_scalar_type isn't what you want here.
Maybe instead either "is_integral_type || TYPE_CODE == TYPE_CODE_PTR",
or just checking for TYPE_CODE_PTR and TYPE_CODE_INT (since, bizarrely
to me at least, is_integral_type includes range types).

Tom