This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Patch v2 01/10] vla: introduce new bound type abstraction adapt uses
- From: Tom Tromey <tromey at redhat dot com>
- To: Sanimir Agovic <sanimir dot agovic at intel dot com>
- Cc: gdb-patches at sourceware dot org, keven dot boell at intel dot com
- Date: Fri, 22 Nov 2013 12:31:22 -0700
- Subject: Re: [Patch v2 01/10] vla: introduce new bound type abstraction adapt uses
- Authentication-results: sourceware.org; auth=none
- References: <1385044223-24650-1-git-send-email-sanimir dot agovic at intel dot com> <1385044223-24650-2-git-send-email-sanimir dot agovic at intel dot com>
>>>>> "Sanimir" == Sanimir Agovic <sanimir.agovic@intel.com> writes:
Sanimir> The rational behind this patch is to get started to implement
Sanimir> the feature described in dwarf4 standard (2.19) Static and
Sanimir> Dynamic Values of Attributes. It adds new DWARF2_PROP to store
Sanimir> either a constant, exprloc, or reference to describe an
Sanimir> upper-/lower bound of a subrange. Other than that no new
Sanimir> features are introduce.
Thanks.
I have one nit and one more serious question.
Sanimir> + low.data.const_val =
Sanimir> + dwarf2_get_attr_constant_value (attr, low.data.const_val);
Split before the "=", not after.
Sanimir> +struct type *
Sanimir> +create_range_type_1 (struct type *result_type, struct type *index_type,
Sanimir> + const struct dwarf2_prop *low_bound,
Sanimir> + const struct dwarf2_prop *high_bound)
[...]
Sanimir> create_range_type (struct type *result_type, struct type *index_type,
Sanimir> LONGEST low_bound, LONGEST high_bound)
Sanimir> {
[...]
Sanimir> + result_type = create_range_type_1 (result_type, index_type,
Sanimir> + &low, &high);
Sanimir> if (low_bound >= 0)
Sanimir> TYPE_UNSIGNED (result_type) = 1;
I wonder why the TYPE_UNSIGNED setting is in create_range_type but not
in create_range_type_1. It seems like this would cause a change in
semantics in dwarf2read, which now calls the new function.
Tom