Update comment of linespec_lexer_lex_keyword.
[deliverable/binutils-gdb.git] / gdb / parse.c
index af01947894d853522451ee8dfaad603d3eccf370..ec23dbb87ae1ada5a8d05efa19a9b5de17309782 100644 (file)
@@ -1133,7 +1133,6 @@ parse_exp_in_context_1 (const char **stringptr, CORE_ADDR pc,
                        const struct block *block,
                        int comma, int void_context_p, int *out_subexp)
 {
-  volatile struct gdb_exception except;
   struct cleanup *old_chain, *inner_chain;
   const struct language_defn *lang = NULL;
   struct parser_state ps;
@@ -1215,12 +1214,12 @@ parse_exp_in_context_1 (const char **stringptr, CORE_ADDR pc,
   inner_chain = make_cleanup_restore_current_language ();
   set_language (lang->la_language);
 
-  TRY_CATCH (except, RETURN_MASK_ALL)
+  TRY
     {
       if (lang->la_parser (&ps))
         lang->la_error (NULL);
     }
-  if (except.reason < 0)
+  CATCH (except, RETURN_MASK_ALL)
     {
       if (! parse_completion)
        {
@@ -1228,6 +1227,7 @@ parse_exp_in_context_1 (const char **stringptr, CORE_ADDR pc,
          throw_exception (except);
        }
     }
+  END_CATCH
 
   reallocate_expout (&ps);
 
@@ -1283,15 +1283,20 @@ parse_expression_for_completion (const char *string, char **name,
   struct expression *exp = NULL;
   struct value *val;
   int subexp;
-  volatile struct gdb_exception except;
 
-  TRY_CATCH (except, RETURN_MASK_ERROR)
+  TRY
     {
       parse_completion = 1;
       exp = parse_exp_in_context (&string, 0, 0, 0, 0, &subexp);
     }
+  CATCH (except, RETURN_MASK_ERROR)
+    {
+      /* Nothing, EXP remains NULL.  */
+    }
+  END_CATCH
+
   parse_completion = 0;
-  if (except.reason < 0 || ! exp)
+  if (exp == NULL)
     return NULL;
 
   if (expout_tag_completion_type != TYPE_CODE_UNDEF)
This page took 0.0360510000000001 seconds and 4 git commands to generate.