diff options
author | Pedro Alves <palves@redhat.com> | 2011-09-02 12:18:27 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-09-02 12:18:27 +0000 |
commit | c709acd150761fffe3536bf9e6a0b32870f41ca3 (patch) | |
tree | 14191338cf67ccd74fc3c6f324e6364179628fc8 /gdb/value.c | |
parent | 86362dfd53fe65250e184a2bc443ea186a42f98f (diff) | |
download | gdb-c709acd150761fffe3536bf9e6a0b32870f41ca3.zip gdb-c709acd150761fffe3536bf9e6a0b32870f41ca3.tar.gz gdb-c709acd150761fffe3536bf9e6a0b32870f41ca3.tar.bz2 |
2011-09-02 Pedro Alves <pedro@codesourcery.com>
gdb/
* value.c (show_convenience): Catch errors thrown while printing
each internal variable.
* infrun.c (validate_siginfo_access): New function.
(siginfo_value_read, siginfo_value_write): Call it.
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 5a8cc1f..087cdfd 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) |