set varsize-limit: New GDB setting for maximum dynamic object size
This is a command we somehow forgot to contribute at the time the Ada language was first contributed to the FSF. This command allows the user to change the maximum size we allow when reading memory from dynamic objects (the default is 65536 bytes). At the moment, this limit is only used by Ada, and so the implementation is kept inside ada-lang.c. However, it is conceivable that other language might want to use it also to handle the same kind of issues; for instance, this might be useful when handling dynamic types in C. So the name of the setting was made language-neutral, to allow for this. Note that an alias for "set var" needs to be introduced as well. We are not adding a test for that, since this is a feature that is already exercized by numerous existing tests. gdb/ChangeLog * NEWS: Add entry describing new "set|show varsize-limit" command. * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit" command. * printcmd.c (_initialize_printcmd): Add "set var" alias of "set variable". gdb/doc/ChangeLog: * gdb.texinfo (Ada Settings): New subsubsection. gdb/testsuite/ChangeLog: * gdb.ada/varsize_limit: New testcase. Tested on x86_64-linux.
This commit is contained in:
parent
cd4fb1b2ff
commit
3fcded8f30
11 changed files with 167 additions and 0 deletions
|
@ -14689,6 +14689,13 @@ With an argument, catch only exceptions with the given name."),
|
|||
CATCH_TEMPORARY);
|
||||
|
||||
varsize_limit = 65536;
|
||||
add_setshow_uinteger_cmd ("varsize-limit", class_support,
|
||||
&varsize_limit, _("\
|
||||
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);
|
||||
|
||||
add_info ("exceptions", info_exceptions_command,
|
||||
_("\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue