From a6cfbe68911886e8d7e2781d8cd70ff0490c9e90 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Thu, 4 Jan 2007 06:31:52 +0000 Subject: [PATCH] * ada-lang.c (ada_evaluate_subexp) [OP_TYPE]: Return a value with the appropriate type rather than a bogus void type. --- gdb/ChangeLog | 5 +++++ gdb/ada-lang.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 56927d793de..7f47dab3c04 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-01-04 Joel Brobecker + + * ada-lang.c (ada_evaluate_subexp) [OP_TYPE]: Return a value with + the appropriate type rather than a bogus void type. + 2007-01-04 Joel Brobecker * ada-lang.h (ada_find_printable_frame): Remove. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 5b687e34212..706806efac4 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -8578,7 +8578,7 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, if (noside == EVAL_SKIP) goto nosideret; else if (noside == EVAL_AVOID_SIDE_EFFECTS) - return allocate_value (builtin_type_void); + return allocate_value (exp->elts[pc + 1].type); else error (_("Attempt to use a type name as an expression")); -- 2.30.2