[RFC] pascal support sizeof (expression)
Joel Brobecker
brobecker@adacore.com
Fri May 7 16:11:00 GMT 2010
> Once more, I ask before committing because I am
> unsure about the ChangeLog entry:
When unsure, I tend to look at prior art ;-).
> Pierre Muller
> Pascal language support maintainer for GDB
>
> 2010-05-07 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * p-exp.y (pascal_parse): Add support for `sizeof (expression)'.
I usually tend to provide the name of the rule, like in makefiles...
Or looking at Tom's entry:
(exp : VARIABLE): Call write_dollar_variable.
> Index: src/gdb/p-exp.y
> ===================================================================
> RCS file: /cvs/src/src/gdb/p-exp.y,v
> retrieving revision 1.49
> diff -u -p -r1.49 p-exp.y
> --- src/gdb/p-exp.y 6 May 2010 00:08:44 -0000 1.49
> +++ src/gdb/p-exp.y 6 May 2010 23:06:14 -0000
> @@ -525,6 +525,9 @@ exp : SIZEOF '(' type ')' %prec UNARY
> write_exp_elt_opcode (OP_LONG); }
> ;
>
> +exp : SIZEOF '(' exp ')' %prec UNARY
> + { write_exp_elt_opcode (UNOP_SIZEOF); }
> +
> exp : STRING
> { /* C strings are converted into array constants
> with
> an explicit null byte added at the end. Thus
--
Joel
More information about the Gdb-patches
mailing list