This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] pascal support sizeof (expression)


>   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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]