Merge branch 'master' into merge-job
[deliverable/binutils-gdb.git] / gdb / varobj.c
index 54b0943d2ea7c440e10cbdb09ec2c2cfc72d0275..48d3c3d9c53253ecc0fcb030bb7697f547289e2f 100644 (file)
@@ -1,6 +1,6 @@
 /* Implementation of the GDB variable objects API.
 
-   Copyright (C) 1999-2019 Free Software Foundation, Inc.
+   Copyright (C) 1999-2020 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include "gdb_regex.h"
 
 #include "varobj.h"
-#include "common/vec.h"
 #include "gdbthread.h"
 #include "inferior.h"
 #include "varobj-iter.h"
 #include "parser-defs.h"
+#include "gdbarch.h"
 
 #if HAVE_PYTHON
 #include "python/python.h"
@@ -39,7 +39,7 @@
 typedef int PyObject;
 #endif
 
-/* Non-zero if we want to see trace of varobj level stuff.  */
+/* See varobj.h.  */
 
 unsigned int varobjdebug = 0;
 static void
@@ -319,7 +319,7 @@ varobj_create (const char *objname,
          var->root->exp = parse_exp_1 (&p, pc, block, 0, &tracker);
        }
 
-      catch (const gdb_exception_RETURN_MASK_ERROR &except)
+      catch (const gdb_exception_error &except)
        {
          return NULL;
        }
@@ -367,7 +367,7 @@ varobj_create (const char *objname,
        {
          value = evaluate_expression (var->root->exp.get ());
        }
-      catch (const gdb_exception_RETURN_MASK_ERROR &except)
+      catch (const gdb_exception_error &except)
        {
          /* Error getting the value.  Try to at least get the
             right type.  */
@@ -597,10 +597,9 @@ varobj_get_frozen (const struct varobj *var)
   return var->frozen;
 }
 
-/* A helper function that restricts a range to what is actually
-   available in a VEC.  This follows the usual rules for the meaning
-   of FROM and TO -- if either is negative, the entire range is
-   used.  */
+/* A helper function that updates the contents of FROM and TO based on the
+   size of the vector CHILDREN.  If the contents of either FROM or TO are
+   negative the entire range is used.  */
 
 void
 varobj_restrict_range (const std::vector<varobj *> &children,
@@ -1037,7 +1036,7 @@ varobj_set_value (struct varobj *var, const char *expression)
       value = evaluate_expression (exp.get ());
     }
 
-  catch (const gdb_exception_RETURN_MASK_ERROR &except)
+  catch (const gdb_exception_error &except)
     {
       /* We cannot proceed without a valid expression.  */
       return false;
@@ -1065,7 +1064,7 @@ varobj_set_value (struct varobj *var, const char *expression)
       val = value_assign (var->value.get (), value);
     }
 
-  catch (const gdb_exception_RETURN_MASK_ERROR &except)
+  catch (const gdb_exception_error &except)
     {
       return false;
     }
@@ -1300,7 +1299,7 @@ install_new_value (struct varobj *var, struct value *value, bool initial)
        {
          /* For variables that are frozen, or are children of frozen
             variables, we don't do fetch on initial assignment.
-            For non-initial assignemnt we do the fetch, since it means we're
+            For non-initial assignment we do the fetch, since it means we're
             explicitly asked to compare the new value with the old one.  */
          intentionally_not_fetched = true;
        }
@@ -1312,7 +1311,7 @@ install_new_value (struct varobj *var, struct value *value, bool initial)
              value_fetch_lazy (value);
            }
 
-         catch (const gdb_exception_RETURN_MASK_ERROR &except)
+         catch (const gdb_exception_error &except)
            {
              /* Set the value to NULL, so that for the next -var-update,
                 we don't try to compare the new value with this value,
@@ -1832,7 +1831,7 @@ install_variable (struct varobj *var)
   return true;                 /* OK */
 }
 
-/* Unistall the object VAR.  */
+/* Uninstall the object VAR.  */
 static void
 uninstall_variable (struct varobj *var)
 {
@@ -1999,7 +1998,7 @@ varobj::~varobj ()
    value were accessible.
 
    This differs from VAR->type in that VAR->type is always
-   the true type of the expession in the source language.
+   the true type of the expression in the source language.
    The return value of this function is the type we're
    actually storing in varobj, and using for displaying
    the values and for comparing previous and new values.
@@ -2138,7 +2137,7 @@ value_of_root_1 (struct varobj **var_handle)
        {
          new_val = evaluate_expression (var->root->exp.get ());
        }
-      catch (const gdb_exception_RETURN_MASK_ERROR &except)
+      catch (const gdb_exception_error &except)
        {
        }
     }
This page took 0.025163 seconds and 4 git commands to generate.