summaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2011-09-02 12:18:25 +0000
committerPedro Alves <pedro@codesourcery.com>2011-09-02 12:18:25 +0000
commit1e00603daae80372f25992191b3e1c9cc5c6af2e (patch)
treefe000ac11eee29c909efa3281ee360432bb66389 /gdb/value.c
parentd7d8c63c1f96e5b47ea7968c509e2c74fc8bb207 (diff)
downloadgdb-1e00603daae80372f25992191b3e1c9cc5c6af2e.tar.gz
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.c14
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)