X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fcp-valprint.c;h=feb3a66721877064b9212fc2e8a5f14727735943;hb=f74839702efcea048ac61374b1539ae81e7c86cc;hp=0ddc96e78bd149b3432f010959621c5c2f8f327f;hpb=7cf99fb1c72769c17eed0a62951698bf56432108;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 0ddc96e78b..feb3a66721 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -313,18 +313,21 @@ cp_print_value_fields (struct type *type, struct type *real_type, } else if (field_is_static (&TYPE_FIELD (type, i))) { - volatile struct gdb_exception ex; struct value *v = NULL; - TRY_CATCH (ex, RETURN_MASK_ERROR) + TRY { v = value_static_field (type, i); } - if (ex.reason < 0) - fprintf_filtered (stream, - _(""), - ex.message); + CATCH (ex, RETURN_MASK_ERROR) + { + fprintf_filtered (stream, + _(""), + ex.message); + } + END_CATCH + cp_print_static_field (TYPE_FIELD_TYPE (type, i), v, stream, recurse + 1, options); @@ -481,12 +484,11 @@ cp_print_value (struct type *type, struct type *real_type, for (i = 0; i < n_baseclasses; i++) { int boffset = 0; - int skip; + int skip = 0; struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); const char *basename = TYPE_NAME (baseclass); const gdb_byte *base_valaddr = NULL; const struct value *base_val = NULL; - volatile struct gdb_exception ex; if (BASETYPE_VIA_VIRTUAL (type, i)) { @@ -506,18 +508,21 @@ cp_print_value (struct type *type, struct type *real_type, thisoffset = offset; thistype = real_type; - TRY_CATCH (ex, RETURN_MASK_ERROR) + TRY { boffset = baseclass_offset (type, i, valaddr, offset, address, val); } - if (ex.reason < 0 && ex.error == NOT_AVAILABLE_ERROR) - skip = -1; - else if (ex.reason < 0) - skip = 1; - else - { - skip = 0; + CATCH (ex, RETURN_MASK_ERROR) + { + if (ex.error == NOT_AVAILABLE_ERROR) + skip = -1; + else + skip = 1; + } + END_CATCH + if (skip == 0) + { if (BASETYPE_VIA_VIRTUAL (type, i)) { /* The virtual base class pointer might have been