aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-09-13 12:53:05 -0600
committerTom Tromey <tromey@adacore.com>2021-10-05 12:35:24 -0600
commitacbf4a58ef324e506cad9cc867a67164d2ca19d4 (patch)
tree01ef3482d2859a81ca7a94e09c7ff190838fcde9 /gdb/value.c
parent3e44c3049fc23f5ba894b346b7defdfba66b076e (diff)
downloadgdb-acbf4a58ef324e506cad9cc867a67164d2ca19d4.zip
gdb-acbf4a58ef324e506cad9cc867a67164d2ca19d4.tar.gz
gdb-acbf4a58ef324e506cad9cc867a67164d2ca19d4.tar.bz2
Remove 'varsize-limit'
This makes the Ada-specific "varsize-limit" a synonym for "max-value-size", and removes the Ada-specific checks of the limit. I am not certain of the history here, but it seems to me that this code is fully obsolete now. And, removing this makes it possible to index large Ada arrays without triggering an error. A new test case is included to demonstrate this.
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/value.c b/gdb/value.c
index 19d81fd..bb2adae 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -4326,6 +4326,16 @@ prevents future values, larger than this size, from being allocated."),
set_max_value_size,
show_max_value_size,
&setlist, &showlist);
+ set_show_commands vsize_limit
+ = add_setshow_zuinteger_unlimited_cmd ("varsize-limit", class_support,
+ &max_value_size, _("\
+Set the maximum number of bytes allowed in a variable-size object."), _("\
+Show the maximum number of bytes allowed in a variable-size object."), _("\
+Attempts to access an object whose size is not a compile-time constant\n\
+and exceeds this limit will cause an error."),
+ NULL, NULL, &setlist, &showlist);
+ deprecate_cmd (vsize_limit.set, "set max-value-size");
+
#if GDB_SELF_TEST
selftests::register_test ("ranges_contain", selftests::test_ranges_contain);
selftests::register_test ("insert_into_bit_range_vector",