+2021-03-15 Tom Tromey <tromey@adacore.com>
+
+ * ada-lang.c (ada_unop_ind_operation::evaluate): Call
+ ada_ensure_varsize_limit.
+
2021-03-15 Tom Tromey <tromey@adacore.com>
* ada-lang.c (numeric_type_p, integer_type_p): Return true for
(CORE_ADDR) value_as_address (arg1));
}
+ struct type *target_type = (to_static_fixed_type
+ (ada_aligned_type
+ (ada_check_typedef (TYPE_TARGET_TYPE (type)))));
+ ada_ensure_varsize_limit (target_type);
+
if (ada_is_array_descriptor_type (type))
/* GDB allows dereferencing GNAT array descriptors. */
return ada_coerce_to_simple_array (arg1);
+2021-03-15 Tom Tromey <tromey@adacore.com>
+
+ * gdb.ada/varsize_limit.exp: Add new test.
+ * gdb.ada/varsize_limit/vsizelim.adb: Update.
+
2021-03-15 Tom Tromey <tromey@adacore.com>
* gdb.ada/operator_call/twovecs.ads: New file.
gdb_test "print larger" "object size is larger than varsize-limit.*"
-
+gdb_test "print name.all" "object size is larger than varsize-limit.*"
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
+with System;
+with Unchecked_Conversion;
+
procedure VsizeLim is
Small : String := Ident ("1234567890");
Larger : String := Ident ("1234567890|1234567890|1234567890");
+
+ type String_Ptr is access all String;
+ type Big_String_Ptr is access all String (Positive);
+
+ function To_Ptr is
+ new Unchecked_Conversion (System.Address, Big_String_Ptr);
+
+ Name_Str : String_Ptr := new String'(Larger);
+ Name : Big_String_Ptr := To_Ptr (Name_Str.all'Address);
+
begin
Do_Nothing (Small'Address); -- STOP
Do_Nothing (Larger'Address);
+ Do_Nothing (Name'Address);
end VsizeLim;