This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Variable Length Arrays (VLA) proposal
- From: Chris January <chris dot january at allinea dot com>
- To: "Agovic, Sanimir" <sanimir dot agovic at intel dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>, "Boell, Keven" <keven dot boell at intel dot com>, "Weinmann, Christoph T" <christoph dot t dot weinmann at intel dot com>
- Date: Thu, 04 Jul 2013 17:55:51 +0100
- Subject: RE: Variable Length Arrays (VLA) proposal
- References: <0377C58828D86C4588AEEC42FC3B85A7176288F9 at IRSMSX105 dot ger dot corp dot intel dot com> <1372434039 dot 2950 dot 12 dot camel at gumtree> <0377C58828D86C4588AEEC42FC3B85A71762A7F2 at IRSMSX105 dot ger dot corp dot intel dot com> <1372929205 dot 2796 dot 18 dot camel at gumtree> <0377C58828D86C4588AEEC42FC3B85A71762A9D7 at IRSMSX105 dot ger dot corp dot intel dot com>
On Thu, 2013-07-04 at 11:49 +0000, Agovic, Sanimir wrote:
> Afaik gdb does a combination of:
>
> const char * exp = [...]
> struct expression *expr = parse_expression (exp);
> struct value *val = evaluate_type (expr);
> [...]
>
> for whatis/ptype therefore we should be fine as we have a value in place.
1. The value is not passed through to f_print_type.
2. evaluate_type evaluates expr with no side effects and no memory reads
- but for VLA the type depends on the actual value so you do not to
evaluate with side effects.
Chris