"set record instruction-history-size"/"set record function-call-history-size" range...
authorPedro Alves <palves@redhat.com>
Tue, 26 Mar 2013 18:03:03 +0000 (18:03 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 26 Mar 2013 18:03:03 +0000 (18:03 +0000)
commit42c634cb8c33bccb4d3e82fe6ddec963f7138579
tree7401f5199fb7ac8ef83aeb4df66039fd28e4f867
parent1517bd274290e06af498ef7e496519e4bbc4d5e6
"set record instruction-history-size"/"set record function-call-history-size" range validation.

While the commands are uinteger, the target interfaces are limited to
INT_MAX.  Don't let the user request more than we can handle.

gdb/
2013-03-26  Pedro Alves  <palves@redhat.com>

* record.c (record_insn_history_size_setshow_var)
(record_call_history_size_setshow_var): New globals.
(command_size_to_target_size): New function.
(cmd_record_insn_history, cmd_record_call_history): Use
command_size_to_target_size instead of cast.
(validate_history_size, set_record_insn_history_size)
(set_record_call_history_size): New functions.
(_initialize_record): Install set_record_insn_history_size and
set_record_call_history_size as "set" hooks of "set record
instruction-history-size" and "set record
function-call-history-size".
gdb/ChangeLog
gdb/record.c