aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2007-01-04 06:31:52 +0000
committerJoel Brobecker <brobecker@gnat.com>2007-01-04 06:31:52 +0000
commita6cfbe68911886e8d7e2781d8cd70ff0490c9e90 (patch)
treea2c43bd8c15a86740cca421a022071f34b3532e4 /gdb/ada-lang.c
parentfd678c65736388e1f0bd2500b16a8325963f06cd (diff)
downloadgdb-a6cfbe68911886e8d7e2781d8cd70ff0490c9e90.zip
gdb-a6cfbe68911886e8d7e2781d8cd70ff0490c9e90.tar.gz
gdb-a6cfbe68911886e8d7e2781d8cd70ff0490c9e90.tar.bz2
* ada-lang.c (ada_evaluate_subexp) [OP_TYPE]: Return a value with
the appropriate type rather than a bogus void type.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 5b687e3..706806e 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"));