X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Feval.c;h=9804a977f7bc0c48818bd662510d1361f2d8c750;hb=32b40af94e919e235c21486110311647cbeecf2e;hp=e6ab662dbcbcdd388278ea260c9957e3ff030618;hpb=4bfb94b8648cebad2683d24ebe033ef539df1dbb;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/eval.c b/gdb/eval.c index e6ab662dbc..9804a977f7 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -212,7 +212,6 @@ fetch_subexp_value (struct expression *exp, int *pc, struct value **valp, int preserve_errors) { struct value *mark, *new_mark, *result; - volatile struct gdb_exception ex; *valp = NULL; if (resultp) @@ -224,11 +223,11 @@ fetch_subexp_value (struct expression *exp, int *pc, struct value **valp, 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 @@ -243,6 +242,7 @@ fetch_subexp_value (struct expression *exp, int *pc, struct value **valp, break; } } + END_CATCH new_mark = value_mark (); if (mark == new_mark) @@ -258,13 +258,16 @@ fetch_subexp_value (struct expression *exp, int *pc, struct value **valp, *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 } } @@ -664,7 +667,6 @@ make_params (int num_types, struct type **param_types) 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) { @@ -763,16 +765,15 @@ evaluate_subexp_standard (struct type *expect_type, 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), @@ -780,6 +781,7 @@ evaluate_subexp_standard (struct type *expect_type, else throw_exception (except); } + END_CATCH return ret; } @@ -1447,20 +1449,21 @@ evaluate_subexp_standard (struct type *expect_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; } } @@ -1864,20 +1867,21 @@ evaluate_subexp_standard (struct type *expect_type, 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; }