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: "Agovic, Sanimir" <sanimir dot agovic at intel dot com>
- To: 'Tom Tromey' <tromey at redhat dot com>
- Cc: "palves at redhat dot com" <palves at redhat dot com>, "xdje42 at gmail dot com" <xdje42 at gmail dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "Boell, Keven" <keven dot boell at intel dot com>
- Date: Thu, 16 Jan 2014 17:00:29 +0000
- 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> <87eh49osy8 dot fsf at fleche dot redhat dot com>
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