aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmd-stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mi/mi-cmd-stack.c')
-rw-r--r--gdb/mi/mi-cmd-stack.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 119e887..0cec856 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -527,10 +527,8 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
if (arg->val || arg->error)
{
- const char *error_message = NULL;
-
if (arg->error)
- error_message = arg->error;
+ stb.printf (_("<error reading variable: %s>"), arg->error);
else
{
TRY
@@ -544,12 +542,11 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
}
CATCH (except, RETURN_MASK_ERROR)
{
- error_message = except.message;
+ stb.printf (_("<error reading variable: %s>"),
+ except.what ());
}
END_CATCH
}
- if (error_message != NULL)
- stb.printf (_("<error reading variable: %s>"), error_message);
uiout->field_stream ("value", stb);
}
}