diff options
Diffstat (limited to 'gdb/value.c')
-rw-r--r-- | gdb/value.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/value.c b/gdb/value.c index 5a8cc1f2634..087cdfd5c25 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2095,13 +2095,23 @@ show_convenience (char *ignore, int from_tty) get_user_print_options (&opts); for (var = internalvars; var; var = var->next) { + volatile struct gdb_exception ex; + if (!varseen) { varseen = 1; } printf_filtered (("$%s = "), var->name); - value_print (value_of_internalvar (gdbarch, var), gdb_stdout, - &opts); + + TRY_CATCH (ex, RETURN_MASK_ERROR) + { + struct value *val; + + val = value_of_internalvar (gdbarch, var); + value_print (val, gdb_stdout, &opts); + } + if (ex.reason < 0) + fprintf_filtered (gdb_stdout, _("<error: %s>"), ex.message); printf_filtered (("\n")); } if (!varseen) |