This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4 02/13] type: add c99 variable length array support
- From: Tom Tromey <tromey at redhat dot com>
- To: Sanimir Agovic <sanimir dot agovic at intel dot com>
- Cc: palves at redhat dot com, xdje42 at gmail dot com, gdb-patches at sourceware dot org, keven dot boell at intel dot com
- Date: Wed, 15 Jan 2014 14:06:55 -0700
- Subject: Re: [PATCH v4 02/13] type: add c99 variable length array support
- Authentication-results: sourceware.org; auth=none
- References: <1387282678-3847-1-git-send-email-sanimir dot agovic at intel dot com> <1387282678-3847-3-git-send-email-sanimir dot agovic at intel dot com>
>>>>> "Sanimir" == Sanimir Agovic <sanimir.agovic@intel.com> writes:
Sanimir> +int
Sanimir> +dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR address,
Sanimir> + CORE_ADDR *value)
Sanimir> +{
[...]
Sanimir> + if (!value_optimized_out (val))
Sanimir> + *value = value_as_long (value_ind (val));
Sanimir> + }
Sanimir> + return 1;
This particular branch can return 1 but not set *value.
That seems wrong.
Sanimir> + else if (attr_form_is_block (target_attr))
Sanimir> + {
Sanimir> + const gdb_byte ops[] = {DW_OP_deref};
Sanimir> +
Sanimir> + baton = obstack_alloc (obstack, sizeof (*baton));
Sanimir> + baton->locexpr = block_to_locexpr_baton (DW_BLOCK (target_attr),
Sanimir> + cu, ops, sizeof (ops));
I noted in an earlier review that I think this approach will not work.
Not sure if I'm misunderstanding something; but I dug up the old thread
and you didn't respond to this bit:
https://sourceware.org/ml/gdb-patches/2013-11/msg00785.html
The rest of this seemed fine to me.
Tom