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 v4 02/13] type: add c99 variable length array support


Thanks for your review.

> -----Original Message-----
> From: Tom Tromey [mailto:tromey@redhat.com]
> Sent: Wednesday, January 15, 2014 10:07 PM
> To: Agovic, Sanimir
> Cc: palves@redhat.com; xdje42@gmail.com; gdb-patches@sourceware.org; Boell, Keven
> Subject: Re: [PATCH v4 02/13] type: add c99 variable length array support
> 
> >>>>> "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.
> 
Fixed.

> 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
> 
Thanks, I got it now. I`m working on it.

 -Sanimir
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


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