* ada-lang.c (ada_evaluate_subexp) [OP_TYPE]: Return a value with
authorJoel Brobecker <brobecker@gnat.com>
Thu, 4 Jan 2007 06:31:52 +0000 (06:31 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 4 Jan 2007 06:31:52 +0000 (06:31 +0000)
        the appropriate type rather than a bogus void type.

gdb/ChangeLog
gdb/ada-lang.c

index 56927d7..7f47dab 100644 (file)
@@ -1,5 +1,10 @@
 2007-01-04  Joel Brobecker  <brobecker@adacore.com>
 
+       * 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  <brobecker@adacore.com>
+
        * ada-lang.h (ada_find_printable_frame): Remove.
        (ada_exception_catchpoint_p, ada_decode_exception_location)
        (ada_decode_assert_location): Add declaration.
index 5b687e3..706806e 100644 (file)
@@ -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"));