gdb/mi: New commands to catch C++ exceptions
[deliverable/binutils-gdb.git] / gdb / valops.c
index fd92a4d165575086d9f00e4c5fa8787c427c3691..cbf2eccde3e46d65ee70ecb06e6fb4ae9f2bc8d8 100644 (file)
@@ -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.024972 seconds and 4 git commands to generate.