int preserve_errors)
{
struct value *mark, *new_mark, *result;
- volatile struct gdb_exception ex;
*valp = NULL;
if (resultp)
mark = value_mark ();
result = NULL;
- TRY_CATCH (ex, RETURN_MASK_ALL)
+ TRY
{
result = evaluate_subexp (NULL_TYPE, exp, pc, EVAL_NORMAL);
}
- if (ex.reason < 0)
+ CATCH (ex, RETURN_MASK_ALL)
{
/* Ignore memory errors if we want watchpoints pointing at
inaccessible memory to still be created; otherwise, throw the
break;
}
}
+ END_CATCH
new_mark = value_mark ();
if (mark == new_mark)
*valp = result;
else
{
- volatile struct gdb_exception except;
- TRY_CATCH (except, RETURN_MASK_ERROR)
+ TRY
{
value_fetch_lazy (result);
*valp = result;
}
+ CATCH (except, RETURN_MASK_ERROR)
+ {
+ }
+ END_CATCH
}
}
TYPE_MAIN_TYPE (type) = XCNEW (struct main_type);
TYPE_LENGTH (type) = 1;
TYPE_CODE (type) = TYPE_CODE_METHOD;
- TYPE_VPTR_FIELDNO (type) = -1;
TYPE_CHAIN (type) = type;
if (num_types > 0)
{
or reference to a base class and print object is on. */
{
- volatile struct gdb_exception except;
struct value *ret = NULL;
- TRY_CATCH (except, RETURN_MASK_ERROR)
+ TRY
{
ret = value_of_variable (exp->elts[pc + 2].symbol,
exp->elts[pc + 1].block);
}
- if (except.reason < 0)
+ CATCH (except, RETURN_MASK_ERROR)
{
if (noside == EVAL_AVOID_SIDE_EFFECTS)
ret = value_zero (SYMBOL_TYPE (exp->elts[pc + 2].symbol),
else
throw_exception (except);
}
+ END_CATCH
return ret;
}
block_for_pc (funaddr);
- CHECK_TYPEDEF (val_type);
+ val_type = check_typedef (val_type);
if ((val_type == NULL)
|| (TYPE_CODE(val_type) == TYPE_CODE_ERROR))
else if (TYPE_CODE (type) == TYPE_CODE_MEMBERPTR)
{
struct type *type_ptr
- = lookup_pointer_type (TYPE_DOMAIN_TYPE (type));
+ = lookup_pointer_type (TYPE_SELF_TYPE (type));
struct type *target_type_ptr
= lookup_pointer_type (TYPE_TARGET_TYPE (type));
operator and continue evaluation. */
while (unop_user_defined_p (op, arg2))
{
- volatile struct gdb_exception except;
struct value *value = NULL;
- TRY_CATCH (except, RETURN_MASK_ERROR)
+ TRY
{
value = value_x_unop (arg2, op, noside);
}
- if (except.reason < 0)
+ CATCH (except, RETURN_MASK_ERROR)
{
if (except.error == NOT_FOUND_ERROR)
break;
else
throw_exception (except);
}
+ END_CATCH
+
arg2 = value;
}
}
return value_zero (builtin_type (exp->gdbarch)->builtin_int,
not_lval);
}
+ else if (TYPE_CODE (ftype) == TYPE_CODE_XMETHOD)
+ {
+ struct type *return_type
+ = result_type_of_xmethod (argvec[0], nargs, argvec + 1);
+
+ if (return_type == NULL)
+ error (_("Xmethod is missing return type."));
+ return value_zero (return_type, not_lval);
+ }
else if (TYPE_GNU_IFUNC (ftype))
return allocate_value (TYPE_TARGET_TYPE (TYPE_TARGET_TYPE (ftype)));
else if (TYPE_TARGET_TYPE (ftype))
arg1 with the value returned by evaluating operator->(). */
while (unop_user_defined_p (op, arg1))
{
- volatile struct gdb_exception except;
struct value *value = NULL;
- TRY_CATCH (except, RETURN_MASK_ERROR)
+ TRY
{
value = value_x_unop (arg1, op, noside);
}
- if (except.reason < 0)
+ CATCH (except, RETURN_MASK_ERROR)
{
if (except.error == NOT_FOUND_ERROR)
break;
else
throw_exception (except);
}
+ END_CATCH
+
arg1 = value;
}
case TYPE_CODE_MEMBERPTR:
/* Now, convert these values to an address. */
- arg1 = value_cast_pointers (lookup_pointer_type (TYPE_DOMAIN_TYPE (type)),
+ arg1 = value_cast_pointers (lookup_pointer_type (TYPE_SELF_TYPE (type)),
arg1, 1);
mem_offset = value_as_long (arg2);
/* $5.3.3/2 of the C++ Standard (n3290 draft) says of sizeof:
"When applied to a reference or a reference type, the result is
the size of the referenced type." */
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (exp->language_defn->la_language == language_cplus
&& TYPE_CODE (type) == TYPE_CODE_REF)
type = check_typedef (TYPE_TARGET_TYPE (type));