Make "print" and "compile print" support -OPT options
[deliverable/binutils-gdb.git] / gdb / valops.c
index 69da319ea7d70ea9d9c4dddea133fa4878599795..cbf2eccde3e46d65ee70ecb06e6fb4ae9f2bc8d8 100644 (file)
@@ -3625,7 +3625,7 @@ value_rtti_indirect_type (struct value *v, int *full,
         {
          target = value_ind (v);
         }
-      catch (const gdb_exception_RETURN_MASK_ERROR &except)
+      catch (const gdb_exception_error &except)
        {
          if (except.error == MEMORY_ERROR)
            {
@@ -3634,7 +3634,7 @@ value_rtti_indirect_type (struct value *v, int *full,
                 type.  */
              return NULL;
            }
-         throw_exception (except);
+         throw;
        }
     }
   else
@@ -3777,7 +3777,7 @@ value_of_this_silent (const struct language_defn *lang)
     {
       ret = value_of_this (lang);
     }
-  catch (const gdb_exception_RETURN_MASK_ERROR &except)
+  catch (const gdb_exception_error &except)
     {
     }
 
@@ -3801,6 +3801,11 @@ value_slice (struct value *array, int lowbound, int length)
       && TYPE_CODE (array_type) != TYPE_CODE_STRING)
     error (_("cannot take slice of non-array"));
 
+  if (type_not_allocated (array_type))
+    error (_("array not allocated"));
+  if (type_not_associated (array_type))
+    error (_("array not associated"));
+
   range_type = TYPE_INDEX_TYPE (array_type);
   if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0)
     error (_("slice from bad array or bitstring"));
This page took 0.035377 seconds and 4 git commands to generate.