This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]