]> Git Repo - binutils.git/blobdiff - gdb/mi/mi-cmd-stack.c
Split TRY_CATCH into TRY + CATCH
[binutils.git] / gdb / mi / mi-cmd-stack.c
index 18a357e43d71905b246561fa5951d29dcd49d45b..1b863eb8388ce4bec52ea1d2566b501d45caa6b2 100644 (file)
@@ -537,15 +537,13 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
 
   if (arg->val || arg->error)
     {
-      volatile struct gdb_exception except;
+      const char *error_message = NULL;
 
       if (arg->error)
-       except.message = arg->error;
+       error_message = arg->error;
       else
        {
-         /* TRY_CATCH has two statements, wrap it in a block.  */
-
-         TRY_CATCH (except, RETURN_MASK_ERROR)
+         TRY
            {
              struct value_print_options opts;
 
@@ -554,10 +552,15 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
              common_val_print (arg->val, stb, 0, &opts,
                                language_def (SYMBOL_LANGUAGE (arg->sym)));
            }
+         CATCH (except, RETURN_MASK_ERROR)
+           {
+             error_message = except.message;
+           }
+         END_CATCH
        }
-      if (except.message)
+      if (error_message != NULL)
        fprintf_filtered (stb, _("<error reading variable: %s>"),
-                         except.message);
+                         error_message);
       ui_out_field_stream (uiout, "value", stb);
     }
 
This page took 0.024817 seconds and 4 git commands to generate.