RE: Variable Length Arrays (VLA) proposal
"Agovic, Sanimir" <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <0377C58828D86C4588AEEC42FC3B85A71763D377@IRSMSX105.ger.corp.intel.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, thanks for hint. Regarding 2) we may go simply with printing unbound dimensions e.g. (: : :). Later we can decide to either relax the no side effects flag and print the bounds or keep it as-is. -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