[commit/ada+testsuite] print ada boolean expression results as true/false

Mark Kettenis mark.kettenis@xs4all.nl
Fri Dec 28 10:33:00 GMT 2007


> Date: Thu, 27 Dec 2007 22:15:13 -0800
> From: Joel Brobecker <brobecker@adacore.com>

Just a small nit:

> Index: ada-lang.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/ada-lang.c,v
> retrieving revision 1.112
> diff -u -p -r1.112 ada-lang.c
> --- ada-lang.c	24 Dec 2007 16:52:24 -0000	1.112
> +++ ada-lang.c	28 Dec 2007 06:09:19 -0000
> @@ -8151,6 +8151,24 @@ ada_evaluate_subexp (struct type *expect
>        else
>          return value_neg (arg1);
>  
> +    case BINOP_LOGICAL_AND:
> +    case BINOP_LOGICAL_OR:
> +    case UNOP_LOGICAL_NOT:
> +      *pos -= 1;
> +      return value_cast (LA_BOOL_TYPE, 
> +			 evaluate_subexp_standard (expect_type, exp,
> +						   pos, noside));

I think the fact that you need three lines here means that it makes
more sense to avoid the nested function calls and use a (temporary)
variable instead.



More information about the Gdb-patches mailing list