This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] pascal support sizeof (expression)
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 7 May 2010 09:10:35 -0700
- Subject: Re: [RFC] pascal support sizeof (expression)
- References: <004c01caedfa$50bef820$f23ce860$@muller@ics-cnrs.unistra.fr>
> 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