This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit/ada+testsuite] print ada boolean expression results as true/false
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: brobecker at adacore dot com
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 28 Dec 2007 11:32:41 +0100 (CET)
- Subject: Re: [commit/ada+testsuite] print ada boolean expression results as true/false
- References: <20071228061513.GA24450@adacore.com>
> 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.