This is the mail archive of the 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 v4 02/13] type: add c99 variable length array support

>>>>> "Sanimir" == Sanimir Agovic <> 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:

The rest of this seemed fine to me.


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