* cp-valprint.c (cp_print_value_fields): Catch errors from
value_static_field.
This commit is contained in:
parent
9ff3b74fdb
commit
ee86786cdd
@ -1,3 +1,8 @@
|
||||
2011-05-17 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* cp-valprint.c (cp_print_value_fields): Catch errors from
|
||||
value_static_field.
|
||||
|
||||
2011-05-17 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* dwarf2read.c (dwarf2_get_die_type): Call
|
||||
|
@ -340,9 +340,19 @@ cp_print_value_fields (struct type *type, struct type *real_type,
|
||||
}
|
||||
else if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
{
|
||||
struct value *v = value_static_field (type, i);
|
||||
volatile struct gdb_exception ex;
|
||||
struct value *v = NULL;
|
||||
|
||||
if (v == NULL)
|
||||
TRY_CATCH (ex, RETURN_MASK_ERROR)
|
||||
{
|
||||
v = value_static_field (type, i);
|
||||
}
|
||||
|
||||
if (ex.reason < 0)
|
||||
fprintf_filtered (stream,
|
||||
_("<error reading variable: %s>"),
|
||||
ex.message);
|
||||
else if (v == NULL)
|
||||
val_print_optimized_out (stream);
|
||||
else
|
||||
cp_print_static_field (TYPE_FIELD_TYPE (type, i),
|
||||
|
Loading…
x
Reference in New Issue
Block a user